convez.ai
AgenteDesenvolvimento WebIntermediário
JuryiBay

Claude Code 2.0

JuryiBay/claude-code-2.0

Agent de codificação local com LLM via Ollama, sem APIs de nuvem

Ver no GitHub
InicialPluginScore · de 0 a 100

Agent de codificação em terminal totalmente local, alimentado por um modelo LLM via Ollama. Lê, busca, edita e executa código em sua máquina sem dependências externas, APIs de nuvem ou chaves — seu código nunca sai do computador.

Instalação

$npx convez-ai JuryiBay/claude-code-2.0

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
0
Forks
0
Acompanhando
0
Saúde
42%
Último commit
há 5 meses
Versão
—
Issues abertas
0
Contribuidores
1

Casos de uso

  • Desenvolver e refatorar código localmente com assistência IA
  • Executar tarefas de codificação em ambientes sem conectividade
  • Manter código privado sem enviar para serviços de nuvem
  • Validação e edição de código com aprovação manual de mudanças

Veredito

Solução robusta para desenvolvimento local sem dependência de APIs em nuvem. Ideal para quem prioriza privacidade e controle total, mas exige setup local (Ollama + modelo) e aprovação manual de operações — não é plug-and-play.

README

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

CLAUDE CODE 2.0

A fully local, original terminal AI coding agent. It reads, searches, edits, and runs your code on your machine — and the "brain" is a local LLM served by Ollama. There are no cloud APIs, no API keys, and zero runtime dependencies. Your code never leaves your computer.

CLAUDE CODE 2.0  · local terminal coding agent
────────────────────────────────────────────────────
model   qwen2.5-coder
engine  http://127.0.0.1:11434 (local Ollama)
cwd     C:\Users\you\my-project
help    /help  /clear  /auto  /exit
────────────────────────────────────────────────────

› add input validation to the signup handler
● I'll look at the handler first.
▸ grep signup
▸ read_file src/routes/signup.ts
● The handler trusts the request body directly. I'll add validation…
▸ edit_file src/routes/signup.ts
  ⚠ edit_file: Edit src/routes/signup.ts
  Approve? [y/N] y
● Done. Added length/format checks and a 400 response on bad input.

How it works

your prompt ──► agent loop ──► local Ollama model (qwen2.5-coder, …)
                   ▲                     │
                   │              wants to use a tool?
            tool result ◄── run tool ◄───┘
        (read / write / edit / list / grep / glob / run_command)

The agent runs a tool-calling loop entirely against your local model. When the model asks to write a file or run a command, you approve it (unless auto-approve is on).

Requirements

  • Node.js 18.18+ (uses the built-in fetch).
  • Ollama running locally.
  • A tool-capable local model: qwen2.5-coder, llama3.1, mistral-nemo, qwen3, …

Setup

Windows

  1. Install Node.js (LTS) from https://nodejs.org.
  2. Install Ollama for Windows from https://ollama.com/download. It runs a local server at http://127.0.0.1:11434 automatically.
  3. Pull a coding model (on an RTX 5080, the 14B variant is a great fit):
    ollama pull qwen2.5-coder:14b
    
  4. In this project folder:
    npm install
    copy .env.example .env
    
    Edit .env and set CC2_MODEL=qwen2.5-coder:14b.
  5. Run it from inside the project you want to work on:
    npm start
    

macOS / Linux

brew install ollama          # or see ollama.com
ollama serve                 # start the local server (if not already running)
ollama pull qwen2.5-coder
npm install
cp .env.example .env
npm start

Usage

# Interactive REPL (run it from the directory you want the agent to work in)
npm start

# One-shot task
npm start -- "explain what src/index.ts does"

# Auto-approve writes and commands (use with care)
npm start -- --auto "run the test suite and fix any failures"

# Read-only: the agent can explore but never writes or runs commands
npm start -- --readonly "review this project for bugs"

REPL commands

CommandAction
/helpShow help
/clearReset the conversation context
/autoToggle auto-approve for writes and commands
/exitQuit (/quit works too)

Tools the agent can use

ToolRead-onlyPurpose
read_fileyesRead a file with line numbers (supports offset/limit)
list_diryesList a directory's entries
globyesFind files by glob pattern (**, *)
grepyesSearch file contents by regular expression
edit_filenoReplace a unique string in a file (asks first)
write_filenoCreate/overwrite a file (asks first)
run_commandnoRun a shell command — cmd.exe/sh (asks first)

Configuration (.env)

VariableDefaultMeaning
CC2_OLLAMA_URLhttp://127.0.0.1:11434Local Ollama server URL
CC2_MODELqwen2.5-coderLocal model (must support tool calling)
CC2_TEMPERATURE0.2Sampling temperature
CC2_NUM_CTX(model default)Context window size in tokens
CC2_TIMEOUT_MS300000Abort if the model sends no data for this long (prevents hangs)

Windows note: run_command output is decoded as UTF-8. On a non-UTF-8 Windows console code page (e.g. cp866), non-ASCII command output may appear garbled. If you need it, prefix the command with chcp 65001>nul & … to switch the console to UTF-8 first.

Safety model

  • The agent is sandboxed to the working directory — any path that escapes it is blocked.
  • Writes, edits, and shell commands require your approval unless --auto is set.
  • --readonly lets the agent explore without changing anything.

Project layout

src/
├── index.ts            # CLI entry: config, preflight, REPL / one-shot
├── config.ts           # .env loader + configuration
├── api/ollama.ts       # local Ollama chat client (streaming + tools)
├── agent/
│   ├── loop.ts         # the tool-calling agent loop
│   └── systemPrompt.ts # the agent's instructions
├── tools/              # read / write / edit / list / grep / glob / run_command
├── permissions/guard.ts# approval policy (ask / auto / readonly)
├── ui/                 # ansi colors, prompt, rendering, spinner
└── util/               # path sandbox, recursive walk + glob, arg validation

Scripts

npm start        # run the agent
npm run dev      # run with auto-restart on file changes
npm test         # run the unit tests
npm run typecheck# type-check the project

License

MIT. Original code — no third-party agent framework, no cloud services.

Ver o original no GitHub

Bom para

Relacionados