Getting started
Felix is one pnpm workspace: packages for the model API, the tool loop and sessions, and three
apps — the HTTP API, the web app and the felix terminal client. This page runs each of them
locally. For the ideas behind them, read Concepts.
Prerequisites
Section titled “Prerequisites”- Node.js 26.4 or later and the pnpm version declared in the repository’s
package.json. - For real model calls: a Cloudflare account with Workers AI. The terminal client calls the Workers AI REST API with an account ID and API token; the local API uses the Workers AI binding. To use Anthropic instead, select it explicitly and supply your own key.
Install and run the offline demo
Section titled “Install and run the offline demo”-
Install
pnpm install --frozen-lockfile -
Run the demo
pnpm demoThe demo runs a synthetic model through the real tool loop. It needs no credentials and makes no provider requests.
-
Verify
pnpm verifyType checks, tests, production builds and browser tests, all against synthetic models.
Run the API and web app
Section titled “Run the API and web app”-
Configure the API
Copy
apps/api/.dev.vars.exampletoapps/api/.dev.vars.workers-aiand set:Variable What it does FELIX_API_TOKENThe token clients send to read and write hosted threads. FELIX_PROVIDERworkers-ai(default),anthropic,openai,google,vertex,bedrockormistral.FELIX_MODELThe model ID, for example @cf/zai-org/glm-5.3.FELIX_ANTHROPIC_API_KEYOnly when FELIX_PROVIDERisanthropic.FELIX_OPENAI_API_KEYOnly when FELIX_PROVIDERisopenai.FELIX_GEMINI_API_KEYOnly when FELIX_PROVIDERisgoogle.FELIX_MISTRAL_API_KEYOnly when FELIX_PROVIDERismistral.FELIX_VERTEX_API_KEYFor vertex: a Google Cloud API key, or insteadFELIX_GCP_SERVICE_ACCOUNT(a service account key’s JSON).FELIX_GCP_PROJECTdefaults to the key’s project,FELIX_GCP_LOCATIONtoglobal.FELIX_AWS_REGIONFor bedrock, withFELIX_BEDROCK_API_KEYor theFELIX_AWS_ACCESS_KEY_IDandFELIX_AWS_SECRET_ACCESS_KEYpair. -
Start the API
pnpm dev:worker:aipnpm dev:workerstarts the same API without a model provider, for credential-free work. -
Start the web app in a second terminal
pnpm dev:webThe development server forwards
/apito the local API. Provider keys stay on the server; the API token you enter in the web app’s connection settings stays in that tab’s memory.
Use the terminal client
Section titled “Use the terminal client”The coding client reads, searches, edits and writes files in a workspace and runs commands there
(run_command). Pass --read-only to offer only the read and search tools. In the full-screen
client (pnpm cli), each write or command says what it will do and waits for y or n; add
--yes to run them without asking. pnpm chat at a terminal asks the same at its prompt; a
one-shot prompt, --print, --json or piped input runs them without asking, and says so once on
stderr at the first one unless you passed --yes.
export CLOUDFLARE_ACCOUNT_ID=…export CLOUDFLARE_API_TOKEN=…pnpm chat --model @cf/zai-org/glm-5.3 --workspace /path/to/projectWithout a prompt it starts an interactive session; with one it answers once and exits. Sessions are
saved under the workspace’s .felix directory. --instructions FILE loads an instruction file from
the workspace in place of the discovered ones; instruction files never grant tools.
pnpm cli starts the full-screen felix client, and pnpm cli --demo runs it offline.
© Felix. All rights reserved.