CommandOK
Spotlight-like command generator for your terminal. Pops up when you need it, gets out of the way when you don't.
Install / Use
/learn @64bit/CommandOKREADME
⌘OK

commandOK
commandOK is a Spotlight-like command generator for your terminal. Pops up when you need it and gets out of the way when you don't.
Built with Ratatui and powered by your choice of public, private or local LLM provider.
WARN: you must always verify the generated command before accepting it
Install
brew install 64bit/tap/commandok
OR
cargo install commandok
Setup
On first run, a default config is created at ~/.commandok/config.toml. Add your API key for at least one provider:
[commandok]
# Options: anthropic, openai, google, mistral, ollama,
# openrouter, xai, vercel_ai_gateway, litert_lm
provider = "anthropic"
system_prompt = """\
You are a terminal command generator. Given a natural language description, output ONLY \
the shell command appropriate for the user's OS and shell. No explanation, no markdown, no code blocks, \
no backticks. Just the raw command.\
"""
[anthropic]
api_key = ""
model = "claude-opus-4-6"
[openai]
api_key = ""
model = "gpt-5.4"
[google]
api_key = ""
model = "gemini-3-flash-preview"
[mistral]
api_key = ""
model = "mistral-small-latest"
# api_url = "https://api.mistral.ai/v1" # default
[ollama]
model = "gemma3:1b"
# api_url = "http://localhost:11434" # default, change if running elsewhere
[openrouter]
api_key = ""
model = "qwen/qwen3.6-plus:free"
# api_url = "https://openrouter.ai/api/v1" # default
[xai]
api_key = ""
model = "grok-4.20-0309-reasoning"
# api_url = "https://api.x.ai/v1" # default
[vercel_ai_gateway]
api_key = ""
model = "google/gemini-3-flash"
# api_url = "https://ai-gateway.vercel.sh/v1" # default
[litert_lm]
model = "gemma-4-E2B-it.litertlm"
huggingface_repo = "litert-community/gemma-4-E2B-it-litert-lm"
Usage
Run commandok in any terminal. A search bar appears inline below your cursor.
- Type a natural language description of the command you need
- Press Enter -- the command streams in token-by-token
- Press Enter again to accept (injects the command into your shell) or Esc to cancel
Keybindings
| Key | Action | |-----|--------| | Enter | Submit prompt / Accept generated command | | Esc | Cancel and dismiss | | Shift+Tab | Cycle through configured providers | | Up / Down | Browse prompt history | | Ctrl+U | Clear input line | | Ctrl+C | Quit | | Left / Right / Home / End | Move cursor |
Adding a new provider
- Create
src/provider/yourprovider.rswith apub async fn stream(...)function - Add
pub mod yourprovider;tosrc/provider/mod.rs - Add a variant to the
Providerenum and wire it infrom_name()/stream() - Add the section to
Configinsrc/config.rsandPROVIDER_ORDER
License
MIT
Related Skills
node-connect
353.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
353.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
353.3kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
