_______ ___ _______ ______ _______ _______ ___ ___
| || | | _ || _ | | _ | | || | | |
| || | | |_| || | || | |_| | | || | | |
| || | | || |_||_ | | | || | | |
| _|| |___ | || __ || | | _|| |___ | |
| |_ | || _ || | | || _ | | |_ | || |
|_______||_______||__| |__||___| |_||__| |__| |_______||_______||___|
A terminal-based AI agent that executes commands through natural language
Clara is your intelligent terminal companion that understands natural language and helps you execute shell commands safely and efficiently. No more memorizing complex command syntax or searching through man pages!
- π€ Natural Language Commands - Just describe what you want to do
- π Safety First - Preview commands before execution with built-in validation
- π Universal API Support - Works with any OpenAI-compatible API (OpenAI, Anthropic, local models)
- π¨ Beautiful Interface - Gorgeous sakura-themed UI with ASCII art
- π Auto Model Detection - Automatically fetches and lists available models from your API
- π‘οΈ Smart Validation - Detects and warns about destructive operations
- π Shell Agnostic - Supports bash, zsh, and PowerShell
npm install -g clara-cliclara "list files"On first run, Clara will guide you through setup:
- Enter your API URL (e.g.,
https://api.openai.com/v1) - Enter your API key
- Select your preferred model from the auto-detected list
That's it! π
clara "find all Python files modified in the last 24 hours"
clara "create a gitignore for a Node.js project"
clara "count lines of code in the src directory"clara "show me commits from last week"
clara "create a new branch called feature/auth"
clara "undo last commit but keep changes"clara "check disk space"
clara "find process using port 3000"
clara "show my IP address"clara "backup all .env files to a zip"
clara "replace 'oldname' with 'newname' in all Python files"
clara "set up a Python virtual environment"When you make a request, Clara:
- π€ Analyzes your request and generates an appropriate command
- π Presents a detailed plan including:
- The command to execute
- Explanation of what it does
- Reasoning behind the approach
- Potential risks and safety warnings
- Estimated execution time
- π Validates the command for safety
- β‘ Executes with your confirmation
- π Shows results in a clean, formatted output
π€ Clara's Plan:
Search for Python files modified in the last 24 hours
π§ Command to execute:
$ find . -name "*.py" -type f -mtime -1
π Reasoning:
Using find with -mtime -1 to locate files modified within last day
β Read-only operation (safe)
β‘ Estimated time: seconds
What would you like to do?
β― β Execute the command
βοΈ Edit the command
π¬ Provide feedback and regenerate
β Cancel
clara "your request in natural language"# List available models and select one
clara model
# Quick switch to a specific model
clara model gpt-4-turbo# Show current configuration
clara config
# Re-run setup wizard
clara setupConfiguration is stored in ~/.clara/config.json:
{
"apiUrl": "https://api.openai.com/v1",
"apiKey": "sk-...",
"defaultModel": "gpt-4",
"shell": "bash",
"confirmByDefault": true,
"historyEnabled": true
}You can manually edit this file or use clara setup to reconfigure.
Clara includes multiple safety layers:
- Flags operations that modify or delete files
- Requires explicit confirmation for dangerous operations
- Warns about system-level changes
- Detects potentially harmful patterns (e.g.,
rm -rf /) - Identifies commands requiring sudo
- Warns about security risks (e.g., piping curl to bash)
- Always shows commands before execution
- Allows editing before running
- Option to provide feedback and regenerate
API URL: https://api.openai.com/v1
API Key: sk-...
API URL: https://api.anthropic.com/v1
API Key: sk-ant-...
API URL: http://localhost:11434/v1
API Key: (leave blank or use 'ollama')
API URL: http://localhost:1234/v1
API Key: (leave blank)
Clara works with any OpenAI-compatible API endpoint!
git clone https://github.com/yourusername/clara-cli.git
cd clara-cli
npm installnpm run buildnpm run devnpm link
clara "test command"- Node.js 18 or higher
- An API key for your chosen LLM provider
- bash, zsh, or PowerShell
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT License - see LICENSE file for details
- Built with β€οΈ and πΈ by Clara
- Inspired by the need for a more human way to interact with terminals
- Thanks to all the amazing LLM providers making this possible
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
- π§ Email: [email protected]
Made with πΈ by Clara
Let's make terminals more human!