convez.ai
SkillDevOps & InfraestruturaIntermediário
WuSuBuDuoMing

NeoCode — Assistente de IA para Coding em Terminal

WuSuBuDuoMing/aidev

Agente IA nativo para terminal com suporte multi-modelo e zero dependências

Ver no GitHub
BomPluginScore · de 0 a 100

Agente de coding IA nativo em Go, otimizado para modelos chineses (DeepSeek, Qwen, GLM) e suporte completo a Claude, GPT, Gemini. Oferece 10 ferramentas integradas, sistema de sub-agentes, persistência de sessão SQLite e detecção de loops infinitos.

Instalação

$npx convez-ai WuSuBuDuoMing/aidev

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
1
Forks
0
Acompanhando
0
Saúde
100%
Último commit
há 5 meses
Versão
v2.9.0
Issues abertas
0
Contribuidores
1

Casos de uso

  • Assistência de coding interativa em linha de comando com múltiplos modelos
  • Automação de tarefas de desenvolvimento (leitura/escrita/edição de arquivos, shell, git)
  • Implementação de agents especializados (review, segurança, pesquisa) para fluxos complexos

Veredito

Ferramenta robusta e multilíngue para developers que codificam em terminal. Destaca-se pela arquitetura nativa Go, suporte extenso a modelos de IA (especialmente chineses) e sistema de permissões granulares. Recomendada para quem busca automação de fluxos de desenvolvimento sem dependências externas.

README

A tradução para o português deste README ainda está na fila.

NeoCode

AI coding agent -- optimized for Chinese and international models.

A Go-based native AI coding agent with zero-dependency single-binary distribution. Deep optimization for DeepSeek, MiMo, Qwen, GLM, Kimi, and full support for Claude, GPT, Gemini.

CI Go Report License: MIT GitHub Stars npm

English | Chinese


Table of Contents


Features

FeatureDescription
62 built-in provider presetsDeepSeek, Claude, GPT, Gemini, MiMo, Qwen, GLM, Kimi + 20+ relay services
ccSwitch compatibleReads all standard ccSwitch environment variables for seamless migration
1M context supportGemini 2.5 Pro/Flash with dynamic context compaction
Tool calling10 built-in tools: file read/write/edit, shell commands, git, search, web fetch
MCP plugin protocolstdio/HTTP/SSE transports with auto-discovery from .mcp.json
4 permission modesAsk, Auto, Plan, Edit -- fine-grained control over tool execution
5 effort levelsLow to Ultracode + Workflows -- control reasoning depth per task
Real-time usageToken counts, cost estimation, and balance queries after every response
Sub-agent systemBuilt-in explore, review, security, and research sub-agents
Session persistenceSQLite-backed conversations with full-text search
Skills systemYAML frontmatter + markdown body, project-level override of global skills
Auto-updateneocode upgrade one-click upgrade with SHA256 verification
Desktop appsWindows (.exe), macOS (.dmg), Linux (.deb) via Wails v2
Storm BreakerDeath-spiral loop detection prevents runaway tool calls

Quick Start

Installation

# npm (recommended)
npm i -g @neocode/cli

# Homebrew (macOS / Linux)
brew install neocode/neocode/neocode

# Shell installer
curl -fsSL https://get.neocode.dev | bash

# Go install from source
go install github.com/WuSuBuDuoMing/aidev/cmd/neocode@latest

Configure API Key

# DeepSeek (default)
export DEEPSEEK_API_KEY=sk-xxx

# Anthropic Claude
export ANTHROPIC_API_KEY=sk-ant-xxx

# OpenAI GPT
export OPENAI_API_KEY=sk-xxx

# Google Gemini
export GOOGLE_API_KEY=xxx

# Or set a unified key
export NEOCODE_API_KEY=sk-xxx

Run

# Interactive chat
neocode

# Single question mode
neocode "How do I optimize this Go function for performance?"

# Show status
neocode status

# List providers
neocode providers

Supported Models

