2026-03-25 09:54:41 -06:00
---
title: "Getting started"
2026-04-15 14:54:20 +02:00
description: "Install SF, configure your LLM provider, and run your first autonomous session."
2026-03-25 09:54:41 -06:00
---
## Install
```bash
2026-04-15 14:54:20 +02:00
npm install -g sf-run
2026-03-25 09:54:41 -06:00
```
Requires Node.js 22+ and Git.
<Note>
2026-04-15 18:33:47 +02:00
**`command not found: sf`?** Your shell may not have npm's global bin directory in `$PATH`. Run `npm prefix -g` to find it, then add `$(npm prefix -g)/bin` to your PATH. See [troubleshooting](/guides/troubleshooting) for details.
2026-03-25 09:54:41 -06:00
</Note>
2026-04-15 18:33:47 +02:00
SF checks for updates every 24 hours. Update in-session with `/sf update`.
2026-03-25 09:54:41 -06:00
## First launch
```bash
2026-04-15 18:33:47 +02:00
sf
2026-03-25 09:54:41 -06:00
```
On first launch, a setup wizard walks you through:
1. **LLM provider** — 20+ providers (Anthropic, OpenAI, Google, OpenRouter, GitHub Copilot, Amazon Bedrock, Azure, and more). OAuth handles Claude Max and Copilot subscriptions automatically; otherwise paste an API key.
2. **Tool API keys** (optional) — Brave Search, Context7, Jina, Slack, Discord. Press Enter to skip any.
Re-run the wizard anytime:
```bash
2026-04-15 18:33:47 +02:00
sf config
2026-03-25 09:54:41 -06:00
```
### Set up API keys
2026-04-15 18:33:47 +02:00
For non-Anthropic models, you may need a search API key. Run `/sf config` to set keys globally — they're saved to `~/.sf/agent/auth.json` and apply to all projects.
2026-03-25 09:54:41 -06:00
### Set up MCP servers
2026-04-15 18:33:47 +02:00
To connect SF to local or external MCP servers, add project-local config in `.mcp.json` or `.sf/mcp.json`. See [configuration](/guides/configuration) for examples. Use `/sf mcp` to verify connectivity.
2026-03-25 12:43:08 -04:00
### Offline mode
2026-04-15 14:54:20 +02:00
SF works fully offline with local models (Ollama, vLLM, LM Studio). Configure a [custom model](/guides/custom-models) and SF handles the rest — no internet connection required.
2026-03-25 09:54:41 -06:00
## Choose a model
2026-04-15 14:54:20 +02:00
SF auto-selects a default model after login. Switch anytime:
2026-03-25 09:54:41 -06:00
```
/model
```
Or configure per-phase models in [preferences](/guides/configuration).
## Two ways to work
<Tabs>
<Tab title="Step mode">
2026-04-15 18:33:47 +02:00
Type `/sf` inside a session. SF executes one unit at a time, pausing between each with a wizard showing what completed and what's next.
2026-03-25 09:54:41 -06:00
2026-04-15 18:33:47 +02:00
- **No `.sf/` directory** → starts a discussion to capture your project vision
2026-03-25 09:54:41 -06:00
- **Milestone exists, no roadmap** → discuss or research the milestone
- **Roadmap exists, slices pending** → plan the next slice or execute a task
- **Mid-task** → resume where you left off
</Tab>
<Tab title="Auto mode">
2026-05-05 15:42:10 +02:00
Type `/sf autonomous` and walk away. SF autonomously researches, plans, executes, verifies, commits, and advances through every slice until the milestone is complete.
2026-03-25 09:54:41 -06:00
```
2026-05-05 15:42:10 +02:00
/sf autonomous
2026-03-25 09:54:41 -06:00
```
See [auto mode](/guides/auto-mode) for the full details.
</Tab>
</Tabs>
## Two terminals, one project
The recommended workflow: auto mode in one terminal, steering from another.
**Terminal 1 — let it build:**
```bash
2026-04-15 18:33:47 +02:00
sf
2026-05-05 15:42:10 +02:00
/sf autonomous
2026-03-25 09:54:41 -06:00
```
**Terminal 2 — steer while it works:**
```bash
2026-04-15 18:33:47 +02:00
sf
/sf discuss # talk through architecture decisions
/sf status # check progress
/sf queue # queue the next milestone
2026-03-25 09:54:41 -06:00
```
2026-04-15 18:33:47 +02:00
Both terminals read and write the same `.sf/` files. Decisions in terminal 2 are picked up at the next phase boundary automatically.
2026-03-25 09:54:41 -06:00
## Project structure
2026-04-15 14:54:20 +02:00
SF organizes work into a hierarchy:
2026-03-25 09:54:41 -06:00
```
Milestone → a shippable version (4-10 slices)
Slice → one demoable vertical capability (1-7 tasks)
Task → one context-window-sized unit of work
```
2026-04-15 18:33:47 +02:00
All state lives on disk in `.sf/`:
2026-03-25 09:54:41 -06:00
<Accordion title="Directory structure">
```
2026-04-15 18:33:47 +02:00
.sf/
2026-03-25 09:54:41 -06:00
PROJECT.md — what the project is right now
REQUIREMENTS.md — requirement contract (active/validated/deferred)
DECISIONS.md — append-only architectural decisions
KNOWLEDGE.md — cross-session rules, patterns, and lessons
RUNTIME.md — runtime context: API endpoints, env vars, services
STATE.md — quick-glance status
milestones/
M001/
M001-ROADMAP.md — slice plan with risk levels and dependencies
M001-CONTEXT.md — scope and goals from discussion
slices/
S01/
S01-PLAN.md — task decomposition
S01-SUMMARY.md — what happened
S01-UAT.md — human test script
tasks/
T01-PLAN.md
T01-SUMMARY.md
```
</Accordion>
## Resume a session
```bash
2026-04-15 18:33:47 +02:00
sf --continue # or sf -c
2026-03-25 09:54:41 -06:00
```
Resumes the most recent session. To pick from all saved sessions:
```bash
2026-04-15 18:33:47 +02:00
sf sessions
2026-03-25 09:54:41 -06:00
```
## VS Code extension
2026-04-15 14:54:20 +02:00
SF is also available as a VS Code extension (publisher: FluxLabs). It provides:
2026-03-25 09:54:41 -06:00
2026-04-15 18:33:47 +02:00
- **`@sf` chat participant** — talk to the agent in VS Code Chat
2026-03-25 09:54:41 -06:00
- **Sidebar dashboard** — connection status, model info, token usage, quick actions
- **Full command palette** — start/stop agent, switch models, export sessions
2026-04-15 14:54:20 +02:00
The CLI (`sf-run`) must be installed first — the extension connects to it via RPC.
2026-03-25 09:54:41 -06:00
## Web interface
```bash
2026-04-15 18:33:47 +02:00
sf --web
2026-03-25 09:54:41 -06:00
```
A browser-based dashboard with real-time progress and multi-project support. See [web interface](/guides/web-interface) for details.
## Troubleshooting
2026-04-15 18:33:47 +02:00
### `sf` runs `git svn dcommit` instead of SF
2026-03-25 09:54:41 -06:00
2026-04-15 18:33:47 +02:00
The [oh-my-zsh git plugin](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git) defines `alias sf='git svn dcommit'`.
2026-03-25 09:54:41 -06:00
**Option 1** — Remove the alias in `~/.zshrc` (after the `source $ZSH/oh-my-zsh.sh` line):
```bash
2026-04-15 18:33:47 +02:00
unalias sf 2>/dev/null
2026-03-25 09:54:41 -06:00
```
**Option 2** — Use the alternative binary name:
```bash
2026-04-15 18:33:47 +02:00
sf-cli
2026-03-25 09:54:41 -06:00
```
2026-04-15 18:33:47 +02:00
Both `sf` and `sf-cli` point to the same binary.