Package Exports
- centaurus-cli
- centaurus-cli/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (centaurus-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Centaurus CLI
A powerful command-line AI coding assistant with Google Gemini and OpenRouter support
Features
✨ AI-Powered Coding Assistant
- Support for Google Gemini (2.5 Flash, 2.5 Pro, 2.0 Flash, and more)
- OpenRouter integration for access to multiple AI models
- Intelligent code generation and editing
- Context-aware file operations
🔧 Developer Tools
- Read, write, and edit files with AI assistance
- Execute shell commands safely
- Search codebases with grep
- Web search capabilities (requires authentication)
- Diff viewer for code changes
🎨 Beautiful Terminal UI
- Built with Ink (React for CLIs)
- Syntax highlighting for code blocks
- Interactive pickers and prompts
- Real-time streaming responses
- Markdown rendering
☁️ Cloud Sync (Optional)
- Conversation history across devices
- Settings synchronization
- Encrypted API key storage
- Seamless authentication with Google
Installation
Global Installation (Recommended)
npm install -g centaurus-cliAfter installation, you can run Centaurus from any directory:
centaurusLocal Installation
npm install centaurus-cli
npx centaurusQuick Start
1. First Launch
When you first run Centaurus, you'll see a beautiful welcome screen:
centaurusYou'll be prompted to sign in with Google for cloud sync features, or you can exit and configure manually.
2. Configure API Keys
Set up your AI provider API keys using slash commands:
# For Google Gemini
/config set googleApiKey YOUR_GOOGLE_API_KEY
# For OpenRouter
/config set openrouterApiKey YOUR_OPENROUTER_API_KEYGet API Keys:
- Google AI Studio: https://makersuite.google.com/app/apikey
- OpenRouter: https://openrouter.ai/keys
3. Start Chatting
Just type your message and press Enter:
> Create a React component for a todo listThe AI will help you with code generation, file operations, and more!
Configuration
Environment Setup
Create a .env file in your project or use the global config:
# Backend API URL (for cloud sync and web search)
BACKEND_API_URL=http://localhost:3000/apiUser Configuration
Your settings are stored in ~/.centaurus/config.json:
- API keys (encrypted)
- Preferred model and provider
- Theme settings
- Auto-accept preferences
Commands
Slash Commands
/help # Show all commands
/config # View current configuration
/config set <key> <value> # Set configuration value
/model # Select AI model
/provider # Select AI provider
/plan # Toggle plan mode
/clear # Clear conversation history
/logout # Sign out and exit
/exit # Exit the applicationExamples
# Set API key
/config set googleApiKey AIzaSy...
# Change model
/model gemini-2.5-flash
# Switch provider
/provider openrouter
# Enable plan mode for complex tasks
/planFeatures in Detail
File Operations
Centaurus can read, write, and edit files in your project:
> Read the package.json file
> Create a new file called utils.ts with helper functions
> Edit the README.md to add installation instructionsCode Generation
Generate code in any language:
> Create a Python script to parse CSV files
> Write a TypeScript interface for a user object
> Generate a SQL query to find duplicate recordsWeb Search
Search the web for documentation and solutions (requires authentication):
> Search for the latest React hooks best practices
> Find documentation for the Axios libraryCommand Execution
Execute shell commands safely:
> Run npm install
> List all files in the current directory
> Check the git statusPlan Mode
For complex tasks, enable plan mode to see the implementation plan before execution:
/plan
> Build a REST API with Express and TypeScriptThe AI will create a detailed plan and ask for approval before implementing.
Cloud Sync
Sign In
Sign in with Google to enable cloud features:
- Start Centaurus
- Select "Sign in with Google"
- Complete authentication in browser
- Enjoy cloud sync!
Features
- Conversation History: Access your chats from any device
- Settings Sync: Your preferences follow you everywhere
- API Key Storage: Encrypted storage in the cloud
- Web Search: Powered by backend API
Offline Mode
You can use Centaurus without signing in:
- All AI features work offline
- Local conversation history
- No web search (requires backend)
Advanced Usage
Multiple API Keys
Configure multiple API keys for automatic rotation:
/config set googleApiKey key1,key2,key3Custom Backend
Set up your own backend for cloud sync:
BACKEND_API_URL=https://your-backend.com/apiKeyboard Shortcuts
Ctrl+C- Cancel current operationCtrl+D- Exit (when input is empty)Arrow Keys- Navigate pickersEnter- Confirm selection
Troubleshooting
"API key not set"
Configure your API key:
/config set googleApiKey YOUR_KEY"Authentication required" for web search
Sign in with Google or restart the CLI and choose "Sign in".
"Backend API is not reachable"
Check your .env file and ensure the backend is running:
cd backend
npm startReset Configuration
Delete the config file to start fresh:
Windows:
del %USERPROFILE%\.centaurus\config.jsonmacOS/Linux:
rm ~/.centaurus/config.jsonRequirements
- Node.js >= 18.0.0
- npm or yarn
- Terminal with color support
Development
Clone and Build
git clone https://github.com/yourusername/centaurus-cli.git
cd centaurus-cli
npm install
npm run build
npm startProject Structure
centaurus-cli/
├── src/
│ ├── ai/ # AI provider implementations
│ ├── commands/ # Command parser
│ ├── config/ # Configuration management
│ ├── services/ # API client and services
│ ├── tools/ # Tool implementations
│ ├── ui/ # Ink UI components
│ └── index.ts # Entry point
├── dist/ # Compiled JavaScript
└── package.jsonContributing
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 amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
MIT © [Your Name]
Support
Acknowledgments
- Built with Ink - React for CLIs
- Powered by Google Gemini and OpenRouter
- Inspired by modern AI coding assistants
Made with ❤️ by developers, for developers