ProviderModelsContextPricing (in/out per 1M tokens)
DeepSeekv4, v4-pro, v4-flash128K$0.10/$0.40 ~ $0.55/$2.19
ClaudeFable 5, Opus 4.8, Sonnet 4.6, Haiku 4.5200K$0.80/$4 ~ $15/$75
OpenAIGPT-5.5, GPT-5.4-mini, GPT-4o, o3, o3-mini128K-200K$1/$4 ~ $15/$60
Gemini2.5 Pro/Flash, 3.5 Flash1M$0.075/$0.30 ~ $1.25/$10
MiMov2.5, v2.5-pro128KFree
GLMGLM-5.1128K--
KimiK2.7-code128K--
StepFunstep-3.5-flash-2603128K--
MiniMaxminimax-m2.7128K--
Baiduqianfan-code-latest128K--
Volcengineark-code-latest, doubao-seed-2.0-code128K--
BaiLingling-2.5-1t128K--
Ollamallama3.1, qwen2.5, deepseek-v3 (local)128KFree

CLI Commands

Command Line Usage

neocode                         # Start interactive chat
neocode "question"              # Single question mode
neocode status                  # Show configuration and status
neocode providers               # List available providers
neocode version                 # Show version
neocode upgrade                 # Self-update to latest release

Command Line Options

-p, --provider <name>      Set provider (deepseek, claude, openai, gemini, ...)
-m, --model <id>           Set model ID
-k, --api-key <key>        Set API key
--effort <level>           Set effort (low, medium, high, xhigh, ultracode)
--mode <mode>              Set permission mode (ask, auto, plan, edit)
--no-stream                Disable streaming output
--thinking                 Enable thinking/reasoning mode

Slash Commands (Interactive)

/help              Show all commands
/status            Show current configuration
/providers         List available providers
/model <id>        Switch model at runtime
/provider <id>     Switch provider at runtime
/effort <lvl>      Set effort level (low/medium/high/xhigh/ultracode)
/mode <mode>       Set permission mode (ask/auto/plan/edit)
/plan <task>       Analyze a task in read-only plan mode
/agents            List available sub-agents
/history [n]       List recent sessions
/history search X  Search sessions by content
/resume <id>       Resume a past session
/skills            List available skills
/new               Start a new conversation
/upgrade           Check for updates
/clear             Clear screen
/exit              Exit

Configuration

NeoCode uses a 4-layer configuration system with clear priority rules:

Environment variables  >  Project (.neocode/config.toml)  >  User (~/.neocode/config.toml)  >  Defaults

Environment Variables

# NeoCode-specific (highest priority)
NEOCODE_PROVIDER=deepseek
NEOCODE_MODEL=deepseek-v4
NEOCODE_API_KEY=sk-xxx
NEOCODE_BASE_URL=https://custom.api.com/v1
NEOCODE_THEME=dark

# Provider-specific keys
DEEPSEEK_API_KEY=sk-xxx
ANTHROPIC_API_KEY=sk-ant-xxx
OPENAI_API_KEY=sk-xxx
GOOGLE_API_KEY=xxx
MI_API_KEY=xxx
QWEN_API_KEY=xxx
GLM_API_KEY=xxx
MOONSHOT_API_KEY=xxx

Config File (~/.neocode/config.toml)

default_provider = "deepseek"
default_model = "deepseek-v4"
temperature = 0.2
max_tokens = 4096
theme = "dark"
stream = true
thinking_enabled = false
language = "en"
permission_mode = "ask"
effort = "medium"
show_token_counts = true

[sandbox]
write_roots = ["."]

[update]
auto_check = true
channel = "stable"

ccSwitch Compatible

NeoCode reads all standard ccSwitch environment variables. Works seamlessly with ccSwitch for provider switching.


MCP Plugins

Create .mcp.json in your project root to auto-discover MCP servers:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path"]
    },
    "custom-server": {
      "command": "python",
      "args": ["-m", "my_mcp_server"]
    }
  }
}

NeoCode auto-discovers and connects on startup. Tools from MCP servers are prefixed with mcp__<server>__<tool>.

Supported transports:

  • stdio -- local processes (default)
  • HTTP/SSE -- remote servers via "url" field

Architecture

