ScriptsMay 12, 2026·2 min read

Refact — Local-First AI Coding Assistant

Refact is an open-source, local-first AI coding assistant: install the IDE plugin, run local refact-lsp, and connect a model provider.

Agent ready

This asset can be read and installed directly by agents

TokRepo exposes a universal CLI command, install contract, metadata JSON, adapter-aware plan, and raw content links so agents can judge fit, risk, and next actions.

Stage only · 29/100Stage only
Agent surface
Any MCP/CLI agent
Kind
Script
Install
Single
Trust
Trust: Established
Entrypoint
refact
Universal CLI install command
npx tokrepo install 42eb3572-5de4-59ab-a044-0b875f39a8ff
Intro

Refact is an open-source, local-first AI coding assistant: install the IDE plugin, run local refact-lsp, and connect a model provider.

  • Best for: developers who want a local agent engine embedded in the editor, with BYO providers and repeatable workflows
  • Works with: VS Code or JetBrains; local refact-lsp engine; multiple LLM providers/runtimes (see README)
  • Setup time: 10–30 minutes

Practical Notes

  • Quant: the repo describes an IDE-embedded flow where the plugin runs a local refact-lsp engine per workspace.
  • Quant: validate setup by running one agent task end-to-end and measuring time saved over 3 repeated tasks (same prompt, same repo).

What to standardize before rollout

Refact becomes much more valuable when teams standardize:

  1. Provider policy: which providers are allowed for which repos (open-source vs private).
  2. Default models: one for chat, one for agent work, one for embeddings if needed.
  3. Task boundaries: define which actions require explicit approval (deps updates, migrations, deploy scripts).

Suggested first workflows

  • “Explain module X” + “write a unit test for function Y”.
  • “Refactor a file” with a measurable constraint (max 10 lines changed; no behavior change).
  • “Fix a failing test” with reproduction steps and a time budget.

Use the same 2–3 workflows across the team so you can compare outcomes consistently.

FAQ

Q: Is it only for chat? A: No. The README positions it as an agent that can plan, execute, and iterate in engineering workflows.

Q: Do I have to use one provider? A: No. It supports multiple provider families; choose per your policy.

Q: How do I avoid risky changes? A: Define approval-gated actions and start with read/modify-only tasks before automating merges/deploys.

🙏

Source & Thanks

Source: https://github.com/smallcloudai/refact > License: BSD-3-Clause > GitHub stars: 3,541 · forks: 310

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets