A drop-in replacement for the recently deprecated gh-copilot with multi-provider support. Generate shell commands with natural language and get detailed explanation.
demo.mp4
npm install -g cmdly- Configure your AI provider:
cmdly configure- Get command suggestions:
cmdly suggest "find all typescript files modified in the last week"- Explain complex commands:
cmdly explain "find . -name '*.ts' -type f -mtime -7"💡 Pro Tip: Create shell alias for easier access:
alias cm='cmdly' # or cly
Generate command suggestions from natural language descriptions.
Usage:
cmdly suggest [prompt] [options]Arguments:
prompt(optional) - Natural language description of what you want to do. If omitted, you'll be prompted interactively.
Options:
-t, --target <type>- Target command type:shell(default) orgit
Examples:
# Interactive mode
cmdly suggest
# Direct prompt
cmdly suggest "list all processes using port 3000"
# Direct prompt with target
cmdly suggest "show diff for the last merge commit" --target gitInteractive Actions:
After receiving a suggestion, you can:
- Run - Execute the command immediately
- Revise - Refine the suggestion with additional context
- Explain - Get a detailed breakdown of how the command works
- Copy - Copy the command to your clipboard
- Cancel - Exit without taking action
Example Session:
$ cmdly suggest "find large files over 100MB"
find . -type f -size +100M
? What would you like to do? (Use arrow keys)
❯ Run
Revise
Explain
Copy
CancelGet detailed explanations of shell commands with component breakdowns.
Usage:
cmdly explain [command]Arguments:
command(optional) - The command to explain. If omitted, you'll be prompted to enter one.
Examples:
# Interactive mode
cmdly explain
# Direct command
cmdly explain "tar -xzf archive.tar.gz -C /destination"Example Output:
$ cmdly explain "rm -rf /tmp/cache"
## Summary
Recursively deletes the /tmp/cache directory and all its contents without
prompting for confirmation.
## Breakdown
• `rm`: The remove command, used to delete files and directories
• `-r` (recursive): Deletes directories and all their contents
• `-f` (force): Skips confirmation prompts
• `/tmp/cache`: The target directory path to be deletedSet up or update your preferences and authentication.
Usage:
cmdly configureWhat you'll configure:
- AI Provider - Choose from OpenAI, Anthropic, Google, GitHub Models, or GitHub Copilot
- Authentication - API key or OAuth (GitHub Copilot)
- Default Model - Select from available models for your provider
- Syntax Theme - Choose your preferred highlighting theme
- Default Action - Set a default action to auto run after suggestions
Default config (~/.config/cmdly/cmdly.json):
{
"provider": "github-copilot",
"model": "gpt-5-mini",
"theme": "github-dark-default",
"default_suggest_action": "copy"
}Fields:
provider(string, required) - AI provider identifiermodel(string, required) - Model identifier for the provider from models.devtheme(string, optional) - Syntax highlighting theme from Shiki themesdefault_suggest_action(string, optional) -run,revise,explain,copy, orcancel. Leave unset to always ask.