Autonomous AI coding agent CLI — like Claude Code, works with any OpenAI-compatible API
Project description
AutoCode Agent
▄████████ ███ █▄ ███ ▄██████▄ ▄████████ ▄██████▄ ████████▄ ▄████████
███ ███ ███ ███ ▀█████████▄ ███ ███ ███ ███ ███ ███ ███ ▀███ ███ ███
███ ███ ███ ███ ▀███▀▀██ ███ ███ ███ █▀ ███ ███ ███ ███ ███ █▀
███ ███ ███ ███ ███ ▀ ███ ███ ▄███▄▄▄ ███ ███ ███ ███ ▄███▄▄▄
▀███████████ ███ ███ ███ ███ ███ ▀▀███▀▀▀ ███ ███ ███ ███ ▀▀███▀▀▀
███ ███ ███ ███ ███ ███ ███ ███ █▄ ███ ███ ███ ███ ███ █▄
███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ▄███ ███ ███
███ █▀ ████████▀ ▄████▀ ▀██████▀ ██████████ ▀██████▀ ████████▀ ██████████
The Autonomous AI Coding Agent — Powered by Any OpenAI-Compatible API
by ALLAY_XD_20
AutoCode is a powerful autonomous coding agent CLI — like Claude Code or Aider, but works with any OpenAI-compatible API provider. It reads, writes, and creates files; executes shell commands; reviews code; scans for security issues; manages git; runs tests; and much more — all from your terminal.
Features
┌─────────────────────────────────────────────────────────────────────────┐
│ AUTOCODE FEATURE LIST │
├──────────────────────┬──────────────────────┬──────────────────────────┤
│ CODE QUALITY │ GIT & VERSION │ TESTING │
│ /code-review │ /git-status │ /test │
│ /lint │ /git-diff │ /test-gen │
│ /type-check │ /git-log │ /test-debug │
│ /refactor │ /git-commit │ /build │
│ /cleanup │ /git-branch │ │
│ /duplicates │ /git-push │ PERFORMANCE │
│ /syntax-fix │ /commit-msg │ /profile │
│ /explain │ /merge-fix │ /mem-check │
├──────────────────────┼──────────────────────┤ /optimize │
│ DEBUGGING │ SECURITY ├──────────────────────────┤
│ /debug │ /security │ INFRASTRUCTURE │
│ /fix │ /secrets │ /docker │
│ /trace │ /vulns │ /ci-cd │
│ /errors │ /audit │ /server │
│ /logs │ │ /deploy │
│ /explain-error │ DEPENDENCIES │ /env │
├──────────────────────┤ /deps ├──────────────────────────┤
│ GENERATION │ /install │ FILE & SEARCH │
│ /generate │ /outdated │ /find │
│ /scaffold │ │ /replace │
│ /readme │ API & DATABASE │ /regex │
│ /docs │ /api-test │ /navigate │
│ /ui-gen │ /db │ │
│ /backend-gen │ /db-query │ INTELLIGENCE │
│ /api-build │ /db-migrate │ /arch │
│ /template │ /json-check │ /memory │
│ /convert │ /yaml-check │ /pr-review │
│ /translate │ │ /completion │
│ /scaffold │ PACKAGE MANAGERS │ /explain │
└──────────────────────┴──────────────────────┴──────────────────────────┘
Installation
pip install autocode-agent
Requirements: Python 3.9+ | Works on Windows, macOS, Linux
Quick Start
Step 1 — Set your API token
AutoCode works with any OpenAI-compatible API. Set your credentials:
# Required
export AUTOCODE_AUTH_TOKEN="your-api-token-here"
# Optional — customize the provider and model
export AUTOCODE_BASE_URL="https://beta.hapuppy.com" # default
export AUTOCODE_MODEL="claude-sonnet-4-6" # default
Windows (PowerShell):
$env:AUTOCODE_AUTH_TOKEN = "your-api-token-here"
$env:AUTOCODE_BASE_URL = "https://beta.hapuppy.com"
$env:AUTOCODE_MODEL = "claude-sonnet-4-6"
Step 2 — Run it
# Interactive mode (recommended)
autocode
# One-shot task
autocode "build a REST API with Flask and SQLite"
# List available models
autocode --list-models
# Work in a specific directory
autocode --dir /path/to/my/project
# Use a different model
autocode -m gpt-4 "refactor my codebase"
Interactive Mode
When you run autocode without arguments, you get a full interactive session:
▄████████ ███ █▄ ...
███ ███ ███ ███ ...
by ALLAY_XD_20 • v1.0.0 • Autonomous Coding Agent
Features: Code Review • Auto Debug • Security Scan • Git • Tests • Docs
Refactor • Scaffold • API Test • Docker • CI/CD • + 70 more
Model : claude-sonnet-4-6
Endpoint : https://beta.hapuppy.com/v1/chat/completions
Commands : /help /ls /reset /model /features /git /security /test /exit
❯ _
Type any natural language task, or use a /command:
❯ read main.py and fix any bugs you find
❯ /code-review
❯ /security
❯ /test
❯ /git-commit
❯ /scaffold
❯ create a FastAPI app with JWT authentication
All Commands
Built-in Commands
| Command | Description |
|---|---|
/help |
Show help and command list |
/features |
Show full feature table |
/reset |
Clear conversation history |
/ls [dir] |
List files in directory |
/model |
Show current model and endpoint |
/exit |
Quit AutoCode |
Code Quality
| Command | What It Does |
|---|---|
/code-review |
Full code review with issues, bugs, and suggestions |
/refactor |
Refactor the codebase (SOLID, clean code) |
/cleanup |
Remove dead code, unused imports, formatting |
/syntax-fix |
Find and fix all syntax errors |
/duplicates |
Detect and eliminate duplicate code |
/lint |
Run linter (ruff/flake8/eslint) on all files |
/type-check |
Run type checker (mypy/tsc) |
/explain |
Explain the codebase architecture |
Debugging
| Command | What It Does |
|---|---|
/debug |
Debug the project — trace and fix errors |
/fix |
Find and fix all bugs |
/trace |
Analyze a stack trace |
/errors |
Find all error-prone areas |
/logs |
Analyze log files |
/explain-error |
Explain an error message in detail |
Code Generation
| Command | What It Does |
|---|---|
/generate |
Generate code from description |
/scaffold |
Scaffold a new project (python/flask/fastapi/node/react/cli) |
/ui-gen |
Generate UI components |
/backend-gen |
Generate backend code and APIs |
/api-build |
Build a full API with endpoints |
/readme |
Generate a professional README |
/docs |
Generate project documentation |
/convert |
Convert code between languages |
/translate |
Translate code/content |
Testing
| Command | What It Does |
|---|---|
/test |
Run all tests; fix failures |
/test-gen |
Generate comprehensive test suite |
/test-debug |
Debug failing tests |
/build |
Build the project |
Security
| Command | What It Does |
|---|---|
/security |
Full security audit + auto-fix |
/secrets |
Scan for hardcoded secrets/tokens |
/vulns |
Check code + dependency vulnerabilities |
/audit |
Comprehensive security report |
Git & Version Control
| Command | What It Does |
|---|---|
/git-status |
Show git status |
/git-diff |
Show all changes |
/git-log |
Show commit history |
/git-commit |
Stage, generate message, and commit |
/git-branch |
List all branches |
/git-push |
Push to remote |
/commit-msg |
Generate a commit message from diff |
/merge-fix |
Resolve merge conflicts |
/pr-review |
Review pull request changes |
Dependencies & Packages
| Command | What It Does |
|---|---|
/deps |
Analyze all dependencies |
/install |
Install project dependencies |
/outdated |
Show outdated packages |
Performance
| Command | What It Does |
|---|---|
/profile |
Profile Python script performance |
/mem-check |
Detect memory leaks |
/optimize |
Optimize code for speed |
Infrastructure
| Command | What It Does |
|---|---|
/docker |
Docker operations (build/run/logs) |
/ci-cd |
Detect and set up CI/CD pipelines |
/server |
Manage running servers |
/deploy |
Help deploy the project |
/env |
Manage .env variables |
Database
| Command | What It Does |
|---|---|
/db |
Inspect SQLite database |
/db-query |
Run SQL queries |
/db-migrate |
Create and run migrations |
File & Search
| Command | What It Does |
|---|---|
/find |
Find files by name pattern |
/replace |
Global find-and-replace across files |
/regex |
Regex search across files |
/navigate |
Explore project structure |
/json-check |
Validate JSON files |
/yaml-check |
Validate YAML files |
Intelligence
| Command | What It Does |
|---|---|
/arch |
Architecture analysis (ASCII diagram) |
/memory |
View/store agent session memory |
/completion |
AI code completion |
/api-test |
Test HTTP API endpoints |
Configuration
All settings via environment variables — no hardcoded keys ever:
| Variable | Default | Description |
|---|---|---|
AUTOCODE_AUTH_TOKEN |
(required) | Your API bearer token |
AUTOCODE_BASE_URL |
https://beta.hapuppy.com |
API base URL (any OpenAI-compatible) |
AUTOCODE_MODEL |
claude-sonnet-4-6 |
Model name |
AUTOCODE_MAX_TOKENS |
8192 |
Max response tokens |
AUTOCODE_TEMPERATURE |
0.2 |
Response temperature |
Supported API Providers
AutoCode works with any OpenAI-compatible API:
# HaPuppy (default)
export AUTOCODE_BASE_URL="https://beta.hapuppy.com"
export AUTOCODE_AUTH_TOKEN="sk-hapuppy-..."
export AUTOCODE_MODEL="claude-sonnet-4-6"
# OpenAI
export AUTOCODE_BASE_URL="https://api.openai.com"
export AUTOCODE_AUTH_TOKEN="sk-..."
export AUTOCODE_MODEL="gpt-4o"
# Anthropic (via proxy)
export AUTOCODE_BASE_URL="https://your-proxy.com"
export AUTOCODE_AUTH_TOKEN="sk-ant-..."
export AUTOCODE_MODEL="claude-3-5-sonnet"
# Ollama (local)
export AUTOCODE_BASE_URL="http://localhost:11434"
export AUTOCODE_AUTH_TOKEN="ollama"
export AUTOCODE_MODEL="llama3.1"
# Any OpenAI-compatible endpoint
export AUTOCODE_BASE_URL="https://your-provider.com"
Examples
Fix bugs automatically
autocode "read app.py, find the bug causing the 500 error, fix it, run the tests"
Build a full project
autocode "create a FastAPI REST API with user auth, SQLite database, and JWT tokens"
Security audit
❯ /security
# → Scans all code + dependencies, auto-fixes issues
Git workflow
❯ /git-commit
# → Stages changes, generates commit message, commits
Scaffold a new project
❯ /scaffold
# → Asks: project type (flask/fastapi/react/node/cli), name, directory
# → Creates complete project structure
Convert code
autocode "convert my Flask app in app.py to FastAPI"
Generate tests
autocode "read utils.py and generate comprehensive pytest tests for every function"
CLI Reference
Usage: autocode [OPTIONS] [TASK]
AutoCode Agent — Autonomous AI coding assistant by ALLAY_XD_20.
Options:
-m, --model TEXT Model to use [env: AUTOCODE_MODEL]
-t, --token TEXT Auth token [env: AUTOCODE_AUTH_TOKEN]
-u, --base-url TEXT API base URL [env: AUTOCODE_BASE_URL]
-v, --verbose Verbose output
-d, --dir TEXT Working directory
--list-models List all available models
--version Show version
--help Show help
How It Works
AutoCode uses a tool-calling agentic loop:
User Input
│
▼
┌─────────────────────────────────────────┐
│ Language Model (LLM) │
│ Reasons about the task, decides │
│ which tools to call │
└───────────────────┬─────────────────────┘
│ tool_calls
▼
┌─────────────────────────────────────────┐
│ Tool Executor │
│ read_file │ write_file │ run_command │
│ git_* │ security_scan │ auto_testing │
│ project_scaffolding │ api_testing │
│ ... 50+ more tools │
└───────────────────┬─────────────────────┘
│ results
▼
Back to LLM (loop)
│
▼
Final Response
The agent keeps looping — calling tools, observing results, and adjusting — until the task is fully complete. Up to 15 iterations per turn.
Platform Support
| Platform | Status |
|---|---|
| Linux | ✅ Full support |
| macOS | ✅ Full support |
| Windows (PowerShell) | ✅ Full support |
| Windows (CMD) | ✅ Full support |
| WSL | ✅ Full support |
| Termux (Android) | ✅ Full support |
| Any Python 3.9+ environment | ✅ Full support |
AutoCode automatically detects terminal capabilities and adapts:
- Wide terminal (≥100 cols) → Full ASCII art banner
- Medium terminal (≥50 cols) → Compact banner
- Narrow/no-unicode → Minimal text banner
- No color → Plain text output (respects
NO_COLORenv var)
Contributing
Contributions welcome! Open an issue or PR on GitHub.
- Fork the repo
- Create a feature branch:
git checkout -b feature/my-feature - Commit:
git commit -m 'feat: add my feature' - Push:
git push origin feature/my-feature - Open a Pull Request
License
MIT License © 2026 ALLAY_XD_20 — free to use, modify, and distribute.
Built with ❤️ by ALLAY_XD_20
AutoCode — Code smarter, not harder.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autocode_agent-1.0.0.tar.gz.
File metadata
- Download URL: autocode_agent-1.0.0.tar.gz
- Upload date:
- Size: 43.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58ab37e184ab9031fc15754271120ddef0945ae7118b7eca5fe295dac3cfb97e
|
|
| MD5 |
e32ee0e6f6c60ed0082dc9f1177d6a45
|
|
| BLAKE2b-256 |
1da9d9d7a4accaa458ae5bfb59a6868786d97d4dd01e91c8e05ac8b6c2dc4537
|
File details
Details for the file autocode_agent-1.0.0-py3-none-any.whl.
File metadata
- Download URL: autocode_agent-1.0.0-py3-none-any.whl
- Upload date:
- Size: 42.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0af0e967659126b127e013578735c2774726dc8d5ad3c58f3df2fa3716370a5c
|
|
| MD5 |
c748180cf83c2a90cbfaa6ba5997854e
|
|
| BLAKE2b-256 |
6e5e05d7702ff35d16fa9497514c4329f7b7a30e3836420c066a6bf3fd422632
|