SG

shauryagangrade/gcode

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

7 stars 质量 69 趋势 35Apache-2.0

A local, AI-powered CLI that lets you chat with free LLMs (via OpenRouter) to edit files, run shell commands, and manage git—all from your terminal.

概览

A local, interactive AI coding CLI. Chat with a free LLM (via OpenRouter) that can read/write/edit files, run shell commands (with your approval), search your codebase, and work with git. GCode is community-built, and contributions of every kind are welcome — bug reports, docs, tests, and features. - Start with a good first issue or a help wanted issue — both are reserved for contributors submitting their first PR to GCode. - Read CONTRIBUTING.md before opening a pull request. See the Windows setup and troubleshooting guide for native, WSL2, and Git Bash instructions and known limitations. GCode reads your API key from ~/.gcode/.env (not a project-root .env). Create it from the template and add your OpenRouter API key: Get one at https://openrouter.ai/keys. (OPENAI_API_KEY is also accepted as a fallback.) GCode reads optional settings from a .gcoderc file (in the project root, or ~/.gcode/.gcoderc for user-wide defaults). The format is simple key = value lines with # comments.

README

以下为原文 README 节选,完整内容请查看原文。

GCode

A local, interactive AI coding CLI. Chat with a free LLM (via OpenRouter) that can read/write/edit files, run shell commands (with your approval), search your codebase, and work with git.

Contributing

GCode is community-built, and contributions of every kind are welcome — bug reports, docs, tests, and features.

Install

pip install -e .

On Windows? See the Windows setup and troubleshooting guide for native, WSL2, and Git Bash instructions and known limitations.

Setup

GCode reads your API key from ~/.gcode/.env (not a project-root .env). Create it from the template and add your OpenRouter API key:

mkdir -p ~/.gcode
cp .env.example ~/.gcode/.env

Then edit ~/.gcode/.env:

OPENROUTER_API_KEY=sk-or-...

Get one at https://openrouter.ai/keys. (OPENAI_API_KEY is also accepted as a fallback.)

Configuration file

GCode reads optional settings from a .gcoderc file (in the project root, or ~/.gcode/.gcoderc for user-wide defaults). The format is simple key = value lines with # comments. Command-line flags and environment variables still take precedence over the file.

# .gcoderc
model = nvidia/nemotron-3-super-120b-a12b:free
auto_approve = false
bash_timeout = 300
system_prompt = You are GCode, a coding agent.

Supported keys:

Key Type Default Description
model string first free model Default model id (overridden by --model / GCODE_MODEL)
auto_approve bool false Skip bash confirmation (overridden by --yes)
bash_timeout int 300 Seconds before a bash command is killed
system_prompt string built-in Custom system prompt for new sessions

Skills

A skill is a Markdown file with extra instructions for GCode to follow — a house style, a domain checklist, project-specific conventions. Drop one into .gcode/skills/.md (project-local) or ~/.gcode/skills/.md (user-wide, available in every project); a project skill overrides a user

在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add shauryagangrade/gcode
新手?先看 mcpskill.org 教程 →