Shell Command Bookmarker
TIP: Checkout related projects of this suite

1. Excerpt
[!WARNING]
Beta Version available, not fully tested !
| Dark theme |
Light theme |
 |
 |
This tool provides a terminal-based user interface (TUI) for managing and
organizing shell commands. It allows users to:
- Save frequently used shell commands as bookmarks
- Categorize commands with tags
- Search through saved commands quickly
- Execute saved commands directly from the interface
The application uses the Bubbletea framework to create an interactive terminal
UI with features like:
- Tab-based navigation
- Keyboard shortcuts
- Focus management between different UI components
- Command organization and filtering
- Persistent storage using SQLite for saving bookmarks and tags
- Shell integration (Bash/Zsh) for easy command execution
- Open source under the MIT License
This tool is part of a larger suite of Bash productivity tools designed to
enhance shell workflows and command management.
2. Features
- Bookmark Commands: Save frequently used shell commands for quick access.
- Tagging System: Organize commands with tags for easy categorization.
- Search Functionality: Quickly find commands using a search bar.
- Command Execution: Execute saved commands directly from the interface.
- Keyboard Shortcuts: Use keyboard shortcuts for efficient navigation and
command execution.
- Persistent Storage: Save bookmarks and tags to a SQLite database for
persistence across sessions.
- Shell Integration: Easily paste commands into the shell prompt using
keyboard shortcuts.
- Cross-Platform Compatibility: Works on any terminal that supports the
Bubbletea framework.
- Open Source: Licensed under the MIT License, allowing for free use and
modification.
3. Development
3.1. Go Libraries used
go install golang.org/x/tools/cmd/goimports@latest
3.3. Pre-commit hook
This repository uses pre-commit software to ensure every commits respects a set
of rules specified by the .pre-commit-config.yaml file. It supposes pre-commit
software is installed in your environment.
You also have to execute the following command to enable it:
pre-commit install --hook-type pre-commit --hook-type pre-push
Now each time you commit or push, some linters/compilation tools are launched
automatically
go install github.com/securego/gosec/v2/cmd/gosec@latest
go install github.com/OpenPeeDeeP/depguard/cmd/depguard@latest
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/go-delve/delve/cmd/dlv@latest
go install github.com/dkorunic/betteralign/cmd/betteralign@latest
go install github.com/go-critic/go-critic/cmd/go-critic@latest
go install -v github.com/go-critic/go-critic/cmd/gocritic@latest
3.5. detect dead code
go install golang.org/x/tools/cmd/deadcode@latest
deadcode -filter "github.com/fchastanet/shell-command-bookmarker" ./app/main.go
3.6. Build/run/clean
Formatting is managed exclusively by pre-commit hooks.
3.6.1. Build
.build/build-docker.sh
.build/build-local.sh
3.6.2. Tests
.build/test.sh
3.6.3. Coverage
.build/coverage.sh
3.6.4. run the binary
.build/run.sh
3.6.5. Clean
.build/clean.sh
4. Commands
Run the project
HISTFILE=~/.bash_history go run -tags "sqlite_fts5" ./app/main.go -d
5. Resources