A fast, interactive terminal application for displaying keyboard shortcuts and command cheat sheets
cheat-go is a modern Terminal User Interface (TUI) application built with Go that provides an interactive way to browse and reference keyboard shortcuts for popular applications. It features a clean, navigable table interface that displays shortcuts across multiple applications simultaneously, making it easy to compare and learn commands.
- 🚀 Fast & Lightweight - Built with Go for minimal resource usage
- 🎨 Beautiful TUI - Modern terminal interface with multiple themes and table styles
- ⌨️ Vim-style Navigation - Support for both arrow keys and hjkl movement
- 🔍 Interactive Search - Real-time search through shortcuts and descriptions with highlighting
- 🎯 App Filtering - Select specific applications to focus on with visual interface
- ⌨️ Rich Keyboard Shortcuts - Comprehensive hotkey system with built-in help
- 📦 Configurable - YAML-based configuration with sensible defaults
- 🔧 Extensible - Plugin system for custom extensions and integrations
- 🌐 Unicode Support - Full support for international characters and emojis
- 📊 Multiple Views - Tabular display across multiple applications
- 🎭 Multiple Themes - Default, dark, light, and minimal theme options
- 📋 Table Styles - Simple, rounded, bold, and minimal table styles
- 🔌 Plugin Architecture - Extensible plugin system for custom functionality (press
p) - 🌍 Community Integration - Download and share cheat sheets from online repositories (press
o) - 📝 Personal Notes - Create and manage personal notes with shortcuts (press
n) - ☁️ Cloud Sync - Synchronize your data across multiple devices (press
s) - ⚡ Performance Cache - Multi-level caching for optimal performance (automatic)
- 🔄 Auto-sync - Automatic synchronization with conflict resolution (press
Ctrl+Sto force)
Out of the box, cheat-go includes shortcuts for:
- vim - Vi IMproved text editor
- zsh - Z Shell
- dwm - Dynamic window manager
- st - Simple terminal
- lf - Terminal file manager
- zathura - Document viewer
Shortcut │ vim │ zsh │ dwm │ st │ lf │ zathura
──────────┼─────────┼────────────────┼─────────────┼──────────┼─────────┼──────────
k │ ↑ move │ up history │ focus up │ ↑ scroll │ up │ scroll ↑
j │ ↓ move │ down history │ focus down │ ↓ scroll │ down │ scroll ↓
h │ ← move │ back char │ focus left │ ← move │ left │ scroll ←
l │ → move │ forward char │ focus right │ → move │ right │ scroll →
/ │ search │ search history │ - │ search │ search │ search
q │ quit │ exit │ close win │ exit │ quit │ quit
Arrow keys/hjkl: move • /: search • f: filter • Ctrl+R: refresh • ?: help • q: quit
Shortcut │ vim │ zsh │ dwm │ st │ lf │ zathura
──────────┼─────────┼────────────────┼─────────────┼──────────┼─────────┼──────────
k │ ↑ MOVE │ up history │ focus up │ ↑ scroll │ up │ scroll ↑
j │ ↓ MOVE │ down history │ focus down │ ↓ scroll │ down │ scroll ↓
Search: move_
Type to search, Enter to confirm, Esc to cancel
Filter Apps: [1] ✓vim [2] ✓zsh [3] dwm [4] st [5] lf [6] zathura
1-9: toggle apps, a: all, c: clear, Enter: apply, Esc: cancel
- Go 1.22+ - Download and install Go
- Terminal with Unicode support (most modern terminals)
- Text Editor (optional) - For notes editing functionality
- Set
$EDITORenvironment variable to your preferred editor (vim, nano, emacs, code, etc.) - If not set, defaults to
nano
- Set
# Clone the repository
git clone https://github.com/remuscazacu/cheat-go.git
cd cheat-go
# Build and install
go build -o cheat-go .
sudo mv cheat-go /usr/local/bin/
# Or install directly with go install
go install .# Download the latest release (replace with actual release URL)
curl -L -o cheat-go https://github.com/remuscazacu/cheat-go/releases/latest/download/cheat-go
chmod +x cheat-go
sudo mv cheat-go /usr/local/bin/git clone https://github.com/remuscazacu/cheat-go.git
cd cheat-go
go build .
./cheat-goSimply run the application:
cheat-goSimply use the keyboard shortcuts in the main application:
- Press
nto open the Notes Manager - Create and manage personal notes - Press
pto open the Plugin Manager - View and manage installed plugins - Press
oto browse Online Repositories - Discover and download community cheat sheets - Press
sto view Sync Status - Monitor cloud synchronization - Press
Ctrl+Sto Force Sync - Manually trigger synchronization
Each view has its own set of keyboard shortcuts displayed at the bottom of the screen.
The Notes Manager provides a full-featured personal notes system with the following capabilities:
Note Creation:
- Press
nto create a new note with auto-generated timestamp title - Notes include title, content, category, and tags
- Default category is "general" with "new" tag
Note Editing:
- Press
eto edit notes in your default editor (✅ Fixed in Phase 4) - Uses
$EDITORenvironment variable (falls back tonano) - Opens with structured content format for easy editing:
# Title: Your Note Title # Category: general # Tags: tag1, tag2 Your note content here... - Edit any field including title, category, tags, and content
- Changes are saved automatically when editor exits
- Works with vim, nano, emacs, VS Code, Sublime Text, and any terminal editor
- Supports both terminal and GUI editors that accept file arguments
Note Management:
- Press
dto delete selected note - Press
fto toggle favorite status - Navigate with arrow keys or
j/k(vim-style) - Visual indicators show favorites and categories
n- Create new note with timestamp-based titlee- Edit selected note in default editor (✅ Fixed: opens $EDITOR or nano)d- Delete selected notef- Toggle favorite statusup/down, j/k- Navigate notes listesc/q- Return to main view
Recent Fix: The edit functionality now properly opens your default editor instead of just appending text. This provides a full editing experience with syntax highlighting, vim/emacs bindings, and your preferred editor features.
l- Load selected pluginu- Unload selected pluginr- Reload all pluginsup/down, j/k- Navigate plugins listesc/q- Return to main view
enter- Browse repository or download sheetd- Download selected cheat sheet/- Search online repositoriesup/down, j/k- Navigate repositories listesc/q- Return to main view
s- Trigger sync nowr- Resolve pending conflictsa- Toggle auto-sync enabled/disabledup/down, j/k- Navigate sync itemsesc/q- Return to main view
cheat-go includes powerful search capabilities to help you find shortcuts quickly:
- Press
/to enter search mode - Type your query to search through shortcut keys, descriptions, and categories
- Matched terms are highlighted in the results for easy identification
- Press Enter to confirm search and exit search mode
- Press Esc to cancel search and return to full table
Focus on specific applications by filtering the displayed columns:
- Press
fto enter filter mode - Use number keys (1-9) to toggle individual applications
- Press
ato select all applications - Press
cto clear all selections - Press Enter to apply the filter
- Press Esc to cancel and return to previous state
- Press
?at any time to see the comprehensive help screen - The help screen shows all available keyboard shortcuts organized by category
- Press
?orEscto close the help screen
- Arrow Keys or hjkl - Navigate through the table
- q or Ctrl+C - Quit the application
- / - Enter search mode
- f - Enter filter mode
- ? - Show help screen
| Category | Key | Action |
|---|---|---|
| Navigation | ↑ / k |
Move cursor up |
↓ / j |
Move cursor down | |
← / h |
Move cursor left | |
→ / l |
Move cursor right | |
Home / Ctrl+A |
Go to first row | |
End / Ctrl+E |
Go to last row | |
| Search | / |
Enter search mode |
Enter |
Confirm search | |
Esc |
Exit search / clear filters | |
Backspace |
Delete character | |
Ctrl+U |
Clear search query | |
| Filtering | f / Ctrl+F |
Enter filter mode |
1-9 |
Toggle app selection | |
a |
Select all apps | |
c |
Clear all selections | |
Enter |
Apply filter | |
Esc |
Cancel filter | |
| Phase 4 Features | n |
Open notes manager |
p |
Plugin manager | |
s |
Sync status | |
o |
Browse online repos | |
Ctrl+S |
Force sync | |
| General | Ctrl+R |
Refresh data |
? |
Show/hide help | |
q / Ctrl+C |
Quit application |
cheat-go supports configuration through YAML files. The application looks for configuration files in the following order:
~/.config/cheat-go/config.yaml~/.cheat-go.yaml./config.yaml(current directory)
# ~/.config/cheat-go/config.yaml
apps:
- vim
- zsh
- dwm
- st
- lf
- zathura
theme: default # or "dark"
layout:
columns:
- shortcut
- description
show_categories: false
table_style: simple
max_width: 120
keybinds:
quit: q
up: k
down: j
left: h
right: l
search: /
next_app: tab
prev_app: shift+tab
data_dir: ~/.config/cheat-go/apps
# New Phase 4 configuration options
plugins:
enabled: true
dirs:
- ~/.config/cheat-go/plugins
- /usr/local/share/cheat-go/plugins
sync:
enabled: true
service: cloud # or "local"
endpoint: https://sync.cheatsheets.com
auto_sync: true
interval: 15m
cache:
enabled: true
memory_size: 10485760 # 10MB
disk_cache: ~/.cache/cheat-go
community:
repositories:
- https://github.com/cheat-go/community
- https://github.com/awesome/cheatsheets
auto_update: true
# Editor configuration for notes
editor:
default: nano # fallback if $EDITOR not set
temp_prefix: cheat-go-note-
backup: trueTo use the notes editing feature effectively, configure your preferred editor:
# Set your preferred editor (choose one)
export EDITOR=vim # Vim
export EDITOR=nano # Nano (default)
export EDITOR=emacs # Emacs
export EDITOR=code # VS Code
export EDITOR=subl # Sublime Text
# Add to your shell profile for persistence
echo 'export EDITOR=vim' >> ~/.bashrc # Bash
echo 'export EDITOR=vim' >> ~/.zshrc # ZshYou can add custom applications by creating YAML files in your data directory:
# ~/.config/cheat-go/apps/tmux.yaml
name: tmux
description: Terminal multiplexer
version: "1.0"
categories:
- terminal
- multiplexer
shortcuts:
- keys: "Ctrl+b"
description: "prefix key"
category: "general"
- keys: "Ctrl+b c"
description: "new window"
category: "window"
- keys: "Ctrl+b d"
description: "detach session"
category: "session"cheat-go is built with a clean, modular architecture:
cheat-go/
├── main.go # Application entry point
├── pkg/
│ ├── apps/ # Application registry and data management
│ │ ├── types.go # Data structures
│ │ └── registry.go # App loading and management
│ ├── config/ # Configuration management
│ │ ├── types.go # Config structures
│ │ └── loader.go # Config loading and validation
│ ├── ui/ # User interface components
│ │ ├── table.go # Table rendering
│ │ └── theme.go # Themes and styling
│ ├── plugins/ # Plugin system (NEW)
│ │ ├── types.go # Plugin interfaces
│ │ ├── loader.go # Plugin loading
│ │ └── builtin.go # Built-in plugins
│ ├── online/ # Community integration (NEW)
│ │ ├── types.go # Online data structures
│ │ └── client.go # HTTP client for repositories
│ ├── notes/ # Personal notes (NEW)
│ │ ├── types.go # Note structures
│ │ └── manager.go # Note management
│ ├── sync/ # Cloud sync (NEW)
│ │ └── sync.go # Synchronization logic
│ └── cache/ # Performance cache (NEW)
│ └── cache.go # Multi-level caching
└── *_test.go # Comprehensive test suite
- Apps Package - Manages application definitions and shortcut data
- Config Package - Handles configuration loading and validation
- UI Package - Provides table rendering and theming capabilities
- Plugins Package - Extensible plugin system for custom functionality
- Online Package - Community cheat sheet repository integration
- Notes Package - Personal notes and custom shortcuts management
- Sync Package - Cross-platform cloud synchronization
- Cache Package - Multi-level caching for performance
- Main - Coordinates the TUI application using Bubble Tea
- Go 1.22+
- Git
# Clone and enter directory
git clone https://github.com/remuscazacu/cheat-go.git
cd cheat-go
# Install dependencies
go mod download
# Build
go build .
# Run
./cheat-goThe project includes a comprehensive test suite with 70.2% overall coverage:
- pkg/notes: 90.7% - Full note management functionality
- pkg/config: 91.3% - Configuration loading and validation
- pkg/apps: 93.6% - Application registry and data management
- pkg/online: 85.9% - Community integration features
- pkg/ui: 90.2% - Table rendering and themes
- main package: 60.4% - TUI application logic
- pkg/cache: 46.1% - Performance caching
- pkg/sync: 43.7% - Cloud synchronization
# Run all tests
go test ./...
# Run tests with coverage
go test ./... -cover
# Run specific package tests
go test ./pkg/notes -v
go test ./pkg/config -v
# Run tests with race detection
go test ./... -race
# Generate coverage report
go test ./... -coverprofile=coverage.out
go tool cover -html=coverage.out -o coverage.html
# Test notes manager editor functionality (new)
go test -v -run TestOpenEditorForNote
# Test all notes manager features
go test ./pkg/notes -v- ✅ Added editor functionality tests for notes manager (
TestOpenEditorForNote) - ✅ Enhanced error handling tests across all packages
- ✅ Improved validation tests for config and apps packages
- ✅ Added edge case coverage for file operations
- ✅ Comprehensive integration tests for main application
- ✅ Fixed notes manager editor bug with proper external editor integration
- ✅ Achieved 90%+ coverage in core packages (notes, config, apps, online, ui)
# Format code
go fmt ./...
# Run static analysis
go vet ./...
# Run linter (if golangci-lint is installed)
golangci-lint runcheat-go/
├── README.md # This file
├── main.go # Application entry point and TUI
├── go.mod # Go module definition
├── go.sum # Dependency checksums
├── TEST_SUMMARY.md # Test coverage documentation
├── AGENTS.md # Development guidelines
├── docs/ # Documentation
│ ├── ARCHITECTURE_ANALYSIS.md # Architecture overview
│ ├── PHASE_4_IMPLEMENTATION.md # Phase 4 feature docs
│ └── PHASE_4_TUI_INTEGRATION.md # TUI integration guide
├── examples/ # Example configurations
│ ├── config.yaml # Sample config file
│ └── apps/ # Sample app definitions
│ ├── vim.yaml
│ ├── zsh.yaml
│ └── ...
├── pkg/
│ ├── apps/ # Application registry (93.6% coverage)
│ │ ├── types.go # App and shortcut structures
│ │ ├── registry.go # App loading and management
│ │ ├── types_test.go # Type validation tests
│ │ ├── registry_test.go # Registry functionality tests
│ │ └── registry_edge_test.go # Edge case coverage
│ ├── config/ # Configuration system (91.3% coverage)
│ │ ├── types.go # Config structures
│ │ ├── loader.go # Config loading and validation
│ │ ├── types_test.go # Config structure tests
│ │ ├── loader_test.go # Loader functionality tests
│ │ └── loader_edge_test.go # Error handling tests
│ ├── notes/ # Personal notes system (90.7% coverage)
│ │ ├── types.go # Note data structures
│ │ ├── manager.go # Note CRUD and management
│ │ └── manager_test.go # Comprehensive note tests
│ ├── online/ # Community integration (85.9% coverage)
│ │ ├── types.go # Online repository structures
│ │ ├── client.go # HTTP client for repositories
│ │ └── client_test.go # Client and mock tests
│ ├── plugins/ # Plugin system
│ │ ├── types.go # Plugin interfaces
│ │ ├── loader.go # Plugin loading logic
│ │ ├── builtin.go # Built-in plugins
│ │ └── loader_test.go # Plugin system tests
│ ├── sync/ # Cloud synchronization (43.7% coverage)
│ │ ├── sync.go # Sync logic and conflict resolution
│ │ └── sync_test.go # Sync functionality tests
│ ├── cache/ # Performance caching (46.1% coverage)
│ │ ├── cache.go # LRU cache implementation
│ │ └── cache_test.go # Cache functionality tests
│ └── ui/ # User interface (90.2% coverage)
│ ├── table.go # Table rendering engine
│ ├── theme.go # Theme and styling
│ ├── table_test.go # Table rendering tests
│ └── theme_test.go # Theme system tests
├── main_test.go # Integration tests (60.4% coverage)
├── main_edge_test.go # Additional edge case tests
└── coverage.html # Test coverage report
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for new functionality
- Ensure tests pass (
go test ./...) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow standard Go conventions
- Write tests for new functionality
- Maintain or improve test coverage
- Use meaningful commit messages
- Update documentation as needed
- Search functionality within shortcuts
- Interactive search with highlighting
- App filtering and selection
- Comprehensive keyboard shortcuts
- Multiple theme support (default, dark, light, minimal)
- Multiple table styles (simple, rounded, bold, minimal)
- Built-in help system
- Plugin system for external applications (Phase 4)
- Community repository integration (Phase 4)
- Personal notes system with editor integration (Phase 4)
- Cloud synchronization with conflict resolution (Phase 4)
- Performance caching with LRU eviction (Phase 4)
- Export functionality (JSON, Markdown via plugins)
- Notes editor with $EDITOR support and structured editing (✅ Fixed editor bug)
- Comprehensive test suite with 70.2% coverage and 90%+ in core packages
- Editor integration tests for notes management functionality
- Custom key bindings configuration
- Interactive tutorial mode
- Fuzzy search across applications
- Shortcut categories and advanced filtering
- Application profiles (work, gaming, etc.)
- Search history and saved searches
- Web interface for remote access
- Mobile companion apps
- AI-powered shortcut suggestions
- Team collaboration features
- v0.1.0 - Initial release with basic TUI functionality
- v0.2.0 - Added configuration system and custom apps
- v0.3.0 - Comprehensive test suite and improved error handling
- v0.4.0 - Enhanced UI with multiple table styles and improved themes
- v0.5.0 - Interactive search, app filtering, and comprehensive keyboard shortcuts
- v1.0.0-phase4 - Phase 4: Full TUI integration with plugins, notes (editor support), online repos, sync, and caching
- ✅ Fixed editor bug: Notes editor now properly opens external editor ($EDITOR or nano)
- ✅ Added comprehensive editor tests: Full test coverage for editor functionality
- ✅ Enhanced keyboard shortcuts: Complete Phase 4 TUI integration with intuitive navigation
- ✅ Achieved 70.2% overall test coverage with 90%+ coverage in core packages:
- pkg/notes: 90.7% (includes new editor tests)
- pkg/config: 91.3%
- pkg/apps: 93.6%
- pkg/online: 85.9%
- pkg/ui: 90.2%
- ✅ Structured note editing: Title, category, tags, and content in user's preferred editor
- ✅ Improved error handling: Better user feedback and graceful failure handling
Q: Application doesn't start
- Ensure Go 1.22+ is installed
- Check terminal Unicode support
- Verify binary permissions
Q: Configuration not loading
- Check YAML syntax in config files
- Verify file permissions
- Use absolute paths for custom data directories
Q: Display issues in terminal
- Ensure terminal supports Unicode
- Try different themes:
default,dark,light, orminimal - Try different table styles:
simple,rounded,bold, orminimal - Check terminal size (minimum 80x24 recommended)
- Use
cheat-go --helpto see all available options
Q: Search not finding results
- Search is case-insensitive and searches keys, descriptions, and categories
- Try shorter search terms or partial matches
- Use Esc to clear filters and return to full table
- Press ? for help with search keyboard shortcuts
Q: Notes editor not working
- ✅ Recently Fixed: Editor now properly opens external editor (Phase 4 update)
- Ensure
$EDITORenvironment variable is set:echo $EDITOR - If not set, it defaults to
nano- ensure nano is installed:which nano - Test your editor manually:
$EDITOR test.txtornano test.txt - Supported editors: vim, nano, emacs, code, subl, micro, helix, and most terminal editors
- For GUI editors: Ensure they support command-line file opening (e.g.,
code --wait) - Example setup:
export EDITOR="vim"orexport EDITOR="code --wait" - Troubleshooting:
- Run
go test -v -run TestOpenEditorForNoteto test editor integration - Check file permissions in
~/.config/cheat-go/directory - Verify editor accepts file arguments:
your-editor --help
- Run
Q: Phase 4 features not working
- Ensure you have proper file permissions in
~/.config/cheat-go/ - Check internet connection for online repository features
- Verify plugin directories exist and are readable
- Use
Ctrl+Sto force sync if cloud sync appears stuck
Please report issues on GitHub Issues with:
- Operating system and version
- Go version (
go version) - Terminal emulator
- Steps to reproduce
- Expected vs actual behavior
This project is licensed under the MIT License - see the LICENSE file for details.
- Charm for the excellent Bubble Tea TUI framework and Lipgloss styling
- mattn/go-runewidth for Unicode width calculations
- Go community for the robust standard library and tooling
- Contributors and users who provide feedback and improvements
- 📖 Documentation: Check this README and inline code comments
- 🐛 Bug Reports: GitHub Issues
- 💬 Discussions: GitHub Discussions
- 📧 Contact: Project maintainer
⭐ Star this repository if you find it helpful!
Made with ❤️ and Go