Scripts2026年5月24日·1 分钟阅读

cheat.sh — Unified Cheat Sheet Service for Developers

Instant access to community-driven cheat sheets for programming languages, tools, and commands from one curl-friendly endpoint.

Agent 就绪

这个资产可以被 Agent 直接读取和安装

TokRepo 同时提供通用 CLI 命令、安装契约、metadata JSON、按适配器生成的安装计划和原始内容链接,方便 Agent 判断适配度、风险和下一步动作。

Needs Confirmation · 64/100策略:需确认
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
cheat.sh Overview
通用 CLI 安装命令
npx tokrepo install 1b3ab93a-576b-11f1-9bc6-00163e2b0d79

Introduction

cheat.sh aggregates cheat sheets from dozens of community sources into a single, curl-accessible interface. It provides concise, practical examples for programming languages, CLI tools, and UNIX commands without leaving the terminal.

What cheat.sh Does

  • Serves cheat sheets for 58 programming languages and over 1000 UNIX commands
  • Aggregates content from tldr-pages, Stack Overflow, Learn X in Y Minutes, and custom sheets
  • Supports language-specific queries with topic paths like python/decorator
  • Provides a special :learn page for quick language primers
  • Offers syntax-highlighted output and stealth mode for clean text

Architecture Overview

cheat.sh is a Python-based web service backed by Redis for caching. It indexes multiple upstream cheat sheet repositories and Stack Overflow answers into a unified query interface. The server responds to simple HTTP GET requests, making curl the primary client, though editor plugins for Vim, Emacs, VS Code, and Sublime are also available.

Self-Hosting & Configuration

  • Clone the repo and install dependencies with pip install -r requirements.txt
  • Start the server with python bin/srv.py on port 8002 by default
  • Set CHEATSH_CACHE environment variable to configure Redis-backed caching
  • Configure upstream cheat sheet sources in lib/adapter/ modules
  • Deploy behind Nginx or Caddy for TLS and domain routing

Key Features

  • Zero-install client: works with plain curl or wget
  • Unified search across multiple cheat sheet databases
  • Syntax highlighting with automatic language detection
  • Editor integration for Vim, Emacs, VS Code, and IntelliJ
  • Self-hostable for air-gapped or private environments

Comparison with Similar Tools

  • tldr-pages — community man-page summaries; cheat.sh aggregates tldr plus many other sources
  • DevHints — web-based cheat sheets; cheat.sh is terminal-first and curl-friendly
  • Navi — interactive CLI cheat sheet tool; cheat.sh is a server-side aggregation service
  • eg — example-focused man pages; cheat.sh covers broader language and tool scope

FAQ

Q: Does cheat.sh require authentication? A: No. The public instance at cheat.sh is free and requires no API key or login.

Q: Can I add my own cheat sheets? A: Yes. Place custom sheets in the cheat.sheets/ directory or submit a pull request to the community repository.

Q: Does it work offline? A: Self-hosting with a local Redis cache enables fully offline usage after initial indexing.

Q: Which editors are supported? A: Official plugins exist for Vim, Emacs, VS Code, Sublime Text, and IntelliJ IDEA.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产