A terminal UI for organizing and quickly accessing your shell commands. Browse, search, and select commands from a categorized list — then paste them directly into your shell prompt.
Download the latest binary for your platform from Releases:
# Linux (amd64)
curl -Lo /usr/local/bin/tb https://github.com/0xDones/terminal-buddy/releases/latest/download/tb_linux_amd64
chmod +x /usr/local/bin/tb
# macOS (Apple Silicon)
curl -Lo /usr/local/bin/tb https://github.com/0xDones/terminal-buddy/releases/latest/download/tb_darwin_arm64
chmod +x /usr/local/bin/tbRequires Go 1.25.6+ and Make.
git clone https://github.com/0xDones/terminal-buddy.git && cd terminal-buddy
make buildThe binary version is derived automatically from git tags (git describe --tags).
Launch the TUI:
tbCheck version:
tb version| Key | Action |
|---|---|
↑/k ↓/j |
Navigate commands |
Tab / Shift+Tab |
Switch category tabs |
/ |
Search |
Enter |
Select command (exits and prefills your prompt) |
c |
Copy highlighted command to clipboard (stays in TUI) |
n |
Create new command |
e |
Edit selected command |
d |
Delete selected command |
q / Ctrl+C |
Quit |
All keybindings are customizable — see Configuration.
Shell integration is required for tb to work properly. Without it, selected commands are only printed to stdout instead of being placed on your command line. Adding the init line below gives you two things:
Ctrl+Okeybind — openstbfrom anywhere in your prompt, selected command is inserted at the cursor.tbwrapper function — typingtbdirectly also prefills your prompt with the selected command (zsh usesprint -z, bash adds to history, fish usescommandline).
Add to ~/.bashrc:
eval "$(tb init bash)"Add to ~/.zshrc:
eval "$(tb init zsh)"Add to ~/.config/fish/config.fish:
tb init fish | sourceThe default binding is Ctrl+O. Override it with the TB_KEYBINDING environment variable:
# Bash/Zsh — bind to Ctrl+K instead
export TB_KEYBINDING='\C-k' # bash
export TB_KEYBINDING='^K' # zsh
# Fish
set -gx TB_KEYBINDING \ckCommands are stored in ~/.tb.yaml. On first run, a default file is created with example commands. You can edit it directly or manage commands through the TUI.
commands:
- name: flush-dns
description: Flush macOS DNS cache
command: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
category: network
- name: docker-prune
description: Remove all stopped containers, dangling images, and unused networks
command: docker system prune -af
category: docker
- name: git-undo
description: Undo last commit keeping changes staged
command: git reset --soft HEAD~1
category: gitEach command has four fields:
| Field | Required | Description |
|---|---|---|
name |
Yes | Short identifier shown in the list |
command |
Yes | The shell command to run |
description |
No | Longer explanation shown in the detail pane |
category |
No | Used for tab-based filtering |
Override default key mappings by adding a keybindings section to ~/.tb.yaml. Only the keys you want to change need to be specified — omitted keys keep their defaults.
keybindings:
up: ["up", "k"]
down: ["down", "j"]
next_tab: ["tab"]
prev_tab: ["shift+tab"]
search: ["/"]
clear_esc: ["esc"]
select: ["enter"]
copy: ["c"]
quit: ["q", "ctrl+c"]
create: ["n"]
edit: ["e"]
delete: ["d"]Keys use BubbleTea key identifiers: "up", "down", "tab", "shift+tab", "enter", "esc", "ctrl+c", or any single character like "k", "/", "q".
- Shell integration (strongly recommended): See Shell Integration. Without it,
tbcan only print the selected command to stdout. - Clipboard (optional): On Linux,
xcliporxselmust be installed for thec(copy) key to work. macOS and Windows work out of the box.