aidev/
|-- cmd/neocode/           # CLI entry point
|-- internal/              # Core kernel
|   |-- agent/             # Agent loop + Storm Breaker + sub-agents + planner
|   |-- config/            # TOML config + ccSwitch + model registry (26 models)
|   |-- provider/          # 3 providers (OpenAI-compat, Anthropic, Gemini) + SSE + retry
|   |-- tool/              # 10 built-in tools + MCP client (stdio/HTTP/SSE)
|   |-- permission/        # Permission policy engine (4 modes)
|   |-- session/           # SQLite session persistence (WAL mode)
|   |-- skill/             # YAML+Markdown skill system
|   |-- storage/           # SQLite database layer
|   |-- types/             # Core type definitions
|   |-- cli/               # Self-upgrade from GitHub Releases
|   +-- util/              # Shared utilities
|-- desktop/               # Wails v2 desktop app (React + TailwindCSS)
|-- npm/                   # npm distribution (6 platform packages + meta)
|-- scripts/               # Shell installer + Homebrew formula
|-- legacy/                # TypeScript v1 code (archived)
+-- docs/                  # Design docs + configuration reference

Key Design Decisions

  • Single binary: CGO_ENABLED=0 for zero-dependency distribution
  • Provider abstraction: Unified Provider interface with SSE streaming
  • Parallel dispatch: Read-only tools run concurrently; write tools run sequentially
  • Storm Breaker: Detects death-spiral loops by (tool, error) signature
  • Context compaction: Automatic conversation summarization when approaching context limits
  • Tool result pruning: Old, re-derivable outputs replaced with placeholders to save tokens

Desktop Apps

# macOS
open NeoCode.dmg

# Windows
NeoCode-installer.exe

# Linux
tar xzf NeoCode-linux-amd64.tar.gz
./neocode

Desktop app is built with Wails v2 (Go backend + React frontend).


Security

  • API key encryption: Keys stored encrypted at ~/.neocode/keystore.enc (AES-256-GCM)
  • Explicit storage disclosure: Storage path shown on first use
  • Path sandboxing: Write operations restricted to project directory
  • No shell injection: Shell commands use argument arrays, not string interpolation
  • Permission modes: Fine-grained control over which tools can execute
  • Plan mode: Read-only analysis without any file modifications
  • SSRF protection: Web fetch operations are sandboxed

See SECURITY.md for our vulnerability reporting policy.


API Reference

Provider Interface

type Provider interface {
    Generate(ctx context.Context, messages []Message, tools []ToolDefinition, systemPrompt string) (*GenerateResult, error)
    Stream(ctx context.Context, messages []Message, tools []ToolDefinition, systemPrompt string, onChunk func(StreamChunk)) (*GenerateResult, error)
    Name() string
    DefaultModel() string
}

Tool Interface

type Tool interface {
    Name() string
    Description() string
    Schema() map[string]interface{}
    Execute(ctx context.Context, args map[string]interface{}) (*ToolResult, error)
    ReadOnly() bool
}

Built-in Tools

ToolNameRead-OnlyDescription
ReadToolreadFileYesRead file contents with optional line range
WriteToolwriteFileNoWrite content to file, creating parent dirs
EditTooleditFileNoFind-and-replace edit with uniqueness check
GlobToolsearchFilesYesFind files matching glob patterns
GrepToolgrepYesRegex search across file contents
BashToolrunCommandNoExecute shell commands with timeout
GitStatusToolgitStatusYesShow git working tree status
GitDiffToolgitDiffYesShow git diff (staged or unstaged)
GitCommitToolgitCommitNoCreate git commit with auto-staging
LsToollistDirYesList directory contents recursively

Sub-Agents

AgentDescription
exploreRead-only codebase exploration
reviewCode review with severity ratings
securitySecurity vulnerability audit
researchDeep codebase investigation

Contributing

We welcome contributions of all kinds -- bug reports, feature requests, documentation improvements, and code.

See CONTRIBUTING.md for detailed guidelines.

Development Setup

# Clone the repository
git clone https://github.com/WuSuBuDuoMing/aidev.git
cd aidev

# Build
make build

# Run tests
make test

# Lint
make lint

# Run locally
make run

# Cross-compile for all platforms
make cross

Changelog

See CHANGELOG.md for the full history of changes.


License

NeoCode is released under the MIT License.

Copyright (c) 2024-2026 WuSuBuDuoMing


Built with care, for developers who live in the terminal.

Report Bug | Request Feature | Discussions

Ver o original no GitHub

Bom para

Relacionados