Save, tag, search, and version your best prompts - Interactive CLI with TUI
Project description
Prompt Vault CLI
Dual Python + Go implementation with Docker support
Save, tag, search, and version your best prompts with a unified CLI.
Features
- ๐ Save prompts โ Store with name, tags, and auto-versioning
- ๐ Fuzzy search โ Find prompts by keyword or tag
- ๐ Clipboard copy โ One command to copy prompt ready to paste
- ๐ Version history โ Git-based versioning with diff and revert
- ๐ฆ Export/Import โ Backup and restore your vault
- ๐ Python version โ Typer CLI with Rich output
- ๐น Go version โ Fast single binary, no dependencies
- ๐ณ Docker ready โ Pre-configured containers for both
- ๐ฅ๏ธ Interactive TUI โ Run without arguments for menu-driven interface
Quick Start
Python Version
cd prompt_vault/python
pip install -r requirements.txt
# Interactive TUI (no arguments)
python3 vault_cli.py
# Or use CLI commands
python3 vault_cli.py create --name "my-prompt" --tags "demo,test"
python3 vault_cli.py get "my-prompt"
Go Version
cd prompt_vault/go
go mod download
go build -o vault
# Interactive TUI (no arguments)
./vault
# Or use CLI commands
./vault create --name "my-prompt" --tags "demo,test"
./vault get "my-prompt"
Docker
# Build and run Python version
docker build -f Dockerfile.python -t prompt-vault:python .
docker run -v $(pwd)/data:/app/data prompt-vault:python create --name "my-prompt"
# Build and run Go version
docker build -f Dockerfile.go -t prompt-vault:go .
docker run -v $(pwd)/data:/app/data prompt-vault:go create --name "my-prompt"
# Or use docker-compose
docker-compose run python create --name "my-prompt"
docker-compose run go create --name "my-prompt"
Commands
Run vault without arguments to open the Interactive TUI.
| Command | Python | Go | Description |
|---|---|---|---|
(tui) |
vault_cli.py |
vault |
Interactive menu (default) |
create |
vault_cli.py create -n "name" |
vault create -n "name" |
Create a new prompt |
get |
vault_cli.py get "name" |
vault get "name" |
Get prompt (copies to clipboard) |
search |
vault_cli.py search "query" |
vault search "query" |
Fuzzy search prompts |
list |
vault_cli.py list |
vault list |
List all prompts |
tags |
vault_cli.py tags |
vault tags |
List all tags |
version |
vault_cli.py version "name" |
vault version "name" |
View version history |
export |
vault_cli.py export |
vault export |
Export vault |
import |
vault_cli.py import file.yaml |
vault import file.yaml |
Import prompts |
delete |
vault_cli.py delete "name" |
vault delete "name" |
Delete a prompt |
Interactive TUI
Run without arguments to open the interactive terminal UI:
# Python
python3 vault_cli.py
# Go
./vault
TUI Menu:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Prompt Vault โ
โ Save, tag, search, version prompts โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Main Menu:
1 - List all prompts
2 - Create new prompt
3 - Search prompts
4 - View tags
5 - Get prompt (copy to clipboard)
6 - Delete prompt
q - Quit
Navigate with number keys, enter text when prompted, and press Enter to continue between screens.
Examples
Create a prompt with tags
# Python
python vault_cli.py create --name "code-review" --tags "code,review,analysis"
# Go
./vault create --name "code-review" --tags "code,review,analysis"
Get a prompt (copies to clipboard)
# Python
python vault_cli.py get "code-review"
# Go
./vault get "code-review"
Search prompts
# Python
python vault_cli.py search "code analysis"
python vault_cli.py search --tag "python"
# Go
./vault search "code analysis"
./vault search --tag "python"
View version history
# Python
python vault_cli.py version "code-review"
python vault_cli.py version "code-review" --revert 2
# Go
./vault version "code-review"
./vault version "code-review" --revert 2
Export/Import backup
# Export
python vault_cli.py export --output backup.yaml
./vault export --output backup.yaml
# Import
python vault_cli.py import backup.yaml
./vault import backup.yaml
Architecture
prompt_vault/
โโโ python/ # Python implementation
โ โโโ vault_cli.py # Main CLI entry (Typer)
โ โโโ core/
โ โ โโโ vault.py # CRUD operations (SQLite)
โ โ โโโ search.py # Fuzzy search (thefuzz)
โ โ โโโ versioning.py # Git versioning (GitPython)
โ โ โโโ config.py # Config handling (TOML/YAML)
โ โโโ utils/
โ โ โโโ clipboard.py # Cross-platform clipboard
โ โ โโโ output.py # Rich formatting
โ โโโ tests/
โ โโโ test_vault.py # Unit tests
โ
โโโ go/ # Go implementation
โ โโโ main.go # Main entry
โ โโโ cmd/ # Cobra commands
โ โ โโโ root.go
โ โ โโโ create.go
โ โ โโโ get.go
โ โ โโโ ...
โ โโโ internal/vault/ # Core logic
โ โโโ vault.go # CRUD (SQLite)
โ โโโ search.go # Fuzzy search
โ โโโ versioning.go # Version management
โ
โโโ data/ # Shared data directory
โโโ prompts.db # SQLite database
โโโ versions/ # Version history
Configuration
Environment Variables
| Variable | Description | Default |
|---|---|---|
PROMPT_VAULT_DATA |
Data directory | ~/.prompt_vault |
PROMPT_VAULT_CONFIG |
Config file path | ~/.prompt_vault/config.toml |
Config File (TOML)
data_dir = "~/.prompt_vault"
default_tags = ["general"]
auto_copy = true
auto_version = true
search_limit = 10
list_limit = 50
Running Tests
Python
cd prompt_vault/python
pip install pytest
pytest tests/ -v
Go
cd prompt_vault/go
go test ./internal/vault/ -v
Performance Comparison
| Operation | Python | Go |
|---|---|---|
| Startup time | ~200ms | ~10ms |
| Create prompt | ~50ms | ~5ms |
| Search (1000 prompts) | ~100ms | ~10ms |
| Binary size | N/A | ~15MB |
License
MIT
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests for both Python and Go
- Submit a pull request
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file prompt_vault_cli-0.1.0.tar.gz.
File metadata
- Download URL: prompt_vault_cli-0.1.0.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7dd5d6a62da4f5a38cac530b400b7fa9b9957992e9614c8133619efb961ac911
|
|
| MD5 |
672aeb763af7b9044519e11edec3934b
|
|
| BLAKE2b-256 |
07de6089d8d56d8952b78ed5c9ec6f173c1586d311077581ac1670e591fae6d8
|
File details
Details for the file prompt_vault_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: prompt_vault_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f2af56cebc2df5cd2251cbb57305b9150f83596d09554bc59e44e16ae203626
|
|
| MD5 |
e18195063f593b67d8c65c08456acefe
|
|
| BLAKE2b-256 |
6612b3fad901a1deb59841157dacf70ab3cefc6c58d5b37d6b6f072a2ffb3510
|