A terminal-based code snippet manager with fuzzy search, syntax highlighting, and clipboard integration.
- Two TUI modes — full-screen manager (
snipt manage) and floating search palette (snipt find) - Fuzzy search with scoring that rewards consecutive and word-boundary matches
- Tag filtering — prefix searches with
#to match tags only (e.g.,#api) - Syntax highlighting — built-in keyword highlighting for Go, Python, Rust, TypeScript, JavaScript, Bash, SQL, Nix, Lua, and more
- Create/edit in your editor — opens
$EDITORwith a YAML frontmatter template - Clipboard integration — OSC52 in TUI,
pbcopy/xclip/wl-copyfor CLI - Pin snippets to keep them at the top of the list
- Use tracking — tracks how often each snippet is copied
- Full CLI — add, get, list, edit, tag, pin, export, import, and more
- Export/import — JSON, Markdown, or tar.gz formats
- Pure Go SQLite with FTS5 full-text search — no CGo required
- Catppuccin Mocha color theme
go install github.com/infktd/snipt/src/cmd/snipt@latestOr clone and build:
git clone https://github.com/infktd/snipt.git
cd snipt
go build -o snipt ./src/cmd/snipt- Go 1.25+
$EDITORor$VISUALset for create/edit (falls back tovi)
Full-screen snippet manager with a sidebar and syntax-highlighted preview pane. This is the default when you run snipt with no arguments.
| Key | Action |
|---|---|
j / k / ↑ / ↓ |
Navigate snippets |
/ |
Search (fuzzy title match, #tag for tags) |
enter |
Copy snippet to clipboard |
n |
Create new snippet in $EDITOR |
e |
Edit selected snippet in $EDITOR |
d |
Delete selected snippet (confirms with y) |
p |
Toggle pin |
q / ctrl+c |
Quit |
While searching:
| Key | Action |
|---|---|
↑ / ↓ |
Navigate results |
enter |
Confirm search |
esc |
Cancel and clear search |
Floating search palette for quick fuzzy search and copy. Accepts an optional initial query.
snipt find # open empty
snipt find "http" # open with pre-filled query| Key | Action |
|---|---|
↑ / ↓ |
Navigate results |
enter |
Copy to clipboard and close |
esc / ctrl+c |
Close |
In the TUI: Press n in manage mode. Your editor opens with a YAML frontmatter template:
---
title:
language: text
tags: []
pinned: false
---
Fill in the metadata, write your code below the closing ---, save and quit. The snippet appears in your list.
From the CLI:
snipt new # open blank file in $EDITOR, then fill metadata
snipt add script.sh # import from file (auto-detects language)
echo "curl -s ..." | snipt add - # pipe from stdin
snipt add --from-clipboard # grab from system clipboardSnippets edited via the TUI use YAML frontmatter:
---
title: HTTP GET with headers
language: go
tags: [http, networking]
pinned: false
---
req, _ := http.NewRequest("GET", url, nil)
req.Header.Set("Authorization", "Bearer "+token)
resp, err := http.DefaultClient.Do(req)| Command | Description |
|---|---|
snipt / snipt manage |
Full-screen TUI manager |
snipt find [query] |
Floating search palette |
snipt new |
Create snippet in $EDITOR |
snipt add [file] |
Create from file, stdin, or clipboard |
snipt get <ref> |
Output snippet content (-c for clipboard) |
snipt list |
List snippets (--lang, --tag, --pinned, --sort, --json) |
snipt edit <ref> |
Edit content in $EDITOR |
snipt set <ref> |
Modify metadata (--title, --lang, --desc, --source) |
snipt tag <ref> <tags...> |
Add tags |
snipt untag <ref> <tags...> |
Remove tags |
snipt pin <ref> / unpin |
Toggle pinned status |
snipt rm <ref> |
Delete snippet (--force to skip confirmation) |
snipt stats |
Collection statistics |
snipt export |
Export as JSON, Markdown, or tar.gz |
snipt import <file> |
Import from JSON (--overwrite, --dry-run) |
snipt config |
Open config in $EDITOR |
The <ref> argument resolves by exact ID, exact title (case-insensitive), or full-text search. When ambiguous, an interactive picker appears.
Global flags: --db <path>, --no-color, --version
Config file: ~/.config/snipt/config.toml
editor = "" # editor command (overrides $VISUAL/$EDITOR)
default_language = "text" # default language for new snippets
theme = "catppuccin-mocha" # color themeEditor resolution: config.editor > $VISUAL > $EDITOR > vi
GUI editors (code, zed, subl, etc.) automatically get --wait injected so the TUI suspends properly.
Database: ~/.local/share/snipt/snipt.db (override with --db)
- Go
- Bubbletea v2 — TUI framework
- Lip Gloss v2 — styling
- Bubbles v2 — TUI components
- SQLite via modernc.org (pure Go, no CGo)
- FTS5 — full-text search
- Cobra — CLI framework
- Catppuccin Mocha — color theme
- Gist sync (backup/share snippets via GitHub Gists)
- Sort options in TUI (by name, date, use count)
- Bulk operations
- Import/export from TUI
- Configurable keybindings