{"id":43136786,"url":"https://github.com/dnlvgl/stash","last_synced_at":"2026-01-31T22:04:54.219Z","repository":{"id":335460300,"uuid":"1144936844","full_name":"dnlvgl/stash","owner":"dnlvgl","description":"A terminal UI for managing shell snippets. Save, search, and execute your frequently used commands.","archived":false,"fork":false,"pushed_at":"2026-01-30T13:46:27.000Z","size":156,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-31T01:06:08.000Z","etag":null,"topics":["bun","shell-scripts"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dnlvgl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-29T08:12:36.000Z","updated_at":"2026-01-30T13:46:32.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dnlvgl/stash","commit_stats":null,"previous_names":["dnlvgl/stash"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/dnlvgl/stash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnlvgl%2Fstash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnlvgl%2Fstash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnlvgl%2Fstash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnlvgl%2Fstash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dnlvgl","download_url":"https://codeload.github.com/dnlvgl/stash/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnlvgl%2Fstash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28956948,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T18:30:42.805Z","status":"ssl_error","status_checked_at":"2026-01-31T18:30:19.593Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bun","shell-scripts"],"created_at":"2026-01-31T22:04:52.439Z","updated_at":"2026-01-31T22:04:54.211Z","avatar_url":"https://github.com/dnlvgl.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stash\n\nA terminal UI for managing shell snippets. Save, search, and execute your frequently used commands.\n\n![stash screenshot](screenshots/stash-dark-mode.png)\n\n## Features\n\n- Browse and search snippets with fuzzy filtering\n- Copy commands to clipboard or execute directly\n- Usage tracking (sorts by most used)\n- Hand-editable YAML storage\n- Minimal, keyboard-driven interface\n\n## Installation\n\n```bash\ngo install github.com/user/stash@latest\n```\n\nOr build from source:\n\n```bash\ngit clone https://github.com/user/stash\ncd stash\ngo build -o stash .\n```\n\n## Usage\n\nLaunch the TUI:\n\n```bash\nstash\n```\n\nAdd a snippet from the command line:\n\n```bash\nstash add \"docker exec -it container bash\"\n```\n\nThis opens the TUI with the command pre-filled so you can add a description and tags.\n\n## Key Bindings\n\n| Key | Action |\n|-----|--------|\n| `j` / `k` / `↑` / `↓` | Navigate list |\n| `Enter` | Copy snippet to clipboard |\n| `x` | Execute snippet |\n| `a` | Add new snippet |\n| `e` | Edit selected snippet |\n| `d` | Delete (with confirmation) |\n| `/` | Search / filter |\n| `Esc` | Clear filter / cancel |\n| `?` | Toggle help |\n| `q` | Quit |\n\n## Storage\n\nSnippets are stored in `~/.config/stash/snippets.yaml`. The file is human-readable and can be edited directly:\n\n```yaml\nsnippets:\n  - command: \"docker ps -a\"\n    description: \"List all containers\"\n    tags:\n      - docker\n```\n\nOnly `command` is required. All other fields are optional and will be auto-populated:\n\n```yaml\nsnippets:\n  - command: \"git status\"\n  - command: \"docker ps\"\n    description: \"List running containers\"\n```\n\nSee `snippets.example.yaml` for more examples.\n\n## Testing\n\nRun all tests:\n\n```bash\ngo test ./... -v\n```\n\nRun tests with race detection:\n\n```bash\ngo test ./... -v -race\n```\n\nRun tests for a specific package:\n\n```bash\ngo test ./internal/storage/... -v\n```\n\n### Test Coverage\n\n| Package | What's tested |\n|---------|---------------|\n| `internal/model` | Snippet creation, defaults, usage tracking, YAML serialization |\n| `internal/storage` | Load/save, add/update/delete, bounds checks, round-trips, edge cases |\n| `internal/config` | XDG path resolution, directory creation, idempotency |\n| `internal/tui` | Mode transitions, list filtering \u0026 navigation, form input \u0026 submission, detail/confirm/help rendering, key bindings, styles |\n| `cmd` | Shell execution, CLI argument validation, subcommand registration |\n\n### CI\n\nA GitHub Actions workflow runs on every push and pull request:\n\n- **Test** — builds the project and runs all tests with `-race`\n- **Lint** — checks `gofmt` formatting and `go vet`\n\n## Dependencies\n\n- [Bubble Tea](https://github.com/charmbracelet/bubbletea) - TUI framework\n- [Bubbles](https://github.com/charmbracelet/bubbles) - TUI components\n- [Lip Gloss](https://github.com/charmbracelet/lipgloss) - Styling\n- [Cobra](https://github.com/spf13/cobra) - CLI framework\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnlvgl%2Fstash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdnlvgl%2Fstash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnlvgl%2Fstash/lists"}