Skip to main content

Stashpad

Stashpad is a personal developer reference manager (stash on the command line).

Save URLs, shell commands, code snippets, and notes. Tag them, search, export, and browse from the terminal.

Full reference: docs/

How it works

Stashpad is a local, searchable cheat sheet for developers. You save things you look up repeatedly — shell commands, snippets, URLs, notes — and find them again from the terminal.

Data storage

Everything lives in a single JSON file:

~/.config/stash/vault.json    # default location

Override with STASH_DATA_DIR, --config-dir, or a path passed to stash init. The file contains:

  • Entries — title, content, optional URL, tags, priority, kind, pinned flag, timestamps, UUID
  • Tags — a registry of tag names used in the vault

Example scripts use examples/.demo-vault/ so they never touch your real vault.

Typical workflow

stash init --name my-vault                         # create vault once
stash entry add "Docker prune" "docker ..." --tag devops
stash add "Quick note" "echo hello"              # top-level alias
git log -5 | stash add "Recent commits" -      # pipe into vault
stash pins                                       # pinned favorites
stash pick deploy --copy                         # interactive picker
stash browse                                     # split-pane TUI (poetry install -E tui)
stash search "prune"                             # fuzzy ranked search
stash entry copy <id> --first-line               # copy command to clipboard
stash entry run <id>                             # run with confirmation
stash export json ./backup.json                  # backup
stash import --from-file ./backup.json           # restore

Useful global flags: --json (scripting), --verbose, --config-dir (alternate vault).

Validation with Pydantic

Input is validated before it hits disk:

Schema Used for
EntryCreate New entries (title, URL, tags normalized)
EntryUpdate Partial edits
EntryFilter List/search filters
ImportPayload JSON import files

Invalid URLs, empty titles, or malformed import files fail early with clear errors.

Architecture

CLI commands  ──►  storage.py  ──►  vault.json
                        ▲
                        │
                  models / schemas (Pydantic)

Quick start

pip install stashpad
# or: pipx install stashpad

stash init --name my-vault

stash entry add "Docker prune" "docker system prune -af" \
  --tag devops --tag docker --url https://docs.docker.com

stash entry list --tag devops
stash search "prune"
stash --json entry list

From source:

git clone https://github.com/Vicba/stash-cli.git
cd stash-cli
poetry install
poetry install -E tui   # optional: split-pane browse UI
poetry install -E mcp   # optional: MCP server for Cursor / Claude Desktop
poetry run stash init --name my-vault

CLI commands

Command Description
stash init Initialize vault (prompts, env vars)
stash add Quick-capture alias for stash entry add (stdin, clipboard)
stash entry add/list/show/edit/remove/copy/run/pin/unpin CRUD with UUID, enums, filters, aliases (ls, rm)
stash pins List pinned favorites
stash pick Interactive fzf-style picker (--copy, --run, --open)
stash browse Split-pane TUI browser (poetry install -E tui)
stash search Fuzzy ranked search (--exact to disable)
stash mcp serve MCP server for AI assistants (poetry install -E mcp, Python 3.10+)
stash tags list/add/remove Nested subcommands
stash export json/markdown Export with Path types and progress bars
stash import Import from JSON files
stash open Open entry URL in browser
stash config show/set/path Configuration management

Global flags: --verbose, --json, --config-dir, --version

Run poetry run stash --help for full usage.

Examples

Runnable walkthroughs and sample data live in examples/:

./examples/scripts/01-getting-started.sh
./examples/scripts/04-import-export.sh

Development

poetry run poe test      # run tests
poetry run poe lint      # lint
poetry run poe dev       # dev runner

Project structure

src/stashpad/
  cli.py              # root app + global callback
  context.py          # shared AppContext
  models.py           # Entry, Vault, enums
  storage.py          # JSON persistence (~/.config/stash/)
  commands/           # one module per command group
  mcp/                # MCP service + FastMCP server
docs/                 # Reference documentation
tests/                # CLI tests

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stashpad-0.7.0.tar.gz (49.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stashpad-0.7.0-py3-none-any.whl (66.8 kB view details)

Uploaded Python 3

File details

Details for the file stashpad-0.7.0.tar.gz.

File metadata

  • Download URL: stashpad-0.7.0.tar.gz
  • Upload date:
  • Size: 49.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.12.13 Linux/6.17.0-1018-azure

File hashes

Hashes for stashpad-0.7.0.tar.gz
Algorithm Hash digest
SHA256 096de16c2e370ba329c12274ba6d01a81d1e050d2e3418787a9881b3edd342c9
MD5 ea9cf9230b33849a418a59f3c3898ad1
BLAKE2b-256 38585d3c46c79fc841ae2476546f9b9c18329c5ebcac65acd7d44a7ba52fd123

See more details on using hashes here.

File details

Details for the file stashpad-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: stashpad-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 66.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.12.13 Linux/6.17.0-1018-azure

File hashes

Hashes for stashpad-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4522fc34a267dc194f6643a2fbb08eafbb8cad12fe2f1bb5399e5dc32935dc90
MD5 ef6d32c5122fb0251aae250cdaeec898
BLAKE2b-256 523d6e579e6058d707a81d767008ac6f4dd0b5d152c74923eca3e406228388fc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page