|
| 1 | +# Codeany |
| 2 | + |
| 3 | +An open-source AI-powered terminal agent for software engineering. Built in Go with [Bubble Tea](https://github.com/charmbracelet/bubbletea) TUI and the [Open Agent SDK](https://github.com/codeany-ai/open-agent-sdk-go). |
| 4 | + |
| 5 | +## Quick Install |
| 6 | + |
| 7 | +```bash |
| 8 | +curl -fsSL https://raw.githubusercontent.com/codeany-ai/codeany/main/install.sh | sh |
| 9 | +``` |
| 10 | + |
| 11 | +Or install from source: |
| 12 | + |
| 13 | +```bash |
| 14 | +go install github.com/codeany-ai/codeany/cmd/codeany@latest |
| 15 | +``` |
| 16 | + |
| 17 | +## Setup |
| 18 | + |
| 19 | +Set your API key: |
| 20 | + |
| 21 | +```bash |
| 22 | +export ANTHROPIC_API_KEY="sk-ant-..." |
| 23 | +# Or for OpenRouter / custom providers: |
| 24 | +export CODEANY_API_KEY="sk-or-..." |
| 25 | +export CODEANY_BASE_URL="https://openrouter.ai/api" |
| 26 | +export CODEANY_MODEL="anthropic/claude-sonnet-4-5" |
| 27 | +``` |
| 28 | + |
| 29 | +## Usage |
| 30 | + |
| 31 | +```bash |
| 32 | +# Interactive mode |
| 33 | +codeany |
| 34 | + |
| 35 | +# With initial prompt |
| 36 | +codeany "explain this codebase" |
| 37 | + |
| 38 | +# Pipe mode |
| 39 | +echo "what is 2+2" | codeany -p |
| 40 | + |
| 41 | +# Print mode (non-interactive) |
| 42 | +codeany --print -y "list files in src/" |
| 43 | + |
| 44 | +# JSON output |
| 45 | +echo "hello" | codeany -p -y --output-format json |
| 46 | + |
| 47 | +# Skip permission prompts |
| 48 | +codeany -y |
| 49 | + |
| 50 | +# Use specific model |
| 51 | +codeany -m opus-4-6 |
| 52 | +``` |
| 53 | + |
| 54 | +## Slash Commands |
| 55 | + |
| 56 | +| Command | Description | |
| 57 | +|---------|-------------| |
| 58 | +| `/help` | Show all commands | |
| 59 | +| `/model [name]` | Switch model | |
| 60 | +| `/fast` | Toggle faster model | |
| 61 | +| `/cost` | Show token usage and cost | |
| 62 | +| `/clear` | Clear conversation | |
| 63 | +| `/compact [hint]` | Compact conversation | |
| 64 | +| `/plan [task]` | Plan mode / plan a task | |
| 65 | +| `/commit [msg]` | Git commit helper | |
| 66 | +| `/review [target]` | Code review | |
| 67 | +| `/diff` | Show git diff summary | |
| 68 | +| `/bug <desc>` | Investigate a bug | |
| 69 | +| `/test [target]` | Run tests | |
| 70 | +| `/init` | Initialize project (create CODEANY.md) | |
| 71 | +| `/doctor` | Environment diagnostics | |
| 72 | +| `/mcp` | Manage MCP servers | |
| 73 | +| `/skills` | List available skills | |
| 74 | +| `/plugin` | List installed plugins | |
| 75 | +| `/hooks` | Show configured hooks | |
| 76 | +| `/context` | Show all context sources | |
| 77 | +| `/session` | Session details | |
| 78 | +| `/files` | Files accessed this session | |
| 79 | +| `/resume` | List recent sessions | |
| 80 | +| `/export` | Export conversation | |
| 81 | +| `/config` | Show configuration | |
| 82 | +| `/permissions` | Permission mode | |
| 83 | +| `/status` | Session status | |
| 84 | +| `/quit` | Exit | |
| 85 | + |
| 86 | +## Keyboard Shortcuts |
| 87 | + |
| 88 | +| Key | Action | |
| 89 | +|-----|--------| |
| 90 | +| `Enter` | Send message | |
| 91 | +| `Shift+Enter` | New line | |
| 92 | +| `Ctrl+C` | Cancel / Exit | |
| 93 | +| `Ctrl+D` | Exit (empty input) | |
| 94 | +| `Ctrl+L` | Clear conversation | |
| 95 | +| `Ctrl+O` | Toggle expand tool output | |
| 96 | +| `Up/Down` | Input history | |
| 97 | +| `PgUp/PgDown` | Scroll messages | |
| 98 | +| `Tab` | Complete slash command | |
| 99 | +| `Esc` | Clear input / close menu | |
| 100 | +| `! cmd` | Run shell command | |
| 101 | + |
| 102 | +## Configuration |
| 103 | + |
| 104 | +Config directory: `~/.codeany/` |
| 105 | + |
| 106 | +``` |
| 107 | +~/.codeany/ |
| 108 | +├── settings.json # Main config (model, permissions, MCP, hooks) |
| 109 | +├── config.yaml # YAML config (alternative) |
| 110 | +├── permissions.json # Persisted permission rules |
| 111 | +├── memory/ # Memory files |
| 112 | +├── sessions/ # Session history |
| 113 | +├── skills/ # User skills |
| 114 | +│ └── my-skill/ |
| 115 | +│ └── SKILL.md |
| 116 | +└── plugins/ # Plugins |
| 117 | + └── my-plugin/ |
| 118 | + ├── plugin.json |
| 119 | + └── skills/ |
| 120 | +``` |
| 121 | + |
| 122 | +### settings.json |
| 123 | + |
| 124 | +```json |
| 125 | +{ |
| 126 | + "model": "sonnet-4-6", |
| 127 | + "permissionMode": "default", |
| 128 | + "maxTurns": 100, |
| 129 | + "mcpServers": { |
| 130 | + "filesystem": { |
| 131 | + "type": "stdio", |
| 132 | + "command": "npx", |
| 133 | + "args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"] |
| 134 | + } |
| 135 | + }, |
| 136 | + "hooks": { |
| 137 | + "preToolUse": [], |
| 138 | + "postToolUse": [] |
| 139 | + } |
| 140 | +} |
| 141 | +``` |
| 142 | + |
| 143 | +## Project Configuration |
| 144 | + |
| 145 | +Create `CODEANY.md` (or `CLAUDE.md`) in your project root: |
| 146 | + |
| 147 | +```markdown |
| 148 | +# Project Instructions |
| 149 | + |
| 150 | +## Commands |
| 151 | +- `npm test` to run tests |
| 152 | +- `npm run build` to build |
| 153 | + |
| 154 | +## Code Style |
| 155 | +- Use TypeScript strict mode |
| 156 | +- Prefer functional components |
| 157 | +``` |
| 158 | + |
| 159 | +Also supports: |
| 160 | +- `CODEANY.local.md` / `CLAUDE.local.md` — personal, gitignored |
| 161 | +- `.codeany/rules/*.md` / `.claude/rules/*.md` — modular rules |
| 162 | + |
| 163 | +## Skills |
| 164 | + |
| 165 | +Create custom skills in `.codeany/skills/<name>/SKILL.md`: |
| 166 | + |
| 167 | +```markdown |
| 168 | +--- |
| 169 | +name: deploy |
| 170 | +description: Deploy to production |
| 171 | +argumentHint: <environment> |
| 172 | +--- |
| 173 | + |
| 174 | +Deploy the application to $ARGUMENTS environment. |
| 175 | +Run the deployment script and verify health checks. |
| 176 | +``` |
| 177 | + |
| 178 | +Invoke with: `/deploy staging` |
| 179 | + |
| 180 | +## MCP Servers |
| 181 | + |
| 182 | +Configure MCP servers in `settings.json` or manage with `/mcp`: |
| 183 | + |
| 184 | +```bash |
| 185 | +/mcp # List servers |
| 186 | +/mcp tools # List available tools |
| 187 | +/mcp reconnect X # Reconnect server |
| 188 | +``` |
| 189 | + |
| 190 | +## Update |
| 191 | + |
| 192 | +```bash |
| 193 | +codeany update |
| 194 | +``` |
| 195 | + |
| 196 | +## License |
| 197 | + |
| 198 | +MIT |
0 commit comments