Start the local HTTP + WebSocket server. All three names are aliases.
infa preview [options]
infa server [options]
infa start [options]
Runs on port 7100 by default (override with PORT=7101 infa preview).
On startup the server:
Discovers all .md and .mdx files under the current directory
Scans for repos with a .claude/ folder for session management
Connects to Supabase and subscribes to queued runs (if authenticated + board set)
Opens the browser to infa.ai/b/{boardId} or infa.ai/editor
Options:
Flag
Description
--token <t>
Inject an OAuth access token (in-memory only, not saved to disk)
--refresh-token <t>
Inject an OAuth refresh token (used alongside --token)
--scan-dir <path>
Override the directory scanned for repos with .claude/ (defaults to current directory)
Copy link
infa auth
Authenticate with your Infa account via OAuth 2.1 PKCE.
infa auth
Opens a browser window to infa.ai. After login and approval, tokens are saved to .infa/config.yml. The flow times out after 5 minutes.
Subcommands:
Subcommand
Description
infa auth status
Show current auth status and User ID. Refreshes an expired token if a refresh token is available.
infa auth reset
Clear stored tokens. Preserves clientId.
Copy link
infa board
Interactively select a board and save its ID to .infa/config.yml.
infa board
Requires authentication. Fetches your boards from Infa, presents a selector, and saves the chosen boardId.
Copy link
infa sync
Check sync status between local files and cloud Papers.
infa sync
Requires authentication and a board to be connected.
Subcommands:
Subcommand
Description
infa sync push <file>
Push local file to cloud. Creates a Paper if none exists, updates frontmatter with paper_id.
infa sync pull <file>
Pull cloud Paper content to local file. Overwrites local content.
Copy link
infa session start
Spawn a single Claude Code remote-control session and stream output to the terminal. No HTTP server is started.
infa session start [path]
path defaults to the current directory. The target must contain a .claude/ folder.
This mode does not create a git branch, write hooks, or record a run in Supabase. For tracked runs, use the HTTP API.
Copy link
HTTP API
When infa preview is running, these endpoints are available at http://localhost:7100:
Copy link
Files
Method
Endpoint
Description
GET
/api/files
List all discovered .md/.mdx files
GET
/api/file?path=<rel>
Read file content (relative path)
POST
/api/file
Write file content
GET
/api/config
Get server config (port, boardId, repoRoot)
POST
/api/config/board
Set boardId
DELETE
/api/config/board
Disconnect board
Copy link
Sessions
Method
Endpoint
Body
Description
GET
/api/sessions
—
List all active sessions
GET
/api/repos
—
List repos with .claude/
POST
/api/repos/scan
—
Re-scan for repos
POST
/api/sessions/start
{ repoPath }
Start a manual interactive session
POST
/api/sessions/stop
{ repoPath }
Stop a session
POST
/api/sessions/restart
{ repoPath }
Stop then restart a session
POST
/api/sessions/run
{ repoPath, prompt? }
Start an automated local run (creates branch + hooks)
POST
/api/auth/session
{ accessToken, refreshToken? }
Hot-inject auth tokens into the running server
Copy link
Sync (requires boardId)
Method
Endpoint
Description
GET
/api/sync/status
Get sync status for all files
POST
/api/sync/push
Push a file to cloud ({ path })
POST
/api/sync/pull
Pull a file from cloud ({ path })
Copy link
WebSocket
ws://localhost:7100/ws
Emits real-time events:
mirror_ready — server is fully started
files_updated — file list changed
sessions_updated — session state changed (start/stop/URL captured)
sync_status — sync state changed
Copy link
Config file
.infa/config.yml in the current working directory:
auth:
clientId: 9941cdcd-af9c-4040-959f-32e883d8043d
accessToken: eyJ...
refreshToken: ...
expiresAt: "2026-04-20T12:00:00.000Z"
tokenType: bearer
scope: email profile
userId: <your-user-id>
boardId: b_3A4gbNTb
Never commit this file
It contains your OAuth tokens. Add .infa/ to your .gitignore.
Copy link
Environment variables
Variable
Default
Description
PORT
7100
HTTP server port
SUPABASE_URL
—
Supabase project URL (enables run persistence)
SUPABASE_ANON_KEY
—
Supabase anon key
VITE_SUPABASE_URL
—
Alias for SUPABASE_URL
VITE_SUPABASE_ANON_KEY
—
Alias for SUPABASE_ANON_KEY
INFA_OAUTH_CLIENT_ID
—
Override the default OAuth client ID
Copy link
Notes
infa session start tracks runs in Supabase when authenticated and a board is connected. The Claude session URL is captured from stdout and stored on the run record when available.
infa session start does not create a git branch or write hooks — for full automated behaviour use POST /api/sessions/run via the preview server.
Content Feedback
Feedback on selected content
Close
Anonymous submissions are auto-posted to #feedback channel. You can also share directly in Slack.
CLI Reference
infa preview·infa server·infa startStart the local HTTP + WebSocket server. All three names are aliases.
Runs on port 7100 by default (override with
PORT=7101 infa preview).On startup the server:
.mdand.mdxfiles under the current directory.claude/folder for session managementinfa.ai/b/{boardId}orinfa.ai/editorOptions:
--token <t>--refresh-token <t>--token)--scan-dir <path>.claude/(defaults to current directory)infa authAuthenticate with your Infa account via OAuth 2.1 PKCE.
Opens a browser window to
infa.ai. After login and approval, tokens are saved to.infa/config.yml. The flow times out after 5 minutes.Subcommands:
infa auth statusinfa auth resetclientId.infa boardInteractively select a board and save its ID to
.infa/config.yml.Requires authentication. Fetches your boards from Infa, presents a selector, and saves the chosen
boardId.infa syncCheck sync status between local files and cloud Papers.
Requires authentication and a board to be connected.
Subcommands:
infa sync push <file>paper_id.infa sync pull <file>infa session startSpawn a single Claude Code
remote-controlsession and stream output to the terminal. No HTTP server is started.pathdefaults to the current directory. The target must contain a.claude/folder.This mode does not create a git branch, write hooks, or record a run in Supabase. For tracked runs, use the HTTP API.
When
infa previewis running, these endpoints are available athttp://localhost:7100:/api/files.md/.mdxfiles/api/file?path=<rel>/api/file/api/config/api/config/board/api/config/board/api/sessions/api/repos.claude//api/repos/scan/api/sessions/start{ repoPath }/api/sessions/stop{ repoPath }/api/sessions/restart{ repoPath }/api/sessions/run{ repoPath, prompt? }/api/auth/session{ accessToken, refreshToken? }/api/sync/status/api/sync/push{ path })/api/sync/pull{ path })Emits real-time events:
mirror_ready— server is fully startedfiles_updated— file list changedsessions_updated— session state changed (start/stop/URL captured)sync_status— sync state changed.infa/config.ymlin the current working directory:PORT7100SUPABASE_URLSUPABASE_ANON_KEYVITE_SUPABASE_URLSUPABASE_URLVITE_SUPABASE_ANON_KEYSUPABASE_ANON_KEYINFA_OAUTH_CLIENT_IDinfa session starttracks runs in Supabase when authenticated and a board is connected. The Claude session URL is captured from stdout and stored on the run record when available.infa session startdoes not create a git branch or write hooks — for full automated behaviour usePOST /api/sessions/runvia the preview server.