{"id":43385747,"url":"https://github.com/ginkida/gokin","last_synced_at":"2026-06-10T13:01:00.045Z","repository":{"id":335654928,"uuid":"1146591936","full_name":"ginkida/gokin","owner":"ginkida","description":"A powerful CLI tool that brings AI assistance directly to your terminal. Gokin understands your codebase and helps with file operations, code search, shell commands, git workflows, task management, and more - all through natural language.           ","archived":false,"fork":false,"pushed_at":"2026-06-02T15:10:02.000Z","size":4743,"stargazers_count":91,"open_issues_count":3,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-06-02T17:11:16.124Z","etag":null,"topics":["ai","anthropic","cli","coding-assistant","deepseek","developer-tools","gemini","glm","golang","kimi","llm","minimax","ollama","tui"],"latest_commit_sha":null,"homepage":"https://gokin.ginkida.dev","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ginkida.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-31T10:54:57.000Z","updated_at":"2026-06-02T15:17:45.000Z","dependencies_parsed_at":"2026-02-04T12:08:45.938Z","dependency_job_id":null,"html_url":"https://github.com/ginkida/gokin","commit_stats":null,"previous_names":["ginkida/gooner"],"tags_count":278,"template":false,"template_full_name":null,"purl":"pkg:github/ginkida/gokin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ginkida%2Fgokin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ginkida%2Fgokin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ginkida%2Fgokin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ginkida%2Fgokin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ginkida","download_url":"https://codeload.github.com/ginkida/gokin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ginkida%2Fgokin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34153483,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","anthropic","cli","coding-assistant","deepseek","developer-tools","gemini","glm","golang","kimi","llm","minimax","ollama","tui"],"created_at":"2026-02-02T10:30:24.750Z","updated_at":"2026-06-10T13:01:00.030Z","avatar_url":"https://github.com/ginkida.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"![Gokin](https://minio.ginkida.dev/minion/github/gokin.jpg)\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/ginkida/gokin/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/ginkida/gokin\" alt=\"Release\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/ginkida/gokin/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/ginkida/gokin\" alt=\"Stars\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/ginkida/gokin/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/downloads/ginkida/gokin/total\" alt=\"Downloads\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/ginkida/gokin/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/ginkida/gokin\" alt=\"License\"\u003e\u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Go-1.25+-00ADD8?logo=go\" alt=\"Go Version\"\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://minio.ginkida.dev/minion/github/gokin-cli-cut.gif\" alt=\"Gokin Demo\" width=\"800\"\u003e\n\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003eAI-powered coding agent for your terminal\u003cbr\u003eKimi · GLM · MiniMax · DeepSeek · Ollama — 100% open source\u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#installation\"\u003eInstall\u003c/a\u003e •\n  \u003ca href=\"#quick-start\"\u003eQuick Start\u003c/a\u003e •\n  \u003ca href=\"#why-gokin\"\u003eWhy Gokin?\u003c/a\u003e •\n  \u003ca href=\"#features\"\u003eFeatures\u003c/a\u003e •\n  \u003ca href=\"#providers\"\u003eProviders\u003c/a\u003e •\n  \u003ca href=\"#configuration\"\u003eConfig\u003c/a\u003e •\n  \u003ca href=\"#contributing\"\u003eContribute\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## Why Gokin? \u003ca id=\"why-gokin\"\u003e\u003c/a\u003e\n\nMost AI coding tools are closed-source, route your code through third-party servers, and give you zero control over what gets sent to the model. Gokin is different: **a fast, secure, zero-telemetry CLI where your code goes directly to the provider you chose — and nothing else leaves your machine.**\n\nFive providers, one interface: **Kimi, GLM, MiniMax, DeepSeek** (via Anthropic-compatible APIs) and **Ollama** (fully local). Secrets and credentials are automatically redacted before reaching any model, TLS is enforced on every connection, and no proxy or middleware ever touches your data.\n\n| | Gokin | Claude Code | Cursor |\n|---|-------|-------------|--------|\n| **Price** | Free → Pay-per-use | $20+/month | $20+/month |\n| **Providers** | 5 (Kimi, GLM, MiniMax, DeepSeek, Ollama) | 1 (Claude) | Multi |\n| **Offline** | Ollama | — | — |\n| **Tools** | 59 built-in + MCP | ~30 | ~30 |\n| **Agents** | 5 parallel, shared memory | Basic | — |\n| **Direct API** | Zero proxies | Yes | Routes through Cursor servers |\n| **Security** | TLS 1.2+, secret redaction, sandbox, 3-level permissions | Basic | Basic |\n| **Open Source** | Yes | — | — |\n\n**Choose your stack:**\n\n| Stack | Cost | Best For |\n|-------|------|----------|\n| **Gokin + DeepSeek V4** | Pay-per-use | **Recommended** — 1M context, top SWE-bench reasoning, prompt caching (95% savings) |\n| **Gokin + Kimi Coding Plan** | Subscription | Default — 262K context, thinking + tool use, coding-tuned |\n| **Gokin + GLM Coding Plan** | ~$3/month | Budget-friendly daily coding, GLM-5.1 with 200K context |\n| **Gokin + MiniMax** | Pay-per-use | 200K context, strong on agentic coding |\n| **Gokin + Ollama** | Free | Privacy, offline, no API costs |\n\nAll cloud providers are daily-driver tier — tested against every release.\n\n---\n\n## Installation \u003ca id=\"installation\"\u003e\u003c/a\u003e\n\n### One-liner\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/ginkida/gokin/main/install.sh | sh\n```\n\n### From source\n\n```bash\ngit clone https://github.com/ginkida/gokin.git\ncd gokin\ngo build -o gokin ./cmd/gokin\n./gokin --setup\n```\n\n### Requirements\n\n- **Go 1.25+** (build from source)\n- **One AI provider** (see [Providers](#providers) below)\n\n---\n\n## Quick Start \u003ca id=\"quick-start\"\u003e\u003c/a\u003e\n\n```bash\n# Interactive setup — picks provider + API key\ngokin --setup\n\n# Or set an API key and go\nexport GOKIN_DEEPSEEK_KEY=\"sk-...\"   # DeepSeek V4 (recommended)\ngokin\n\n# Other providers work the same way:\n# export GOKIN_KIMI_KEY=\"sk-kimi-...\"   # Kimi Coding Plan (default)\n# export GOKIN_GLM_KEY=\"...\"            # GLM Coding Plan\n# export GOKIN_MINIMAX_KEY=\"...\"        # MiniMax\n# Ollama needs no key — just run a local model\n```\n\n**Then just talk naturally:**\n\n```\n\u003e Explain how auth works in this project\n\u003e Add user registration endpoint with validation\n\u003e Run the tests and fix any failures\n\u003e Refactor this module to use dependency injection\n\u003e Create a PR for these changes\n```\n\n---\n\n## Key Features \u003ca id=\"features\"\u003e\u003c/a\u003e\n\n### Code Understanding\n- **Multi-file analysis** — grep + glob + read across the whole codebase\n- **Session memory** — auto-summarizes files, tools, errors, decisions; survives compaction\n- **Context-aware execution** — read-only tools run in parallel, write tools serialized\n\n### Project Instructions\n```\nPriority:  Low ──────────────────────────────── High\n           Global → User → Project → Local\n\nGlobal:    ~/.config/gokin/GOKIN.md\nUser:      ~/.gokin/GOKIN.md\nProject:   ./GOKIN.md, .gokin/rules/*.md\nLocal:     ./GOKIN.local.md (git-ignored)\n```\nAll layers merged automatically. `@include` directive for composability. File watching with auto-reload.\n\n### 59 Built-in Tools\n- **Files**: read, write, edit, diff, copy, move, delete, refactor, batch\n- **Search**: glob, grep, tree, history_search\n- **Git**: status, commit, diff, branch, log, blame, PR\n- **Run**: bash, run_tests, ssh, env, kill_shell\n- **Plan**: todo, task, enter/exit plan_mode, coordinate, verify_code\n- **Memory**: memorize, shared_memory, pin_context, scratchpad\n- **MCP**: manage servers from chat via `mcp_admin` tool, or `/mcp add` command (stdio + http transports, per-server permissions)\n- **Parallel execution** — read-only tools run concurrently when the model calls multiple\n\n### Multi-Agent System\n- Up to 5 parallel agents with shared memory\n- Automatic task decomposition via coordinator\n- Provider failover — agents try fallback providers on failure\n- Git worktree support — isolated branch work\n- Real-time streaming output\n\n### Autonomous Loops\n```bash\n/loop check the deploy every 20m     # interval-based\n/loop fix bugs in this app            # self-paced (model decides when to continue)\n```\nBackground scheduler fires recurring tasks without blocking the foreground. Auto-pauses after 5 consecutive failures. Persists across sessions.\n\n### Plan Mode\nPhysical tool restriction — plan mode limits the model to read-only tools (read, grep, glob, diff, git status/log). Auto-exits when you approve the plan, restoring full tool access.\n\n### Cost Tracking\n- Per-model pricing for all cloud providers (Ollama is free)\n- Real-time cost in status bar\n- `/cost` and `/stats` commands\n\n### Prompt Caching\n- `cache_control` breakpoints for Kimi, MiniMax, and DeepSeek — up to 90% input cost savings\n- System prompt, tools, and conversation prefix cached\n\n### Extended Thinking\n- Full multi-turn support for Kimi / GLM / DeepSeek reasoning models\n- Thinking blocks with `signature` preserved across turns, including tool calls\n\n### Safety \u0026 Permissions\n- **3-level permissions**: Low (auto), Medium (ask once), High (always ask)\n- **Sandbox mode** for bash commands\n- **Inline diff preview** — 3-line preview cards before applying changes\n- **Undo/Redo** for all file operations (`/undo N` up to 20 steps)\n- **Proactive compaction** — predicts token growth and compacts before hitting limits\n\n---\n\n## Security \u0026 Privacy \u003ca id=\"security\"\u003e\u003c/a\u003e\n\n### Zero Proxies\n\n```\n┌──────────┐          ┌──────────────────────┐\n│  Gokin   │ ──TLS──▶ │  Provider API        │\n│  (local) │          │  (Kimi / Z.AI / ...) │\n│          │ ◀──TLS── │                      │\n└──────────┘          └──────────────────────┘\n       No middle servers. No telemetry. Direct.\n```\n\nEvery API call goes directly from your machine to the provider's endpoint. No proxy servers, no analytics gateways. You can verify this — it's open source.\n\n### Secret Redaction\n\nLLM tool calls can accidentally expose secrets found in your codebase. Gokin automatically redacts them **before** they reach the model:\n\n| Category | Examples |\n|----------|----------|\n| API keys | `AKIA...`, `ghp_...`, `sk_live_...`, `AIza...` |\n| Tokens | Bearer tokens, JWT (`eyJ...`), Slack/Discord tokens |\n| Credentials | Database URIs (`postgres://user:pass@...`), Redis, MongoDB |\n| Crypto material | PEM private keys, SSH keys |\n\n24 regex patterns, applied to every tool result and audit log.\n\n### Defense in Depth\n\n| Layer | What it does |\n|-------|-------------|\n| **TLS 1.2+** | No weak ciphers, certificate verification always on |\n| **Sandbox** | Bash in isolated namespace, safe env whitelist (~35 vars) |\n| **Command validation** | 50+ blocked patterns: fork bombs, reverse shells, credential theft |\n| **SSH validation** | Host allowlist, loopback blocked, injection prevention |\n| **Path validation** | Symlink resolution, directory traversal blocked |\n| **SSRF protection** | Private IPs, loopback, link-local blocked |\n| **Audit trail** | Every tool call logged with sanitized args |\n\n### Keys Stay Local\n\n- Loaded from env vars or `~/.config/gokin/config.yaml`\n- Masked in all UI displays (`sk-12****cdef`)\n- Never included in conversation history or tool results\n- Ollama mode: zero network calls — fully airgapped\n\n---\n\n## Providers \u003ca id=\"providers\"\u003e\u003c/a\u003e\n\n| Provider | Models | Context | Cost ($/1M tokens) |\n|----------|--------|---------|---------------------|\n| **DeepSeek** | `deepseek-v4-pro`, `v4-flash`, `chat`, `reasoner` | 1M input, 384K output | Pro $0.44/$0.87, Flash $0.14/$0.28 |\n| **Kimi** | `kimi-for-coding` | 262K input, 32K output | $0.95/$4.00 |\n| **GLM** | `glm-5.1`, `glm-5`, `glm-5-turbo`, `glm-4.7`, `glm-4.5` | 200K input, 131K output | 5.1: $4/$16, 5: $1/$4 |\n| **MiniMax** | `MiniMax-M2.7`, `M2.7-highspeed`, `M2.5`, `M2.5-highspeed` | 200K input, 16K output | M2.7: $0.30/$1.20 |\n| **Ollama** | Any local model | Varies | Free |\n\nAll cloud providers use Anthropic-compatible APIs and share the same client — fewer moving parts, consistent behavior. Prompt caching is supported on Kimi, MiniMax, and DeepSeek (live-verified 95% savings on repeat prefixes). Ollama uses its own native client and makes zero network calls.\n\nSwitch anytime:\n```\n/provider deepseek    →  /model deepseek-v4-pro\n/provider kimi        →  /model kimi-for-coding\n/provider glm         →  /model glm-5.1\n/provider minimax     →  /model MiniMax-M2.7\n/provider ollama      →  /model llama3.2\n```\n\n---\n\n## Commands \u003ca id=\"commands\"\u003e\u003c/a\u003e\n\n65 slash commands. Some highlights:\n\n| Command | Description |\n|---------|-------------|\n| `/login \u003cprovider\u003e \u003ckey\u003e` | Set API key |\n| `/provider` / `/model` | Switch provider or model |\n| `/plan` | Enter read-only planning mode |\n| `/commit` / `/pr` | Git commit, create GitHub PR |\n| `/undo [N]` | Undo last N file changes (max 20) |\n| `/loop \u003ctask\u003e [interval]` | Autonomous background loop |\n| `/mcp [list\\|add\\|remove]` | Manage MCP servers |\n| `/stats` / `/cost` | Session statistics, token costs |\n| `/doctor` | Diagnostics check |\n| `/shortcuts` | Keyboard shortcuts reference |\n| `/help` | Show all 65 commands |\n\n**Aliases:** `p`=plan, `c`=commit, `m`=model, `s`=status, `u`=undo, `r`=redo, `h`=help, `q`=clear, `st`=stats, `pr`=pr\n\n### Keyboard Shortcuts\n\n| Key | Action |\n|-----|--------|\n| `Enter` | Send message |\n| `Ctrl+C` | Interrupt / cancel |\n| `Ctrl+K` | Model selector |\n| `Ctrl+E` | Expand/collapse tool output |\n| `Ctrl+P` | Command palette |\n| `Tab` | Autocomplete |\n| `↑/↓` | History |\n| `y/n` | Accept/reject diff |\n\n---\n\n## Configuration \u003ca id=\"configuration\"\u003e\u003c/a\u003e\n\n`~/.config/gokin/config.yaml`\n\n### Minimal\n\n```yaml\n# DeepSeek (recommended)\napi: { deepseek_key: \"sk-...\", active_provider: \"deepseek\" }\nmodel: { name: \"deepseek-v4-pro\" }\n\n# Or Kimi (default)\napi: { kimi_key: \"sk-kimi-...\", active_provider: \"kimi\" }\nmodel: { name: \"kimi-for-coding\" }\n\n# Or GLM / MiniMax\napi: { glm_key: \"...\", active_provider: \"glm\" }\nmodel: { name: \"glm-5.1\" }\n```\n\n### Full Reference\n\n```yaml\napi:\n  kimi_key: \"\"\n  deepseek_key: \"\"\n  glm_key: \"\"\n  minimax_key: \"\"\n  ollama_key: \"\"                  # optional, for remote Ollama with auth\n  active_provider: \"kimi\"         # kimi | deepseek | glm | minimax | ollama\n  ollama_base_url: \"http://localhost:11434\"\n  retry:\n    max_retries: 10\n    http_timeout: 120s\n    stream_idle_timeout: 30s\n\nmodel:\n  name: \"kimi-for-coding\"\n  temperature: 0.6\n  max_output_tokens: 32768\n  custom_base_url: \"\"             # override endpoint\n  enable_thinking: false          # supported on Kimi, DeepSeek, GLM, MiniMax\n  thinking_budget: 0              # 0 = provider default\n\ntools:\n  timeout: 2m\n  model_round_timeout: 5m\n  bash: { sandbox: true }\n\npermission:\n  enabled: true\n  default_policy: \"ask\"           # allow | ask | deny\n\nplan:\n  enabled: true\n  require_approval: true\n\nmcp:\n  enabled: false                  # enable MCP server support\n  servers: {}                     # server configs (stdio/http)\n```\n\n---\n\n## Architecture \u003ca id=\"architecture\"\u003e\u003c/a\u003e\n\n```\ngokin/\n├── cmd/gokin/          # CLI entry point\n├── internal/\n│   ├── app/            # Orchestrator (~2.7K LOC) \u0026 message loop (~3.7K LOC)\n│   ├── agent/          # Multi-agent system (~4.8K LOC)\n│   ├── client/         # AnthropicClient (Kimi/GLM/MiniMax/DeepSeek) + OllamaClient\n│   ├── tools/          # 59 built-in tools, 9 tool sets\n│   ├── mcp/            # MCP client + manager (stdio/http)\n│   ├── loops/          # Autonomous loop scheduler\n│   ├── ui/             # Bubble Tea TUI (46 source files, Graphite+Violet theme)\n│   ├── config/         # YAML config\n│   ├── permission/     # 3-level security + per-MCP-server isolation\n│   ├── memory/         # Persistent memory\n│   └── ...             # 36 packages total\n```\n\n**610 Go files (376 source, 234 test) • 100% Go • 65 slash commands**\n\n---\n\n## Contributing \u003ca id=\"contributing\"\u003e\u003c/a\u003e\n\n```bash\ngit clone https://github.com/ginkida/gokin.git\ncd gokin\ngo build -o gokin ./cmd/gokin\ngo test -race ./...    # 36 packages, all must pass\ngo vet ./...\n```\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for code style and PR process.\n\n---\n\n## License \u003ca id=\"license\"\u003e\u003c/a\u003e\n\n[MIT](LICENSE)\n\n---\n\n## Acknowledgments \u003ca id=\"acknowledgments\"\u003e\u003c/a\u003e\n\n- [Bubble Tea](https://github.com/charmbracelet/bubbletea) — TUI framework\n- [Lipgloss](https://github.com/charmbracelet/lipgloss) — Terminal styling\n- [Ollama](https://github.com/ollama/ollama) — Local LLM runtime\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fginkida%2Fgokin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fginkida%2Fgokin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fginkida%2Fgokin/lists"}