AI-powered coding agent for your codebase. Generate, review, fix, and refactor code with intelligent assistance.
- Code Generation: Create entire applications, components, or functions
- Interactive Chat: Natural language coding assistance
- Code Review: Analyze code for bugs, performance, and best practices
- Bug Fixing: Automatically detect and fix issues
- Code Refactoring: Modernize and improve existing code
- Multi-Provider: Support for Ollama, LM Studio, and Google Gemini
git clone https://github.com/deoninja/code-agent.git
cd code-agent/cli
npm install
npm run build
npm linknpm install -g code-agent-cliConfigure your AI provider:
code-agent configChoose from:
- Ollama (Local):
http://localhost:11434/v1/chat/completions - LM Studio (Local):
http://localhost:1234/v1/chat/completions - Google Gemini: Requires API key
# Create entire applications
code-agent generate "create a REST API with user authentication"
code-agent generate "build a React todo app" --framework react
code-agent generate "create a Python FastAPI backend" --framework fastapi
# Generate specific components
code-agent generate "add a login component" --type component
code-agent generate "create JWT middleware" --type functioncode-agent chatThen ask questions like:
- "Create a new Express.js route for file uploads"
- "Add error handling to my authentication middleware"
- "Optimize this database query"
# Review entire codebase
code-agent review --all
# Review specific files
code-agent review src/app.ts src/utils.tscode-agent fix src/buggy-file.tscode-agent refactor src/old-code.ts -s "use modern async/await"
code-agent refactor src/component.jsx -s "convert to TypeScript"| Command | Description | Options |
|---|---|---|
config |
Configure AI provider settings | - |
chat |
Start interactive chat mode | -p, --path <path> |
generate <description> |
Generate new code/apps | -t, --type <type>, -f, --framework <framework> |
review [files...] |
Review code for issues | -a, --all |
fix <file> |
Fix bugs in specific file | - |
refactor <file> |
Refactor code | -s, --suggestion <text> |
app- Complete applicationscomponent- UI componentsfunction- Individual functionstest- Unit testsapi- API endpoints
- Frontend: React, Vue, Angular, Svelte
- Backend: Express, FastAPI, Django, Spring Boot
- Mobile: React Native, Flutter
- Desktop: Electron, Tauri
Navigate to your project directory before running commands:
cd my-project
code-agent chatThe agent will understand your project structure and provide contextual assistance.
# Install Ollama
curl -fsSL https://ollama.ai/install.sh | sh
# Pull a model
ollama pull llama3.1:8b
# Configure code-agent
code-agent config
# Select: ollama
# URL: http://localhost:11434/v1/chat/completions
# Model: llama3.1:8b- Download and install LM Studio
- Load a model and start the server
- Configure code-agent with
http://localhost:1234/v1/chat/completions
- Get API key from Google AI Studio
- Configure code-agent and enter your API key
code-agent generate "create a task management app with React frontend and Express backend"code-agent generate "add JWT authentication to my Express API" --type functioncode-agent chat
> "Add a dark mode toggle to my React app"
> "Create a database migration for user roles"
> "Optimize my API response times"- 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
MIT License - see LICENSE file for details.
Deo Trinidad
- Email: deotri4@gmail.com
- GitHub: @deoninja
⭐ Star this repo if you find it helpful!