topcheer/ggcode

Fresh Agentic CLI, Desktop, Mobile & More

70

stars

173

commits

Go

primary language

Sep 11, 2026

updated

ggcode.dev

README

ggcode

ggcode

English | 中文

An AI coding agent for the terminal. Understands your codebase, edits files, runs commands, and ships code — with a polished TUI, resumable sessions, and multi-agent support.


Install

macOS / Linux:

curl -fsSL https://ggcode.dev/install.sh | bash

Windows:

irm https://ggcode.dev/install.ps1 | iex

Other methods: Homebrew · winget · npm · pip · build from source

All install scripts default to non-privileged (no sudo / admin required).

Quick Start

# 1. Run ggcode in your project
cd your-project
ggcode

# 2. On first launch, configure your API key (interactive prompt)
#    Or set it directly:
#    Or set up via the interactive wizard on first launch

# 3. Start coding — just type your request

New to ggcode? Read the Getting Started guide.


LAN Chat — Real-Time Team Collaboration

Zero-config P2P messaging between ggcode instances on your LAN

Every ggcode instance automatically discovers other instances on the same local network via mDNS — no relay server, no accounts, no configuration.

FeatureDescription
Auto-discoverymDNS finds peers automatically — zero config
DM & broadcastMessage individuals, teams, or everyone on the LAN
Agent-to-agentRoute messages to @agent for cross-instance delegation
PresenceSee who's online, their project, role, team, and languages
File sharingDrag-and-drop attachments up to 10 MB
Read receiptsTrack message delivery and read status
Cross-platformWorks in TUI, Desktop GUI, and daemon mode
PrivacyMessages stay on your LAN — nothing goes through external servers

Quick example — your agent can collaborate with peers:

You: "ask the platform team to review my PR"
Agent: lanchat(action='send_team', team='platform', message='Can you review PR #123?')

The built-in community key ensures interoperability regardless of individual A2A auth configuration.

📖 Full LAN Chat Guide →


Features

  • Codebase-aware — reads, understands, and edits your entire project
  • Full dev toolkit — file edits, shell commands, Git, LSP, search, batch operations
  • Semantic code search — BM25-based code_search finds conceptually related code, not just keyword matches
  • Code health analysis — cyclomatic complexity, function length, nesting depth metrics via code_health
  • Tech-debt scannerscan_todos surfaces TODO/FIXME/HACK markers with severity ranking and git-blame staleness
  • Browser automation — Go-native CDP for SPA/JS testing without Node.js or Playwright
  • Screenshot capture — full screen, window, or region screenshots for visual debugging
  • Clipboard integration — read from and write to the system clipboard
  • Editor launcheropen_editor opens files in the user's IDE (VS Code, Cursor, JetBrains, Vim, etc.) at a specific line/column, auto-detected from env vars
  • Agent-accessible undoundo_edit lets the LLM revert its own file edits via checkpoints, avoiding error-prone fix-forward when a previous change was wrong
  • Batch file operationsfile_ops (delete, move/rename, mkdir with sandbox enforcement and file-tracker integration) and batch_replace (regex/literal find-and-replace across many files in one call) replace unsafe run_command("rm/mv") with first-class protected tools
  • Schema-constrained tool validation — pre-execution pipeline that validates enum values, numeric bounds (min/max), string length constraints, and strips hallucinated parameters — saving wasted iterations on weak models
  • Adaptive tool timeout — per-tool category-based timeout that adapts to observed latency, replacing a flat 5-minute default with sensible bounds (30–180s per category) so hung tools fail fast instead of wasting minutes
  • Exit code intelligence — when commands fail with signals (137=OOM, 139=segfault, 134=abort, 130=SIGINT, 143=SIGTERM), the agent receives an actionable diagnostic hint instead of a bare exit code, enabling immediate root-cause diagnosis
  • PTC (Programmatic Tool Calling) — the agent writes JavaScript in a sandboxed VM to batch-call read-only tools (read_file, grep, git_log, web_search, etc.) in a single round-trip, dramatically reducing context window consumption for multi-step analysis
  • MCP integration — connect external tools and data sources, with dynamic tool refresh, server logging, full capability detection, and MCP sampling (servers can request LLM completions)
  • gRPC plugins — extend ggcode with custom tools in Go, Python, Node.js, or any language
  • Multi-agent — spawn parallel workers, delegate to teammates, A2A protocol
  • Multi-provider — OpenAI, Anthropic, Gemini, DeepSeek, Kimi, Copilot, and more; configurable reasoning effort and tool choice across all protocols
  • Adaptive sampling — per-turn temperature adjustment based on task phase: low temperature for precise code edits and error recovery, higher for exploration and creative writing
  • LAN Chat — zero-config P2P real-time messaging between instances on your LAN
  • Editor integration — JetBrains, Zed, and ACP-compatible editors via ACP
  • WebUI — built-in web interface accessible from any browser
  • IM integration — control from QQ, Telegram, Discord, Slack, Feishu, DingTalk
  • Scheduled tasks — cron jobs, reminders, and background automation
  • Resumable sessions — pause and resume any conversation
  • Cross-session search/search <query> finds messages by content across all saved sessions, with snippet preview and quick-resume
  • Desktop + Mobile — native apps for macOS, Windows, Linux, iOS, Android

