Skip to content

Releases: cheat/cheat

5.1.0

16 Feb 00:52

Choose a tag to compare

What's New

  • --update / -u flag: Pull the latest changes for all git-backed cheatpaths from the CLI. Reports per-path status (ok, skipped, error). Works with --path filtering to update specific cheatpaths. Supports SSH remotes via key file discovery and SSH agent. (#552)

Documentation

  • Fixed config filename references in man page (conf.yamlconf.yml)
  • Added missing /etc/cheat/conf.yml config search path to man page
  • Fixed stale code references in CLAUDE.md, HACKING.md, and ADRs
  • Updated Go version requirement in INSTALLING.md

5.0.0

15 Feb 23:45

Choose a tag to compare

What's New

Migrated from docopt to cobra (#768, #705, #632, #476)

The CLI argument parser has been migrated from docopt-go to cobra. This is
a largely internal change — the command-line interface remains the same — but it
fixes a cluster of long-standing autocompletion bugs and modernizes the
completion system.

Dynamic shell completions

The static completion scripts (scripts/cheat.bash, .zsh, .fish) have been
replaced by dynamically generated completions via --completion:

cheat --completion bash
cheat --completion zsh
cheat --completion fish
cheat --completion powershell

Completions now include cheatsheet names, tags, and cheatpath names, and stay
in sync automatically as your cheatsheets change.

See the README for
installation instructions.

Breaking changes

  • The static completion scripts under scripts/ have been removed. Users must
    regenerate completions using cheat --completion <shell>.
  • The CHEAT_USE_FZF environment variable is no longer supported.

Bug fixes

  • Fixed _init_completion: command not found error (#768)
  • Fixed autocompletion not working (#705)
  • Fixed zsh autocompletion not resolving cheatsheet names (#632)

4.7.1

15 Feb 20:12

Choose a tag to compare

Housekeeping & Refactoring

Internal cleanup and project restructuring. No user-facing behavior changes.

  • Rename cheatpath.Cheatpath type to cheatpath.Path
  • Move sheet name validation to sheet.Validate
  • Optimize filesystem walks (WalkDir, skip .git directories)
  • Remove unused parameters, dead files, and inaccurate doc.go files
  • Reorganize project layout: integration tests to test/integration/, fuzz script to test/, consolidate mock helpers into mocks/
  • Extract config.New into its own file
  • Restore plan9 build target
  • Clean up project documentation

4.7.0

15 Feb 17:25

Choose a tag to compare

What's New

Brief list output (-b/--brief)

A new --brief flag provides a compact listing of cheatsheets, showing only titles and tags without file paths. This addresses long-standing feedback about the cheat -l output being too noisy in narrow terminals (#505).

cheat -b            # list all sheets (title + tags only)
cheat -b tar        # filter by name
cheat -lb -t personal  # combine with other flags

The existing cheat -l output is unchanged.

4.6.0

15 Feb 16:23

Choose a tag to compare

New Features

  • Recursive .cheat directory discovery: cheat now walks up the directory tree to find .cheat directories, mirroring how git discovers .git directories. Place a .cheat directory at your project root and it will be available from any subdirectory. (#602)

Documentation

  • ADR-004: documents the design decisions for recursive .cheat discovery
  • Updated README and package docs to describe the new behaviour

4.5.2

15 Feb 12:36

Choose a tag to compare

Bug Fixes

  • Static binaries: Build with CGO_ENABLED=0 to produce fully static binaries (#744)
  • Editor env vars: Respect $VISUAL and $EDITOR environment variables at runtime (#589)
  • .git in path: Fix cheatsheets being silently skipped when the cheatpath contains a directory ending in .git (#711)

Other Changes

  • Remove dead Homebrew formula bump workflow
  • Move ADRs from doc/adr/ to adr/ for discoverability

4.5.1

15 Feb 11:27

Choose a tag to compare

Bug fixes

  • Fix first-run experience (#721, #730, #771): Declining community cheatsheets during initial setup no longer causes errors on subsequent runs. config.New() now skips missing cheatpaths with a warning instead of a fatal error.

  • Fix --init output (#773): cheat --init now comments out the community cheatpath by default and includes clone instructions, so the output works as a config file without modification.

  • Fix stdin buffering in installer prompts: The installer's interactive prompts now read stdin without buffering, allowing cheat to be scripted (e.g., printf "y\nn\n" | cheat).

  • Fix frontmatter parsing on Windows: Line ending detection in cheatsheet frontmatter now inspects file content instead of checking runtime.GOOS, fixing parsing failures when files have Unix line endings on Windows.

Other changes

  • CI modernized: Go 1.26, GitHub Actions v4/v5, Windows added to test matrix
  • Dependencies updated (addresses dependabot CVEs in golang.org/x/crypto, golang.org/x/net)
  • End-to-end integration tests added for first-run experience
  • Dockerfile updated to Go 1.26

4.5.0

15 Feb 00:59

Choose a tag to compare

Bug Fixes

  • Fix inverted pager detection logic (returned error string instead of path)
  • Fix repo.Clone ignoring destination directory parameter
  • Fix sheet loading using append on pre-sized slices, causing nil entries
  • Clean up partial files on copy failure
  • Trim whitespace from editor config during loading

Security

  • Add path traversal protection for cheatsheet names

Performance

  • Move regex compilation outside search loop
  • Replace O(n²) string concatenation with strings.Join in search

Build & Testing

  • Remove go:generate; embed config and usage as string literals
  • Parallelize release builds
  • Add fuzz testing infrastructure
  • Improve test coverage from 38.9% to 50.2%

Documentation

  • Fix inaccurate code examples in HACKING.md
  • Add missing --conf and --all options to man page
  • Add ADRs for path traversal, env parsing, and search parallelization
  • Update CONTRIBUTING.md to reflect project policy

4.4.2

15 Dec 17:55

Choose a tag to compare

  • Bump chroma to newest version
  • Remove plan9 support due to build failure
  • Upgrade to yaml.v3

4.4.1

13 Dec 14:24
2294f40

Choose a tag to compare

  • Update dependencies
  • Make minor changes to appease revive (linter)