SDK and CLI
Fóir publishes two npm packages: a typed client for your application, and a command-line tool for scripts and CI.
The typed client
The typed client in @foir/sdk sends GraphQL to the same endpoint as any other client and writes the document for you. One typed call is one request. It returns every scalar field on the model by default, and pick, omit and include adjust the selection.
Its types come from foir types and are generated per key, so an operation the key cannot perform is not on the type.
Where the client runs
The client uses fetch only and holds no module-level state. The docs cover it in Hydrogen, React Router loaders, TanStack Start and edge runtimes. Other entry points in the same package handle sessions for your users, live updates and media.
What the CLI covers
@foir/cli installs the foir command. Its command groups cover records, models, locales, media, search, rollouts, releases, the cache, API keys, your users and their roles, organisations, operations, hooks, schedules, secrets, sign-in providers, export and type generation. It also applies your config file with a push. The CLI reference lists the commands, and the intent reference in the docs shows which platform actions have one.
Output and sign-in for scripts
Every command prints a table by default and can print JSON, JSON Lines or ids only, for piping. Payloads come from a flag, a file or stdin. You sign in through the browser, with a device-code flow for SSH, containers and CI, or set an API key in the environment for headless runs.
Read the detail
The SDK guide covers installing the typed client, generating its types and making calls, and the CLI has its own reference.