Gokin is an open-source AI coding agent (CLI tool) that runs in the terminal, developed by ginkida and hosted on GitHub. It interacts with developers through natural language, can understand the entire codebase, and assists with everyday development work such as file operations, code search, Shell command execution, Git workflows, and task management. The project focuses on "100% open source, zero telemetry," with code sent directly to the model provider chosen by the user, without passing through any proxy or intermediary server.
Purpose
Gokin is positioned as an AI programming assistant within the terminal for developers, suitable for scenarios such as code understanding, file editing, command execution, Git operations, and task planning. It can serve as a daily development assistance tool and can also run single requests in headless mode within automation and CI processes.
Main Capabilities
- Code Understanding: Multi-file analysis, supporting grep, glob, and read for cross-codebase retrieval; after installing gopls, Go symbol lookup, references, and post-edit diagnostics are automatically enabled; session memory can automatically summarize files, tools, errors, and decisions, and retain them after context compression.
- Built-in Tools: A total of 59 built-in tools, covering file reading, writing, and editing, search, Git operations (status, commit, diff, branch, log, blame, PR), command execution (bash, run_tests, ssh, env), task planning, memory management, and MCP server management. Read-only tools can execute in parallel, while write tools are serialized.
- Multi-Agent System: Up to 5 parallel agents sharing memory, supporting automatic task decomposition, provider failover, Git worktree isolated branch work, and real-time streaming output.
- Skill System: SKILL.md workflows can be discovered from .gokin/skills/, .claude/skills/, ~/.config/gokin/skills/, and ~/.claude/skills/, skills are loaded on demand, and their rendered instructions remain retained after context compression.
- Permissions and Security: 3 levels of permissions (low/medium/high), bash sandbox mode, inline diff preview, file operation undo/redo (up to 20 steps), plan-scoped undo/redo. Secrets are kept only locally, displayed masked in the UI, and do not enter the conversation history or tool results. Ollama mode has zero network calls.
- Sensitive information redaction: Built-in 24 regex rules automatically redact all tool results and audit logs to prevent secrets in the codebase from being accidentally sent to the model.
- Cost tracking: Supports per-model pricing for each cloud provider (Ollama is free), displays costs in real time in the status bar, and provides the /cost and /stats commands. Kimi, MiniMax, and DeepSeek support cache control breakpoints.
- Extended thinking: Full support for multi-turn thinking with Kimi / GLM / DeepSeek reasoning models, with thinking block signatures preserved across turns.
- Autonomous loop: A background scheduler can trigger periodic tasks without blocking the foreground; after 5 consecutive failures it automatically pauses and persists across sessions.
- Automation and CI: Run a single request non-interactively via -p (--print) or --headless, with support for json and stream-json output formats, making script integration easy.
- Python execution: repl_exec supports a bounded kernel, allowing you to inspect state or reset it, with limited resource usage; exceeding the memory limit returns a typed error and discards the Python generation.
Usage
- Installation: Requires Go 1.25+ to build from source; you can also refer to the installation instructions in the repository README.
- Configuration: The configuration file is located at ~/.config/gokin/config.yaml, and another path can be specified via --config. Providers include Kimi, GLM, MiniMax, DeepSeek (all via Anthropic-compatible APIs) and Ollama (fully local). GLM coding plan users can enable the web_search_prime tool with /set glmsearch on.
- Interaction: Simply type in natural language in the terminal; 65 slash commands are provided (such as /plan, /commit, /model, /undo, /redo, etc.) along with keyboard shortcuts; Ctrl+S or /settings opens the interactive settings interface.
- Headless mode: Run with gokin -p "your request" or --headless; you can pass the prompt with --prompt or read it from standard input; --tools, --allowedTools, --disallowedTools are used to precisely control the tool capability allowlist and deny rules; --permission-mode supports modes such as default, acceptEdits, dontAsk, bypassPermissions, and plan.
- Model switching: Switch models at any time; Kimi prompt caching is bound to the model, so after switching it is recommended to use /clear to start a new session.
Use cases
- Code understanding, refactoring, searching, and file operations within the terminal.
- Git workflow assistance, such as commits, branches, and PR operations.
- Invoking in single-request mode in CI/automation scripts, combined with the dontAsk permission mode for deterministic behavior.
- For developers who are sensitive about data privacy and want to run fully locally (Ollama) or connect directly to their chosen cloud provider.
- Scenarios that require multi-agent parallel processing for complex task decomposition.
Limitations
- Requires Go 1.25+ to build from source; information on simpler installation methods such as binary packages is not yet provided.
- Cloud providers require the corresponding API credentials; Ollama requires locally deployed models.
- Python execution capability is limited by kernel resources; exceeding the limit discards the entire Python generation.
- engine.mode and engine.repl are limited to being bound at startup; changes during runtime require a restart to take effect.
- This tool is a command-line interface, with no graphical interface version.
- Some features (such as gopls MCP support and GLM web_search_prime) depend on additional conditions or configuration.
The project is written in the Go language, with a total of 610 Go files (376 source files, 234 test files), 100% Go.