Installation
Install the anfra CLI, set up your coding agent, and create a project
anfra is a single binary. You don't need a daemon or a cloud account to get started.
Install the CLI
curl -fsSL https://anfra.ai/install.sh | bashThe installer downloads the latest release for your platform, places the anfra binary in ~/.anfra/bin, and adds that folder to your PATH in your shell's rc file. Open a new terminal afterwards so the change takes effect.
Supported platforms: Linux (x64/arm64) and macOS (x64/arm64).
You can configure the installer with environment variables:
| Variable | Description | Default |
|---|---|---|
ANFRA_HOME | Folder where anfra keeps everything | ~/.anfra |
ANFRA_INSTALL_DIR | Directory to install the binary into | $ANFRA_HOME/bin |
ANFRA_VERSION | Version to install, e.g. 0.1.0 | latest |
ANFRA_NO_MODIFY_PATH | If set, leave your shell rc files alone and print the PATH line instead | unset |
For example:
curl -fsSL https://anfra.ai/install.sh | ANFRA_VERSION=0.1.0 bashUpdate
anfra update # replace the binary with the latest release
anfra update --check # check for a newer release without installingRun with Docker
To run a project on a server, or without installing anything, use the image. Mount the project at /repo:
docker run -p 7878:7878 -v "$PWD:/repo" ghcr.io/holistics/anfraThis starts anfra serve on all interfaces in the container. The apps, the API and the MCP server are then at http://localhost:7878/.
Other commands run the same way, for example:
docker run --rm -v "$PWD:/repo" ghcr.io/holistics/anfra validate- One image for every machine. Docker pulls the build for yours: x64 or ARM, Apple silicon included.
- Tags follow the releases: a full version such as
0.5.0, a minor version such as0.5, orlatest. - No login. Anyone who can reach the port can open the apps and query the project's data. Publish the port only to people who may do that, or put the server behind your own SSO proxy.
Set up your coding agent
anfra agent setupThis sets up the anfra plugin from holistics/anfra-skills in every coding agent it finds on this machine:
- Claude Code and Codex: it installs the plugin through their own CLIs.
- Any other agent, Cursor included: it installs nothing, and links to that agent's install steps in the skills repo's README.
It installs per user, for every project. Restart the agent afterwards to load it. Run the command again to update to the latest version. Run in an anfra project, it also writes an anfra block into the project's AGENTS.md, which tells any agent working there to use the skills. anfra init writes the same block.
The plugin contains:
- Skills that teach the agent to work with anfra:
anfra-setup-repo: create a project and connect a data source.anfra-aml: write models, fields, relationships and datasets.anfra-aql,anfra-write-aql,anfra-validate-aql,anfra-run-aqlandanfra-lookup-values: write, check and run queries.anfra-build-data-app: build a data app with the anfra SDK.
- An
aql-writeragent that writes and validates queries. Claude Code only. - Hooks: one validates AML files as the agent edits them, and one tells the agent at the start of a session when a newer anfra release is out.
Ask for a skill by name in your prompt, for example:
Use the anfra-build-data-app skill. Build a revenue overview with a monthly trend and revenue by region. Clicking a region should filter the trend.
In Claude Code, a plugin's skills show with the plugin's name in front, such as anfra:anfra-build-data-app.
| Flag | Description |
|---|---|
--agent | Set up these agents only, by id: claude-code, codex, cursor, github-copilot, opencode, gemini-cli and others. |
--check | Report each agent, the copies of the skills anfra can find and their versions, and change nothing. |
Cursor installs plugins from its marketplace, not from a command. Run anfra agent setup --agent cursor for the steps: an admin imports https://github.com/holistics/anfra-skills as a team marketplace, then each user installs anfra from the marketplace panel.
Agents that take no plugin can install the skills alone, without the aql-writer agent and the hooks. Name the agent by its id:
npx skills add holistics/anfra-skills -a <agent-id> -g -ySkills from before the rename
The skills' names now start with anfra-, so they don't clash with other vendors' skills of the same name. A plugin update replaces the old skills. A copy installed with npx skills before the rename keeps its old folders next to the new ones, so your agent loads both. Remove the old ones:
npx skills remove -g -y aml aql build-data-app lookup-values run-aql setup-repo validate-aql write-aqlanfra agent setup --check lists any it finds under "Deprecated skills".
Create a project
anfra init custom-bi
cd custom-bi/anfra init creates the folder if needed and sets up the data source config and the models/, datasets/ and apps/ folders. It never changes an existing file, so it is safe to run in an existing repo. Then fill in your warehouse credentials in .anfra/data_sources.yml. See Data sources.
To have your agent do this step instead, open an empty folder in it and ask it to use the anfra-setup-repo skill.
See Project Structure for what gets generated, and the CLI reference for every command.