aiko
AI + coding. A Ruby CLI coding agent that runs on OpenAI-compatible LLM APIs (DeepSeek, OpenRouter, etc.). It gives the LLM tools for file operations, command execution, and search, and carries out coding tasks autonomously through an agent loop.
The name comes from "AI + コーディング (coding)" — taking "コ" (ko), the first syllable of コーディング, gives AI + ko = aiko.
Installation
bundle install
rake install # build the gem and install it locally (makes the `aiko` command available)
Configuration
The API key is set via an environment variable (it cannot be set in a config file).
# DeepSeek (default; uses deepseek-v4-flash)
export AIKO_API_KEY=sk-...
# Using OpenRouter (e.g. the more capable deepseek-v4-pro)
export AIKO_API_KEY=sk-or-...
export AIKO_BASE_URL=https://openrouter.ai/api/v1
export AIKO_MODEL=deepseek/deepseek-v4-pro
Optionally, you can set base_url / model / max_iterations in ~/.aiko/config.json.
The precedence is: command-line options > environment variables > config file > defaults.
Usage
# One-shot: process a single prompt and exit
aiko "Create fizzbuzz.rb, run it, and verify it works"
# REPL: interactive mode (/help for command list, /exit to quit)
aiko
# Main options
aiko -y "..." # auto-approve all tool executions
aiko -w DIR "..." # specify working directory
aiko -m MODEL "..." # override the model name
aiko --max-iterations 30 # cap the number of agent loop iterations
aiko asks for your approval before writing/editing files or running commands.
Warning:
-y/--yesruns file writes/edits and shell commands proposed by the LLM without confirmation. Since operations you cannot review will run unconditionally, use this at your own risk, and only in a directory you trust.
Development
rake test # run tests (default task)
rake run -- -y "..." # try it out without installing
See doc/spec/ for the specification and doc/implementation/ for the implementation notes.
Author
Satoshi Takei — GitHub @takeisa / X @takeisa
Developed using an AI coding agent. See doc/ for the design and implementation notes.