CLI (cf)
cf installs ContextFile into your agent host and moves a local folder into your evidence supply.
The cf package is not on npm yet, so the commands below do not run from a fresh machine today. Until it is published, add the MCP server by hand with the per-host config on /install; it is the same entry cf install writes.
cf install <host> [--dry-run] [--yes] [--dir <path>]
cf uninstall <host> [--dry-run] [--yes] [--dir <path>]
cf install <order-id> | --listing <listing-id> | <package> install an artifact you bought
cf install --check
cf login sign in this device (prints a code to approve in your browser)
cf logout forget this device's stored token
cf sync <path> [--watch] [--dry-run] [--token <value>]
cf context <init|push|pull|import|export>
cf install <host>(hosts:claude-code,cursor,codex,vscode) adds the ContextFile MCP server to the host's config, a marked block to CLAUDE.md, AGENTS.md or the host's instructions file saying when to call it, and a skill or rule file. It prints every change as a diff and asks before writing;--dry-runwrites nothing. It is safe to rerun.cf uninstall <host>(orcf install --host <host> --remove) removes only what install wrote. The files per host are on /install.cf install <order-id>(or--listing <listing-id>for your newest order on a listing) installs an artifact you bought: it checks the bytes against the artifact digest and the signed report, then writes section files under.contextfile/<package>@<version>/, an index block, and the host's rule or skill.contextfile.lockpins it, andcf install --checkfails when the files drift. Install never buys: with no order it says so and points atcommerce_quoteandcommerce_buy. It signs in withCONTEXTFILE_TOKEN, an agent token with thepurchasescope, not thecf logindevice token, which can only sync.
cf loginruns the OAuth device grant. You approve the code at /device; the device then appears under Settings, Agents, where you can revoke it. The token is stored in your OS config directory, readable only by you.cf synccontent-addresses every file, skips what the server already holds, and records a snapshot. The server scans each file for prompt injection. Symlinks are never followed, and files over the per-file cap are skipped and reported.--watchkeeps running and syncs on change;--dry-runscans and reports without pushing.cf contextreads and writes your team's shared context files (conventions, decisions, how to build and test) over the same sign-in. See Shared context forinit,push,pull,import,exportand pins.
Creating, verifying and publishing from the command line are not shipped yet. Use the MCP tools or the REST API for those.
Version 6, updated 2026-11-19.