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 powered by Google Gemini
Features
✨ AI-Powered Coding Assistant
- Support for Google Gemini (2.5 Flash, 2.5 Pro, 2.0 Flash, and more)
- 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
- Conversation history across devices
- Settings synchronization
- Seamless authentication with Google
- Secure backend-managed AI access
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. Prerequisites
Before using Centaurus CLI, ensure the backend service is running and accessible. The backend handles all AI model interactions.
Backend Setup:
- The backend must be deployed and configured with Google API keys
- Set the backend URL in your
.envfile (see Configuration section) - Default:
http://localhost:3000/api
2. First Launch
When you first run Centaurus, you'll see a beautiful welcome screen:
centaurusYou'll be prompted to sign in with Google. Authentication is required to use AI features.
3. Start Chatting
Once authenticated, 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 directory:
# Backend API URL (required for all AI features)
BACKEND_API_URL=http://localhost:3000/apiImportant: The backend URL is required for the CLI to function. All AI model calls are proxied through the backend service.
User Configuration
Your settings are stored in ~/.centaurus/config.json:
- Preferred model
- Theme settings
- Auto-accept preferences
- Plan mode settings
Note: API keys are no longer stored in the CLI. They are managed centrally by the backend service.
Commands
Slash Commands
/help # Show all commands
/config # View current configuration
/model # Select AI model
/plan # Toggle plan mode
/clear # Clear conversation history
/logout # Sign out and exit
/exit # Exit the applicationExamples
# Change model
/model gemini-2.5-flash
# Enable plan mode for complex tasks
/plan
# Clear conversation history
/clearFeatures 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.
Authentication
Sign In (Required)
Authentication with Google is required to use Centaurus CLI:
- Start Centaurus
- Select "Sign in with Google"
- Complete authentication in browser
- Start using AI features!
Features
- Conversation History: Access your chats from any device
- Settings Sync: Your preferences follow you everywhere
- Secure AI Access: Backend-managed API keys for security
- Web Search: Powered by backend API
Backend Connectivity
Centaurus CLI requires a connection to the backend service:
- All AI model calls are proxied through the backend
- Authentication tokens are validated by the backend
- Ensures secure and centralized API key management
- No local API key storage required
Advanced Usage
Custom Backend
Set up your own backend instance:
BACKEND_API_URL=https://your-backend.com/apiBackend Requirements:
- Must be configured with Google API keys
- Must support the
/api/ai/chatendpoint - Must handle authentication and session management
Keyboard Shortcuts
Ctrl+C- Cancel current operationCtrl+D- Exit (when input is empty)Arrow Keys- Navigate pickersEnter- Confirm selection
Troubleshooting
"Authentication required"
Sign in with Google:
- Restart the CLI
- Choose "Yes" when prompted to sign in
- Complete the authentication flow in your browser
"Backend API is not reachable"
Check your .env file and ensure the backend is running:
BACKEND_API_URL=http://localhost:3000/apiVerify backend is running:
cd backend
npm startCommon Issues:
- Backend service is not running
- Incorrect backend URL in
.env - Network connectivity issues
- Firewall blocking the connection
"Rate limit exceeded"
The backend has exhausted its API quota. This is managed by the backend administrator. Wait a few moments and try again.
Reset Configuration
Delete the config file to start fresh:
Windows:
del %USERPROFILE%\.centaurus\config.jsonmacOS/Linux:
rm ~/.centaurus/config.jsonNote: This will clear your model preferences and settings, but you'll need to re-authenticate.
Requirements
- Node.js >= 18.0.0
- npm or yarn
- Terminal with color support
- Backend service running and accessible
- Google account for authentication
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
- Inspired by modern AI coding assistants
Made with ❤️ by developers, for developers