fsite-agent
v0.1.0
Published
Runs a locally-authenticated Codex CLI (codex app-server) on your machine to power F•SITE's Flex plan Codex integration. F•SITE never sees your OpenAI/ChatGPT credentials, only this tool's own, separately revocable pairing token.
Downloads
24
Readme
fsite-agent
Runs a locally-authenticated Codex CLI on your own machine so F•SITE's Flex plan can use your existing Codex/ChatGPT subscription instead of F•TOKENS.
F•SITE never sees your OpenAI/ChatGPT credentials. Codex owns its own login entirely, on your
machine, in your own $CODEX_HOME. This tool only ever talks to F•SITE with its own, separate,
independently revocable token — see "How this stays safe" below.
Prerequisites
- Codex CLI installed (
npm i -g @openai/codexorbrew install --cask codex) - You've run
codex loginyourself and signed in with your ChatGPT Plus/Pro/Business/Enterprise plan (or an API key). Verify withcodex app-server→account/read, or just tryfsite-agent run, it checks this for you and tells you plainly if you're not logged in.
Install
npm install -g fsite-agentConnect
- In the F•SITE editor, open a project's Agent tab and click Connect local Codex agent. You'll get a short pairing code (valid 10 minutes) and a copy-paste command.
- On your own machine:
This mints a brand new F•SITE agent token, scoped to that one project, saved locally atfsite-agent connect XXXX-XXXX~/.fsite-agent/config.json.
Run
fsite-agent runLeave this running. It:
- Sends a heartbeat every 30s (so F•SITE can show "online"/"offline")
- Polls for tasks you queue from that project's Agent tab
- Runs each task through your local
codex app-server, in a throwaway temp directory containing a snapshot of the site's current files, sandboxed toworkspace-writewith no network access - Submits the resulting diff back to F•SITE for you to review
Nothing is applied to your real site until you click Apply in the F•SITE editor. Every task's diff goes through the same review gate the AI Builder tier's output does — decline or apply, your call.
Other commands
fsite-agent status # show current connection info
fsite-agent disconnect # forget the local connection (does NOT revoke it on F•SITE, see below)Uninstalling completely
- Revoke the agent on F•SITE: go to the project's Agent tab and click Disconnect. This invalidates the token server-side immediately, even if this machine is offline or gone.
- Remove the local config:
fsite-agent disconnect(or justrm -rf ~/.fsite-agent). - Uninstall the package:
npm uninstall -g fsite-agent.
Codex itself, and your ChatGPT/OpenAI login, are entirely untouched by any of the above — this tool
never had them in the first place. Run codex logout yourself if you also want to sign Codex out.
How this stays safe
- Pairing produces an F•SITE-only token, scoped to exactly one project. It's never derived from, or exchanged for, an OpenAI credential.
- Codex's own OAuth/API-key login happens entirely through the official
codex loginflow, on your machine. This tool never runs a device-code or OAuth flow on your behalf, and never reads~/.codex/auth.json. - Every task runs in a fresh, isolated temp directory, deleted right after, with
sandboxPolicy: workspaceWrite(confined to that directory) and network access disabled. - Every proposed change is a diff you review and explicitly approve or decline in F•SITE, applied through the exact same file-validation path (path traversal / extension allowlist / size limits) as every other way of editing a site there.
