Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

cheatset

> 编程语言
Open source

Generate cheat sheets for Dash

647 stars0 likes3 views
WebsiteGitHub

About

Generate cheat sheets for Dash

cheatset

Generate your own cheat sheets as docsets for Dash! Use this simple command line tool and write your cheat sheets in an easy language (Ruby DSL).

Installation

$ sudo gem install cheatset

Note: this requires the Xcode Command Line Tools to be installed. Install them using this:

$ xcode-select --install

Contributions

If you make a useful cheat sheet, please contribute it to Dash.

Usage

Write a file (here sample.rb) containing your cheat sheet data, e.g.:

…

ruby sample = "You can include code snippets as well" ``` Or anything else Markdown or HTML. END end end

notes 'Some notes at the end of the cheat sheet' end


To convert this file to a docset, call

    $ cheatset generate sample.rb

The following values may contain Markdown or HTML:

* The `introduction` and the `notes` of the cheat sheet
* The `name` and the `notes` of the entries

Syntax highlighting is supported (see Ruby code in the sample). For a list of supported languages, see the [rouge](http://rouge.jneen.net/) [lexer repository](https://github.com/jneen/rouge/tree/master/spec/lexers)

For more complete examples look at some of
[the actual cheat sheets](https://github.com/Kapeli/cheatsheets/tree/master/cheatsheets).

If you do not use Ruby or lack a working Ruby toolchain and still want to generate cheatsheets.

You can use the `cheatset` Docker image.

    $ docker pull jonasbn/cheatset:latest
    $ docker run --rm  -it --volume $PWD:/tmp --name cheatset jonasbn/cheatset:latest generate sample.rb

For more details on the Docker image please visit the repositories on [DockerHub](https://hub.docker.com/repository/docker/jonasbn/cheatset) or [GitHub](https://github.com/jonasbn/docker-cheatset)

## Advanced Usage

Apart from the attributes listed in the sample cheat sheet above, you can also use these:

* `style` (under `cheatsheet`) - define any CSS style you want. See example [here](https://github.com/Kapeli/cheatsheets/blob/f9e40e30b6fde9063b7a0fb5de8fb203851b17df/cheatsheets/CSS_Named_Colors.rb#L7-L12)
* `html_class` (under `category`) - define a HTML class to be added to a category. This can be used to define custom styling for each category
* `td_command` (under `entry`) - just like `command`, but multiple ones are added in a separate column (as opposed to a separate row)
* `td_notes` (under `entry`) - just like `notes` but can be repeated multiple times, each becoming a separate column
* `html_notes` (under `entry`) - just like `notes`, but doesn't support Markdown
* `index_name` (under `entry`) - this is not displayed in the cheat sheet at all. You can use it to define a separate index name (i.e what gets added to Dash's search index and is searchable in Dash). In other words, if this entry is not present, the value in `name` is used.

## Thanks

[Nix-wie-weg](https://github.com/Nix-wie-weg/dasheets) for the initial code.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Ruby

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言