Platforms

PlatformInstall
CLI (macOS/Linux/Windows)This repo — the primary interface
DesktopNative app for macOS, Windows, Linux
MobileiOS (App Store) and Android (Google Play)

Documentation

GuideDescription
Getting StartedFirst steps, API key setup, basic usage
InstallationAll install methods for every platform
CLI ReferenceCommands, flags, pipe mode
ProvidersLLM vendor and endpoint configuration
Slash CommandsIn-TUI command reference
Permission ModesSupervised, plan, auto, bypass, autopilot
MCP ServersConnect external tools via MCP
gRPC PluginsBuild and install custom tool plugins (Go, Python, Node.js)
IM IntegrationQQ, Telegram, Discord, Slack, Feishu, DingTalk
A2A ProtocolCross-instance agent delegation
ACP / EditorJetBrains, Zed, and ACP-compatible editors
DelegationDelegate tasks to Copilot, Claude, Cursor, and other agents
Multi-AgentSub-agents, teammates, and team coordination
LAN ChatReal-time messaging between instances on your LAN
ConfigurationFull config file reference
Adaptive TimeoutPer-tool category-based timeout design
Project MemoryGGCODE.md, AGENTS.md, CLAUDE.md + .cursorrules, .windsurfrules, .clinerules compat
SkillsReusable workflow patterns
Shell Completionbash, zsh, fish, powershell

License

MIT

Contributors

topcheer

172 commits

huangwp

1 commits

topcheer/ggcode

Fresh Agentic CLI, Desktop, Mobile & More

70

stars

173

commits

Go

primary language

Sep 11, 2026

updated

ggcode.dev

README

ggcode

ggcode

English | 中文

An AI coding agent for the terminal. Understands your codebase, edits files, runs commands, and ships code — with a polished TUI, resumable sessions, and multi-agent support.


Install

macOS / Linux:

curl -fsSL https://ggcode.dev/install.sh | bash

Windows:

irm https://ggcode.dev/install.ps1 | iex

Other methods: Homebrew · winget · npm · pip · build from source

All install scripts default to non-privileged (no sudo / admin required).

Quick Start

# 1. Run ggcode in your project
cd your-project
ggcode

# 2. On first launch, configure your API key (interactive prompt)
#    Or set it directly:
#    Or set up via the interactive wizard on first launch

# 3. Start coding — just type your request

New to ggcode? Read the Getting Started guide.


LAN Chat — Real-Time Team Collaboration

Zero-config P2P messaging between ggcode instances on your LAN

Every ggcode instance automatically discovers other instances on the same local network via mDNS — no relay server, no accounts, no configuration.

FeatureDescription
Auto-discoverymDNS finds peers automatically — zero config
DM & broadcastMessage individuals, teams, or everyone on the LAN
Agent-to-agentRoute messages to @agent for cross-instance delegation
PresenceSee who's online, their project, role, team, and languages
File sharingDrag-and-drop attachments up to 10 MB
Read receiptsTrack message delivery and read status
Cross-platformWorks in TUI, Desktop GUI, and daemon mode
PrivacyMessages stay on your LAN — nothing goes through external servers

Quick example — your agent can collaborate with peers:

You: "ask the platform team to review my PR"
Agent: lanchat(action='send_team', team='platform', message='Can you review PR #123?')

The built-in community key ensures interoperability regardless of individual A2A auth configuration.

📖 Full LAN Chat Guide →


