mini-agents-cli
v0.0.5
Published
A mini AI agent in CLI
Readme
mini-agents-cli
An interactive command-line tool built on top of the mini-agents framework.
Features
- 🚀 Out-of-the-box: Zero-configuration setup with interactive onboarding
- 💬 Interactive Chat: Real-time conversation with AI Agent
- 🛠️ Built-in Tools: File operations, shell execution, and skill system
- ⌨️ Keyboard Shortcuts: Support for command history, auto-completion, and cancellation
- ⚙️ Configurable: Persistent settings with JSON configuration files
Installation
Global Installation
npm install -g mini-agents-cliUsage
First Run
Simply run the CLI:
mini-agents-cliOn first run, you'll be guided through an interactive setup:
- Choose your LLM provider (Anthropic or OpenAI)
- Enter your API key
- Configure API base URL and model
Configuration is saved to ~/.mini-agents-cli/settings.json.
Commands
Once in the CLI, you can use the following commands:
| Command | Description |
|---------|-------------|
| /help | Show help information |
| /clear | Clear the screen |
| /exit or /quit | Exit the CLI |
Keyboard Shortcuts
| Shortcut | Description |
|----------|-------------|
| Ctrl+C | Exit the CLI |
| Esc | Cancel current Agent execution |
| ↑/↓ | Navigate command history |
| Tab | Auto-complete commands |
Configuration
Configuration File
Location: ~/.mini-agents-cli/settings.json
Example configuration:
{
"llm": {
"apiKey": "your-api-key",
"apiBase": "https://api.anthropic.com",
"model": "claude-sonnet-4-5-20250929",
"provider": "anthropic",
"retry": {
"enabled": true,
"maxRetries": 3,
"initialDelay": 1.0,
"maxDelay": 60.0,
"exponentialBase": 2.0
}
},
"agent": {
"maxSteps": 50,
"workspaceDir": "./workspace",
"systemPromptPath": "system_prompt.md"
},
"tools": {
"enableFileTools": true,
"enableBash": true,
"enableNote": true,
"enableSkills": true,
"skillsDir": "./skills",
"enableMcp": true,
"mcpConfigPath": "mcp.json"
}
}Environment Variables
You can also use environment variables:
ANTHROPIC_API_KEY- Anthropic API keyANTHROPIC_API_BASE_URL- Anthropic API base URLOPENAI_API_KEY- OpenAI API keyOPENAI_API_BASE_URL- OpenAI API base URL
Workspace Directory
By default, the CLI operates in the current working directory. You can specify a different workspace:
mini-agents-cli --workspace /path/to/projectSkills
Skills are reusable capabilities that the Agent can invoke. Place your skill files (.md format) in the skills/ directory.
Example skill structure:
skills/
├── web-search.md
├── code-review.md
└── data-analysis.mdRequirements
- Node.js 18+
- API key from Anthropic or OpenAI
License
MIT
Related
- mini-agents - The underlying Agent framework
