- Go 99.3%
- Shell 0.7%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .forgejo | ||
| .github/workflows | ||
| .handoff | ||
| cmd/hayami | ||
| docs | ||
| e2e | ||
| internal | ||
| scripts | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| Makefile | ||
| PROVENANCE.md | ||
| README.ja.md | ||
| README.md | ||
hayami (早見)
日本語 | English
Hayami v1 is a small Go CLI for canonical SQLite snippets and read-only reference material. Human create/edit interchange is strict YAML; it is not the storage format. Hayami intentionally no longer carries the navi-compatible .cheat picker runtime.
Hayami was originally inspired by navi and early revisions supported navi .cheat compatibility. Version 1.0.0 is a near-complete redesign: it is not compatible with the former .cheat format or runtime. See PROVENANCE.md for the project history.
Install
make build
install -m 755 bin/hayami ~/.local/bin/hayami
Release binaries are available for macOS (amd64/arm64) and Linux (amd64/arm64). The canonical repository is forge.harakara.site/littleisland/hayami; this repository is mirrored on Codeberg.
Usage
hayami # choose and render one v1 snippet with fzf
hayami completion <shell> # generate shell completion
hayami docs
hayami guide list
hayami guide search "safe entry"
hayami guide view opencode
hayami snippet template create
hayami snippet import ./one.yaml --scope global
hayami list # shortcut for `hayami snippet list`
hayami search rebase # shortcut for `hayami snippet search rebase`
hayami show rebase # shortcut for `hayami snippet show rebase`
hayami snippet export rebase
hayami snippet fzf
hayami edit rebase --scope global # shortcut for `hayami snippet edit`
hayami render rebase # shortcut for `hayami snippet render rebase`
hayami execute rebase # shortcut for `hayami snippet execute rebase`
hayami snippet doctor --scope all
hayami snippet backup --scope global --output ./snippets.db
hayami machine v1 schema snippet-record
hayami machine v1 snippet list < request.json
hayami tldr view tar
hayami cheatsh view git/rebase
Bare hayami is the same fixed v1 fzf picker as hayami snippet fzf. The daily root shortcuts list, search, show, edit, render, and execute are exact counterparts of their hayami snippet ... paths; other snippet operations remain under hayami snippet. The picker reads an effective SQLite snapshot, hides full identity metadata from display and search, and prints only the rendered body. It never executes, changes state, loads shell configuration, or accepts ambient fzf options. The removed surface is repo, history, the legacy api tree, tldr import, local tldr view --file, old root flags (--path, --exec, --query, interpolation and fzf overrides), and the former s alias.
Canonical snippets are stored globally in $XDG_DATA_HOME/hayami/snippets.db or project-locally at the nearest existing .hayami/snippets.db. Hayami generates an opaque full snp_... ID; human commands accept a unique short prefix while machine v1 requires the full ID. Human create/edit documents contain mutable fields only; show/export expose identity, physical scope, and revision. snippet execute and its root shortcut execute are the only execution paths: only kind: shell reaches /dev/tty preview and a fresh y or yes; prompt/text kinds fail before a terminal, config load, child process, or side effect. There is no bypass flag or machine execute API.
Guides are Markdown files in $XDG_DATA_HOME/hayami/guides. tldr and cheat.sh are remote read-only views; they do not save, convert, or execute results.
Configuration
Configuration precedence is HAYAMI_CONFIG_YAML, HAYAMI_CONFIG, XDG config, then defaults. Supported fields are shown in docs/config.example.yaml: imports.tldr, imports.cheatsh.base_url, and shell.command.
Legacy configuration fields (style, finder, cheats, history, clipboard) are ignored without rewriting the file. Hayami never deletes, moves, converts, reads, or writes legacy .cheat, YAML snippet, history, imported-tldr, or recent-state data. Machine v1 has versioned JSON requests, revision CAS, request replay protection, and bounded JSONL batch; it does not accept human prefixes.
Run hayami docs for the complete running-binary contract and docs/testing.md for verification commands.