Skip to content

itcaat/cli-stash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cli-stash

A terminal UI application for saving and recalling shell commands, built with Bubble Tea.

Example

Features

  • Save commands - Browse shell history and save with Ctrl+A
  • Fuzzy search - Quickly find saved commands with real-time filtering
  • Smart sorting - Commands sorted by usage frequency
  • Interactive UI - Navigate with arrow keys, select with Enter

Installation

Homebrew (macOS/Linux)

brew install itcaat/tap/cli-stash

Go Install

go install github.com/itcaat/cli-stash@latest

From Source

git clone https://github.com/itcaat/cli-stash.git
cd cli-stash
go build -o cli-stash .
sudo mv cli-stash /usr/local/bin/

Usage

Recall a Command

cli-stash

This opens an interactive UI where you can:

  • Type to filter commands
  • Use ↑/↓ to navigate
  • Press Enter to select (command is inserted into terminal)
  • Press Ctrl+A to add from shell history
  • Press Ctrl+D to delete a command
  • Press Esc to cancel

Add a Command

Press Ctrl+A in the main view to browse your shell history. Type to filter, then press Enter to save the selected command.

Also you can add few commands using add param. This change improves the usability of cli-stash and makes it a more powerful tool for managing shell commands:

# Bulk add commands
cli-stash add "echo 'hello world'" "ls -la"
cli-stash add --bulk "git status, docker ps, kubectl get pods"

# Add commands from a file
cli-stash add --file commands.txt

List All Commands

cli-stash list

How It Works

When you select a command, it's automatically inserted into your terminal prompt. Just press Enter to execute it, or edit it first.

Commands are sorted by usage frequency - most used commands appear first.

Keybindings

Key Action
↑ / ↓ Navigate
Enter Select/Save
Ctrl+A Browse shell history
Ctrl+E Edit command
Ctrl+D Delete command
Esc Cancel / Back

Storage

Commands are stored in ~/.stash/commands.json.

License

MIT

About

Terminal UI for saving and recalling shell commands

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages