_ _ _ __
/ \ _ __ ___| |__ (_)/ _|_ _
/ _ \ | '__/ __| '_ \| | |_| | | |
/ ___ \| | | (__| | | | | _| |_| |
/_/ \_\_| \___|_| |_|_|_| \__, |
|___/
npx archify-cli init
archify-cli analyzes your repository and gives AI assistants the grounded context they need to write architecture docs.
Archify is built for repositories where you want architecture output based on actual code and docs instead of guesswork.
It can:
- scan the repository and build a grounded knowledge base in
.archify/ - detect when existing analysis is still fresh and reuse it
- regenerate analysis only when the repository changes
- generate doc-specific packets and guides for assistant-driven writing
- write final root-level documents for supported doc types
Use Archify if you want to:
- understand an unfamiliar codebase faster
- generate architecture documentation from real repository evidence
- give Codex or Claude Code a grounded context pack before asking it to write docs
- keep architecture outputs refreshable as the codebase evolves
Node.js >= 20Python >= 3.11- an AI assistant workflow using Codex or Claude Code
Python is required because the analysis engine shipped inside the package is implemented in Python.
From the repository root:
npx archify-cli initThen tell your assistant:
Use Archify on this repo
Typical flow:
- Run
npx archify-cli initonce. - Ask your assistant to use Archify on the repo.
- Archify checks status and decides whether it should analyze, generate, write, or reuse existing artifacts.
Run directly with npx:
npx archify-cli initOr install it in a project:
npm i -D archify-cliThen run:
npx archify-cli status| Command | Purpose |
|---|---|
npx archify-cli init |
Set up Archify in the current repository |
npx archify-cli status [--doc-type <type>] |
Show setup state, artifact freshness, and the next recommended action |
npx archify-cli analyze . |
Build or refresh grounded repository knowledge in .archify/ |
npx archify-cli generate . [--doc-type <type>] |
Build the synthesis packet and guide for the selected document type |
npx archify-cli write . [--doc-type <type>] |
Write the selected root-level document from generated synthesis artifacts |
npx archify-cli clean |
Remove generated artifacts from .archify/ |
Archify adds:
archify.config.jsonfor project configuration.archifyignorefor scan exclusions- project skill files for Codex or Claude Code installs
.archify/for analysis, synthesis, and guide artifacts
Core artifacts include:
| File | Purpose |
|---|---|
archify.config.json |
Project-level Archify configuration |
.archifyignore |
Ignore rules for repository scanning |
.archify/manifest.json |
Analysis state and freshness metadata |
.archify/graph.json |
Repository graph output |
.archify/architecture-context.json |
Grounded architecture context |
.archify/docs/<docType>/packet.json |
Doc-scoped synthesis packet used to author the selected root document |
.archify/docs/<docType>/guide.json |
Section-by-section guide for generating the selected root document |
.archify/docs/<docType>/brief.md |
Human-readable synthesis brief |
.archify/docs/<docType>/guide.md |
Human-readable guide brief |
Archify supports these document types:
--doc-type value |
Output file |
|---|---|
archify |
archify.md |
tech_stack |
TECH_STACK.md |
api_design |
API_DESIGN.md |
data_model |
DATA_MODEL.md |
conventions |
CONVENTIONS.md |
glossary |
GLOSSARY.md |
flows |
FLOWS.md |
test_cases |
TEST_CASES.md |
If --doc-type is omitted, Archify defaults to archify and writes archify.md.
Examples:
npx archify-cli status --doc-type tech_stack
npx archify-cli generate . --doc-type api_design
npx archify-cli write . --doc-type flowsArchify analyzes repository structure and supporting docs, including:
- source files
- routes and entrypoints
- dependencies
- database and migration files
- README and supporting architecture documents
The workflow is guide-driven:
analyzeproduces grounded.archifyartifactsgenerateproduces a doc-scoped synthesis packet and guidewritematerializes the selected root document from those artifacts- installed assistant skills read the selected packet and guide before drafting the final document
Grounded .archify/ artifacts remain the primary source of confirmed facts.
initis the main setup command.statusis the main inspection command.analyze,generate, andwriteare available for manual workflows, but the installed skill is designed to run them when needed.