Features

  • Codebase-aware — reads, understands, and edits your entire project
  • Full dev toolkit — file edits, shell commands, Git, LSP, search, batch operations
  • Semantic code search — BM25-based code_search finds conceptually related code, not just keyword matches
  • Code health analysis — cyclomatic complexity, function length, nesting depth metrics via code_health
  • Tech-debt scannerscan_todos surfaces TODO/FIXME/HACK markers with severity ranking and git-blame staleness
  • Browser automation — Go-native CDP for SPA/JS testing without Node.js or Playwright
  • Screenshot capture — full screen, window, or region screenshots for visual debugging
  • Clipboard integration — read from and write to the system clipboard
  • Editor launcheropen_editor opens files in the user's IDE (VS Code, Cursor, JetBrains, Vim, etc.) at a specific line/column, auto-detected from env vars
  • Agent-accessible undoundo_edit lets the LLM revert its own file edits via checkpoints, avoiding error-prone fix-forward when a previous change was wrong
  • Batch file operationsfile_ops (delete, move/rename, mkdir with sandbox enforcement and file-tracker integration) and batch_replace (regex/literal find-and-replace across many files in one call) replace unsafe run_command("rm/mv") with first-class protected tools
  • Schema-constrained tool validation — pre-execution pipeline that validates enum values, numeric bounds (min/max), string length constraints, and strips hallucinated parameters — saving wasted iterations on weak models
  • Adaptive tool timeout — per-tool category-based timeout that adapts to observed latency, replacing a flat 5-minute default with sensible bounds (30–180s per category) so hung tools fail fast instead of wasting minutes
  • Exit code intelligence — when commands fail with signals (137=OOM, 139=segfault, 134=abort, 130=SIGINT, 143=SIGTERM), the agent receives an actionable diagnostic hint instead of a bare exit code, enabling immediate root-cause diagnosis
  • PTC (Programmatic Tool Calling) — the agent writes JavaScript in a sandboxed VM to batch-call read-only tools (read_file, grep, git_log, web_search, etc.) in a single round-trip, dramatically reducing context window consumption for multi-step analysis
  • MCP integration — connect external tools and data sources, with dynamic tool refresh, server logging, full capability detection, and MCP sampling (servers can request LLM completions)
  • gRPC plugins — extend ggcode with custom tools in Go, Python, Node.js, or any language
  • Multi-agent — spawn parallel workers, delegate to teammates, A2A protocol
  • Multi-provider — OpenAI, Anthropic, Gemini, DeepSeek, Kimi, Copilot, and more; configurable reasoning effort and tool choice across all protocols
  • Adaptive sampling — per-turn temperature adjustment based on task phase: low temperature for precise code edits and error recovery, higher for exploration and creative writing
  • LAN Chat — zero-config P2P real-time messaging between instances on your LAN
  • Editor integration — JetBrains, Zed, and ACP-compatible editors via ACP
  • WebUI — built-in web interface accessible from any browser
  • IM integration — control from QQ, Telegram, Discord, Slack, Feishu, DingTalk
  • Scheduled tasks — cron jobs, reminders, and background automation
  • Resumable sessions — pause and resume any conversation
  • Cross-session search/search <query> finds messages by content across all saved sessions, with snippet preview and quick-resume
  • Desktop + Mobile — native apps for macOS, Windows, Linux, iOS, Android

Platforms

PlatformInstall
CLI (macOS/Linux/Windows)This repo — the primary interface
DesktopNative app for macOS, Windows, Linux
MobileiOS (App Store) and Android (Google Play)

Documentation

GuideDescription
Getting StartedFirst steps, API key setup, basic usage
InstallationAll install methods for every platform
CLI ReferenceCommands, flags, pipe mode
ProvidersLLM vendor and endpoint configuration
Slash CommandsIn-TUI command reference
Permission ModesSupervised, plan, auto, bypass, autopilot
MCP ServersConnect external tools via MCP
gRPC PluginsBuild and install custom tool plugins (Go, Python, Node.js)
IM IntegrationQQ, Telegram, Discord, Slack, Feishu, DingTalk
A2A ProtocolCross-instance agent delegation
ACP / EditorJetBrains, Zed, and ACP-compatible editors
DelegationDelegate tasks to Copilot, Claude, Cursor, and other agents
Multi-AgentSub-agents, teammates, and team coordination
LAN ChatReal-time messaging between instances on your LAN
ConfigurationFull config file reference
Adaptive TimeoutPer-tool category-based timeout design
Project MemoryGGCODE.md, AGENTS.md, CLAUDE.md + .cursorrules, .windsurfrules, .clinerules compat
SkillsReusable workflow patterns
Shell Completionbash, zsh, fish, powershell

License

MIT

Contributors

topcheer

172 commits

huangwp

1 commits

Languages

Go

71.7%

JavaScript

11.8%

HTML

9.0%

TypeScript

3.9%

Dart

2.1%