A TypeScript CLI that uses OpenRouter to answer practical terminal questions.
- Create
.envfrom.env.exampleand insert yourOPENROUTER_API_KEY. - Install dependencies:
pnpm install- Build and link the command:
pnpm run link:global- Add the alias to your shell, for example in
~/.zshrc:
alias '?'='terminal-assistant'Get help for all available commands and options:
# Any of these work:
?
? help
? --help
? -hAsk a standalone question
? how do I find the largest files in this directory
Follow up on the previous question
? -f and how do I delete them in bulk?
Copy the generated command to clipboard Automatically
? -c check the size of the current folder
Pipe error logs into the assistant for explanation
npm run build 2>&1 | ? why is this failing?
Generate raw command to be piped/evaluated
eval $(? --raw extract this tar.gz file)
Use a specific OpenRouter model
? --model openai/gpt-5.2 how do I undo the last commit
Ignore other flags
? -- how do I use find with the --name flag
The default model is openrouter/auto. You can change it using the OPENROUTER_MODEL environment variable or with the --model flag.