faf-cli is a command-line tool built around the .faf (Foundational AI Format) context format, with the goal of letting AI coding agents obtain accurate, versioned project context from a repository's real tech stack. The official description emphasizes: the context read by every AI coding agent is generated from your repository, not guessed.
Purpose
- Provide project-level context for AI coding agents (such as Claude Code, Grok, Cursor, GitHub Copilot, etc.).
- Use a single project.faf file to automatically generate agent instruction files such as AGENTS.md, CLAUDE.md, GEMINI.md, and .cursorrules, avoiding content drift and repeated explanations.
- Let context follow Git version management, so that every clone, fork, or checkout obtains complete AI context.
Main capabilities
- Automatic detection: running faf auto detects and populates project information; running faf without arguments displays the project score.
- Multi-format generation: faf export can generate AGENTS.md (--agents), Copilot-readable files (--copilot), and more.
- Scoring mechanism: since v8.0 it uses the always-33 scoring kernel (Rust WASM), scoring across all 33 Mk4 slots, with the application type determining which slots are active; the remaining slots are marked slotignored but remain visible. The recommended target is Trophy 100%.
- Custom rules: custom instructions can be written in ai_instructions.warnings in project.faf, and will appear verbatim at the top of every AGENTS.md written by faf.
- Git-native: since v7.0 it supports faf diff, faf log, and faf hooks, with context versioned alongside the code.
- Cards and identity: since v8.1, faf card init can generate agent.fafa, an AI Catalog entry, and an ARD entry from seven questions; .fafa is the portable identity format for the Agent Layer.
- Memory format: .fafm is the portable agent memory format introduced in v7.2.0 and is interoperable with claude-fafm-sdk 1.0.
- Rendering and display: faf show can render .faf as a browsable page; faf loop can drive a repository to 100% or until it hits an artificial bottleneck.
- Compiled artifacts: since v6.0, Bun single-file compilation is used, producing standalone binaries suitable for CI/CD, Docker, or isolated environments.
Usage (based on official text)
- After installation, run faf with no arguments to view the project score; faf auto automatically detects and fills it in.
- Run faf --help to view the complete command set and options.
- Distributed via npm, PyPI, and crates.io.
- Custom rules are written into ai_instructions.warnings in project.faf.
- Generate AGENTS.md with faf export --agents; generate Copilot files with faf export --copilot.
Applicable scenarios
- Projects where multiple AI programming tools coexist and need a unified source of context.
- Teams that want context versioned alongside code and to avoid repeatedly explaining project background to AI.
- Scenarios that need a single-file binary for CI/CD, Docker, or isolated environments.
- Scenarios that provide portable identity (.fafa) and memory (.fafm) for agents.
Limitations and notes
- The official text does not provide specific pricing, fees, or commercial licensing information; the project uses the MIT license and is free and open source.
- The official text does not describe supported operating system details, only mentioning that compiled artifacts cover four platforms and that tests run on Windows, Ubuntu, and macOS.
- The scoring target is 100%; tiers below 100% still exist in the scoring ladder, but the official target is no longer 85%.
- The official text mentions that when upgrading from 7.x to 8.x, the .faf score missing 12 enterprise markers may drop (21 filled = 64%), and running faf auto to write the markers can restore the score.
- The official text does not provide specific installation commands, only stating distribution via npm, PyPI, and crates.io; if installation commands are needed, refer to each platform's package manager.