Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ask-llm-cli

Describe what you want to do in plain English, get a shell command back. Powered by Claude.

Shell integration demo

It places the suggested command directly on your prompt line so you can review, edit, and press Enter to execute. The command is saved in your shell history.

Prerequisites

  • Node.js >= 18
  • An Anthropic API key set in ASK_LLM_CLI_ANTHROPIC_API_KEY environment variable

Installation

Install globally via npm:

git clone https://github.com/Element9/ask-llm-cli
cd ask-llm-cli
npm install -g

Add this function to your ~/.zshrc:

ask() {
  local cmd
  cmd=$(command ask-llm-cli "$@") || return
  print -z "$cmd"
}

Then reload your shell:

source ~/.zshrc

Usage examples

ask find all TODO comments in this project
ask delete merged git branches
ask compress all PNGs in this directory
ask "show disk usage by directory"

Commands flagged as potentially dangerous by the model are shown with a warning.

About

Describe what you want to do in plain English, get a shell command back.

Resources

Stars

1 star

Watchers

1 watching

Forks

Contributors

Languages