Skip to content
ƒtsforgev0.52.0
19

Quickstart

3 min read

From install to a running loop in a few minutes. For the why behind each step, read Big picture first.

tsforge runs shell commands and writes files in the project you point it at. Use it only on repos you trust, or inside a sandbox.

You need Bun ≥ 1.3.14 and an OpenAI-compatible model endpoint (local server or hosted API).

Recommended (install script: Bun if missing, then tsforge from npm or GitHub):

Terminal window
curl -fsSL https://tsforge.dev/install.sh | bash

Or with Bun directly (from npm):

Terminal window
bun install -g @agjs/tsforge

From source (contributors and bleeding edge):

Terminal window
git clone https://github.com/boringstack-xyz/tsforge.git
cd tsforge
bun install
bun link --global --cwd packages/core # installs `tsforge` on PATH
# or without global link:
bun run tsforge

If tsforge is not found after install, add Bun’s global bin directory to your PATH:

Terminal window
export PATH="$(bun pm bin -g):${PATH}"
Terminal window
mkdir -p ~/.tsforge
cat > ~/.tsforge/models.json <<'EOF'
{
"active": "local",
"models": {
"local": {
"baseUrl": "http://localhost:8000/v1",
"model": "deepseek-v4-flash",
"thinking": true
}
}
}
EOF

Override per-run with TSFORGE_BASE_URL and TSFORGE_MODEL. See Environment variables.

Terminal window
tsforge

Point tsforge at your target project when prompted, or pass --dir. See Interactive CLI for slash commands, flags, and session persistence.

flowchart LR
  you(["task"]) --> agent["model agent"]
  agent --> tools["read · edit · run"]
  tools --> gate["gate: tsc + ESLint + tests"]
  gate -->|"fail"| agent
  gate -->|"pass"| done(["checkpoint"])

You give it a task; the model edits; the gate decides done. For the full architecture (the general core, the adapters at the seams, and the request flow), see Big picture.

flowchart LR
  task[Approved task] --> agent[Model agent]
  agent --> edit[edit / edit_lines]
  edit --> gate[Gate: tsc + ESLint + …]
  gate -->|fail| repair[Repair loop]
  repair --> agent
  gate -->|pass| done[Checkpoint]

The gate is the acceptance check tsforge builds from your project (How the gate is built). On existing repos the embedded TypeScript language server adds navigation tools and write-time diagnostics (Language server).

If you are…Start here
Still orientingBig picture
Driving the REPL day to dayInteractive CLI
Building a new full-stack appGreenfield scaffolding + Greenfield loop
Building a Phaser 4 gamePhaser scaffolding
Running benchmark specsSpec format
Tuning ESLint enforcementStack detection · Rule catalog
Measuring feature winsA/B testing