[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-4943":3},{"id":4,"name":5,"fullName":6,"owner":5,"repo":5,"description":7,"homepage":8,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":14,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":9,"rankLanguage":9,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":21,"topics":23,"createdAt":9,"pushedAt":9,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":15,"starSnapshotCount":15,"syncStatus":16,"lastSyncTime":34,"discoverSource":35},4943,"cheat","cheat\u002Fcheat","cheat allows you to create and view interactive cheatsheets on the command-line. It was designed to help remind *nix system administrators of options for commands that they use frequently, but not frequently enough to remember.","",null,"Go",13351,849,182,8,0,2,48,7,43.79,"MIT License",false,"master",[24,5,25,26,27,28,29,30],"bash","cheatsheet","cheatsheets","documentation","help","interactive-cheatsheets","man-page","2026-06-12 02:01:06","![Workflow status](https:\u002F\u002Fgithub.com\u002Fcheat\u002Fcheat\u002Factions\u002Fworkflows\u002Fbuild.yml\u002Fbadge.svg)\n\n# cheat\n\n`cheat` allows you to create and view interactive cheatsheets on the\ncommand-line. It was designed to help remind \\*nix system administrators of\noptions for commands that they use frequently, but not frequently enough to\nremember.\n\n![The obligatory xkcd](http:\u002F\u002Fimgs.xkcd.com\u002Fcomics\u002Ftar.png 'The obligatory xkcd')\n\nUse `cheat` with [cheatsheets][].\n\n## Example\nThe next time you're forced to disarm a nuclear weapon without consulting\nGoogle, you may run:\n\n```sh\ncheat tar\n```\n\nYou will be presented with a cheatsheet resembling the following:\n\n```sh\n# To extract an uncompressed archive:\ntar -xvf '\u002Fpath\u002Fto\u002Ffoo.tar'\n\n# To extract a .gz archive:\ntar -xzvf '\u002Fpath\u002Fto\u002Ffoo.tgz'\n\n# To create a .gz archive:\ntar -czvf '\u002Fpath\u002Fto\u002Ffoo.tgz' '\u002Fpath\u002Fto\u002Ffoo\u002F'\n\n# To extract a .bz2 archive:\ntar -xjvf '\u002Fpath\u002Fto\u002Ffoo.tgz'\n\n# To create a .bz2 archive:\ntar -cjvf '\u002Fpath\u002Fto\u002Ffoo.tgz' '\u002Fpath\u002Fto\u002Ffoo\u002F'\n```\n\n## Installing\nFor installation and configuration instructions, see [INSTALLING.md][].\n\n## Usage\nTo view a cheatsheet:\n\n```sh\ncheat tar      # a \"top-level\" cheatsheet\ncheat foo\u002Fbar  # a \"nested\" cheatsheet\n```\n\nTo edit a cheatsheet:\n\n```sh\ncheat -e tar     # opens the \"tar\" cheatsheet for editing, or creates it if it does not exist\ncheat -e foo\u002Fbar # nested cheatsheets are accessed like this\n```\n\nTo view the configured cheatpaths:\n\n```sh\ncheat -d\n```\n\nTo list all available cheatsheets:\n\n```sh\ncheat -l\n```\n\nTo briefly list all cheatsheets (names and tags only):\n\n```sh\ncheat -b\n```\n\nTo list all cheatsheets that are tagged with \"networking\":\n\n```sh\ncheat -l -t networking\n```\n\nTo list all cheatsheets on the \"personal\" path:\n\n```sh\ncheat -l -p personal\n```\n\nTo search for the phrase \"ssh\" among cheatsheets:\n\n```sh\ncheat -s ssh\n```\n\nTo search (by regex) for cheatsheets that contain an IP address:\n\n```sh\ncheat -r -s '(?:[0-9]{1,3}\\.){3}[0-9]{1,3}'\n```\n\nFlags may be combined in intuitive ways. Example: to search sheets on the\n\"personal\" cheatpath that are tagged with \"networking\" and match a regex:\n\n```sh\ncheat -p personal -t networking --regex -s '(?:[0-9]{1,3}\\.){3}[0-9]{1,3}'\n```\n\n## Cheatsheets\nCheatsheets are plain-text files with no file extension, and are named\naccording to the command used to view them:\n\n```sh\ncheat tar     # file is named \"tar\"\ncheat foo\u002Fbar # file is named \"bar\", in a \"foo\" subdirectory\n```\n\nCheatsheet text may optionally be preceded by a YAML frontmatter header that\nassigns tags and specifies syntax:\n\n```\n---\nsyntax: javascript\ntags: [ array, map ]\n---\n\u002F\u002F To map over an array:\nconst squares = [1, 2, 3, 4].map(x => x * x);\n```\n\nSyntax highlighting is provided by [Chroma][], and the `syntax` value may be\nset to any lexer name that Chroma supports. See Chroma's [supported\nlanguages][] for a complete list.\n\nThe `cheat` executable includes no cheatsheets, but [community-sourced\ncheatsheets are available][cheatsheets]. You will be asked if you would like to\ninstall the community-sourced cheatsheets the first time you run `cheat`.\n\n## Cheatpaths\nCheatsheets are stored on \"cheatpaths\", which are directories that contain\ncheatsheets. Cheatpaths are specified in the `conf.yml` file.\n\nIt can be useful to configure `cheat` against multiple cheatpaths. A common\npattern is to store cheatsheets from multiple repositories on individual\ncheatpaths:\n\n```yaml\n# conf.yml:\n# ...\ncheatpaths:\n  - name: community                   # a name for the cheatpath\n    path: ~\u002Fdocuments\u002Fcheat\u002Fcommunity # the path's location on the filesystem\n    tags: [ community ]               # these tags will be applied to all sheets on the path\n    readonly: true                    # if true, `cheat` will not create new cheatsheets here\n\n  - name: personal\n    path: ~\u002Fdocuments\u002Fcheat\u002Fpersonal  # this is a separate directory and repository than above\n    tags: [ personal ]\n    readonly: false                   # new sheets may be written here\n# ...\n```\n\nThe `readonly` option instructs `cheat` not to edit (or create) any cheatsheets\non the path. This is useful to prevent merge-conflicts from arising on upstream\ncheatsheet repositories.\n\nIf a user attempts to edit a cheatsheet on a read-only cheatpath, `cheat` will\ntransparently copy that sheet to a writeable directory before opening it for\nediting.\n\n### Directory-scoped Cheatpaths\nAt times, it can be useful to closely associate cheatsheets with a directory on\nyour filesystem. `cheat` facilitates this by searching for a `.cheat` directory\nin the current working directory and its ancestors (similar to how `git` locates\n`.git` directories). The nearest `.cheat` directory found will (temporarily) be\nadded to the cheatpaths. This means you can place a `.cheat` directory at your\nproject root and it will be available from any subdirectory within that project.\n\n## Autocompletion\n`cheat` can generate shell completion scripts for `bash`, `zsh`, `fish`, and\n`powershell` via the `--completion` flag:\n\n```sh\ncheat --completion bash\ncheat --completion zsh\ncheat --completion fish\ncheat --completion powershell\n```\n\nPipe the output to the appropriate location for your shell. For example:\n\n```sh\n# bash (user-local)\nmkdir -p ~\u002F.local\u002Fshare\u002Fbash-completion\u002Fcompletions\ncheat --completion bash > ~\u002F.local\u002Fshare\u002Fbash-completion\u002Fcompletions\u002Fcheat\n\n# bash (system-wide)\ncheat --completion bash > \u002Fetc\u002Fbash_completion.d\u002Fcheat\n\n# zsh (ensure the directory is on your fpath)\ncheat --completion zsh > \"${fpath[1]}\u002F_cheat\"\n\n# fish\ncheat --completion fish > ~\u002F.config\u002Ffish\u002Fcompletions\u002Fcheat.fish\n```\n\nCompletions are dynamically generated and include cheatsheet names, tags, and\ncheatpath names.\n\n[INSTALLING.md]: INSTALLING.md\n[Releases]:      https:\u002F\u002Fgithub.com\u002Fcheat\u002Fcheat\u002Freleases\n[cheatsheets]:   https:\u002F\u002Fgithub.com\u002Fcheat\u002Fcheatsheets\n[Chroma]:                https:\u002F\u002Fgithub.com\u002Falecthomas\u002Fchroma\n[supported languages]:   https:\u002F\u002Fgithub.com\u002Falecthomas\u002Fchroma#supported-languages\n","`cheat` 是一个命令行工具，允许用户创建和查看交互式的备忘单。它主要用于帮助*nix系统管理员记住不常用但又需要偶尔使用的命令选项。项目使用Go语言编写，具有高度的可定制性和扩展性，支持通过YAML前缀为备忘单添加标签和指定语法高亮。此外，`cheat`还提供了丰富的命令行选项，如搜索、编辑、列出所有备忘单等功能，极大地方便了日常使用。适合于任何需要快速查阅命令选项或技术文档的场景，特别是对于经常与*nix环境打交道的技术人员来说非常实用。","2026-06-11 03:01:40","top_language"]