Documentation

ARKA Code CLI

Terminal-based agentic coding assistant powered by ARKAbrain

ARKA Code is a powerful terminal-based coding assistant with a beautiful dashboard UI. It can read, write, and edit files, execute commands, search codebases, and help you with complex coding tasks - all through natural language.

ARKA Code Welcome Screen
The ARKA Code welcome screen with colorful logo

Key Features

  • Beautiful dashboard UI with sidebar for chats, files, and tools
  • Intelligent model routing via ARKAbrain
  • Agentic coding with file read/write/edit capabilities
  • Multi-model comparison mode
  • Keyboard shortcuts for fast navigation
  • Full and minimal layout modes

Installation

Install ARKA Code globally using npm:

Terminal
$npm install -g @arka-ai/code

Quick Start

Terminal
$arka

Just type naturally. The CLI features a clean layout optimized for coding. Use keyboard shortcuts for quick navigation.

ARKA Code Basic Layout
The basic chat interface layout
ARKA Code Response
Response with status badges showing tokens, duration, and cost

Layout Modes

ARKA Code has two layout modes. Press ^L (Ctrl+L) to toggle between them.

Full Dashboard Layout

The default layout shows a header with your username and token stats, a sidebar with tabs for chats (💬), files (📁), and tools (🔧), and a main content area for conversations.

Minimal Mode

A streamlined view for smaller terminals or VS Code integrated terminal. Shows just the essentials with keyboard shortcut hints.

Authentication

ARKA Code uses browser-based authentication for a seamless experience.

Terminal
$arka login
Opening browser for authentication... ✓ Successfully logged in as user@example.com

You can also use an API key directly:

# Environment variable
export ARKA_API_KEY=arka_xxxxx

# Command line flag
arka --api-key arka_xxxxx

Configuration

ARKA Code stores configuration in ~/.arka/config.json:

~/.arka/config.json
{
  "provider": "arka",
  "model": "auto",
  "tone": "concise",
  "layoutEnabled": true,
  "enabledTools": ["read", "write", "edit", "glob", "grep", "bash"]
}

Tools

ARKA Code has access to these tools. Press Ctrl+T to open the tools panel.

Tools Panel
The Tools Panel showing available tools
CommandDescription
readRead file contents
writeCreate or overwrite files
editEdit files with precise replacements
globFind files by pattern
grepSearch file contents
bashExecute shell commands

Permission Modes

Control how ARKA Code handles file and command permissions:

CommandDescription
askPrompt for permission before each action (default)
auto-editAuto-approve file edits, ask for commands
auto-allAuto-approve all actions (use with caution)
Terminal
$arka -p auto-edit 'refactor this file'
$arka --read-only

ARKAbrain Routing

ARKA Code uses ARKAbrain to automatically route your requests to the best AI model. The status bar shows the current mode:

CommandDescription
⚡ fastFastest responses, smaller models
⚖ balancedBest balance of speed and quality (default)
✦ qualityBest models, may be slower

Example Workflow

Terminal
You: fix the type errors in src/utils/date.ts
📄 │ read: path=src/utils/date.ts ⚠ │ Found issue: `date` might be undefined I'll fix the type error by adding a null check. ┌─ Edit: src/utils/date.ts ─────────────────┐ │ - return date.toISOString(); │ │ + return date?.toISOString() ?? ''; │ └───────────────────────────────────────────┘ Allow? [y/n/always]:
y
✓ │ File updated ⚡ │ bash: npm run typecheck ✓ │ No type errors

Keyboard Shortcuts

ARKA Code uses Ctrl+ shortcuts for all commands, so they work whether you're typing or not.

Footer Shortcuts
The footer bar showing available keyboard shortcuts
CommandDescription
Ctrl+AActions panel (all shortcuts)
Ctrl+MModel selector - choose AI model
Ctrl+TTools panel - enable/disable tools
Ctrl+YCopy last answer (yank)
Ctrl+LToggle layout
Ctrl+QQuit
?Help
EscCancel/close panel
Actions Panel
The Actions Panel showing all available keyboard shortcuts

CLI Options

Usage: arka [options] [command] [prompt...]

Arguments:
  prompt                     Initial prompt to send

Options:
  -V, --version              Output version number
  -k, --api-key <key>        API key (overrides config)
  -u, --api-url <url>        API URL (overrides config)
  -r, --resume               Resume previous session
  -p, --permission <mode>    Permission mode: ask, auto-edit, auto-all
  --read-only                Read-only mode (no file writes or commands)
  -h, --help                 Display help

Commands:
  login                      Authenticate with ARKA AI
  logout                     Log out and clear credentials
  compare [prompt...]        Multi-model comparison mode

Compare Mode

Compare responses from multiple AI models side-by-side:

Terminal
$arka compare 'write a hello world function in python'
Compare Mode
Multi-model comparison showing responses from GPT-4o, Claude, and DeepSeek

Troubleshooting

API Key Not Found

If you see "No API key found", set your API key:

export ARKA_API_KEY=your_api_key
# or
arka --api-key your_api_key

Permission Issues

If file operations are denied, check that you're not in read-only mode and that you have proper file permissions.