# Cernly > Open-source CLI and MCP server that reads a git repository and reports its architecture as facts with file and line evidence: services, data stores, third-party providers, environment variables, outside hosts, routes, database tables, dependencies and AI tooling. Deterministic, read-only, Apache 2.0. Source: https://github.com/cernly/cernly All pages in one file: https://cernly.dev/llms-full.txt Notes for AI agents. Cernly answers questions about what a repository runs: services, data stores, third-party providers, environment variables, outside hosts, routes, database tables, dependencies and AI tooling. Every answer carries the file and line that proves it. It reads git-tracked files only and never runs, builds or installs anything. In a conversation, connect the MCP server with `claude mcp add cernly -- cernly mcp .` (other clients: https://cernly.dev/use/mcp/index.md). Call `summary` first, then `find_facts`, `get_fact` or `get_map`. For a one-off answer or a script: ``` cernly scan --out facts.json . # every fact with file and line cernly map --out map.json facts.json # stacks, production, parties, routes, findings ``` Then read the map section that fits the question: `parties` for third-party providers, `stacks` for what is production, `routes`, `tables`, `images`, `findings`. Quote the file and line in your answer, and add nothing the output does not contain. Tasks with exact commands: https://cernly.dev/use/tasks/index.md. Agent skill: https://cernly.dev/skills/cernly/SKILL.md. ## Use - [Install](https://cernly.dev/use/install/index.md): Install the Cernly CLI with Go, a release binary or Docker, and run a first scan. - [Tasks](https://cernly.dev/use/tasks/index.md): Common questions about a repository and the exact Cernly commands that answer them, for developers and for the AI agents they ask. - [cernly scan](https://cernly.dev/use/scan/index.md): cernly scan reads the git-tracked files of one commit and writes a deterministic facts file in which every fact carries file and line evidence. - [cernly map](https://cernly.dev/use/map/index.md): cernly map derives stacks, production roles, providers, images, routes, tables, metrics and findings from a facts file, naming the facts behind each conclusion. - [cernly mcp](https://cernly.dev/use/mcp/index.md): Connect Claude Code, Claude Desktop, Cursor or VS Code to the Cernly MCP server so an AI agent answers architecture questions with file and line evidence. - [cernly gate](https://cernly.dev/use/gate/index.md): cernly gate compares a scan with a base scan and exits 1 when the change adds something the policy blocks, such as a new outside party or an unpinned production image. - [cernly sbom](https://cernly.dev/use/sbom/index.md): cernly sbom writes a CycloneDX 1.6 bill of materials from one scan, per service, with dependencies, transitive dependencies from lockfiles and images. - [cernly docs](https://cernly.dev/use/docs/index.md): cernly docs writes architecture documentation in Markdown from one scan, with arc42 sections, C4 context and container views in Mermaid, and a footnote with evidence per statement. - [cernly plugin](https://cernly.dev/use/plugin/index.md): Create a signing key, sign a WebAssembly plugin and verify a folder of plugins before cernly scan loads them. - [.cernly.yml](https://cernly.dev/use/config/index.md): Exclude paths, declare your own domains, set stack roles, gate levels and tags with a .cernly.yml file in the repository; every choice stays visible in the output. - [Output formats](https://cernly.dev/use/schema/index.md): The facts file and the map are canonical JSON described by JSON Schema 2020-12 documents, published for validation and tooling. - [Fact kinds](https://cernly.dev/use/facts/index.md): Every kind of fact a Cernly scan emits, from services and data stores to dependencies, routes, tables, tests and AI tooling. ## How - [Facts and evidence](https://cernly.dev/how/facts/index.md): How a Cernly fact is shaped, why every fact carries file and line evidence, and how image references, versions and repo ids are normalised. - [Plugins and stack adapters](https://cernly.dev/how/plugins/index.md): How Cernly's plugins work as stack adapters that translate one stack's files into a shared fact vocabulary, and which stacks they read. - [Deployment stacks and the production rule](https://cernly.dev/how/stacks/index.md): How Cernly decides which deployment stack is production from the CI jobs that start it, and how a repo or an operator confirms or overrides that. - [The map and rules](https://cernly.dev/how/map/index.md): How Cernly derives the map from facts with pure rules, why the map is a separate file, and how links, findings, metrics and the module graph are built. - [Per-repo configuration](https://cernly.dev/how/config/index.md): How Cernly layers shipped defaults, the repo's .cernly.yml and the operator's settings, why the operator wins, and why every choice stays visible. - [Provider and agent catalogue](https://cernly.dev/how/catalogue/index.md): How Cernly recognises third-party providers and AI coding tools from SDKs, environment variables and hosts, and why a provider needs two kinds of signal to be confirmed. - [WebAssembly plugins and signing](https://cernly.dev/how/wasm-plugins/index.md): How outside Cernly plugins run as signed WebAssembly modules with no file system, network or clock, and how to build one with the plugin SDK. - [The gate](https://cernly.dev/how/gate/index.md): How cernly gate compares a scan with its base, which additions it watches, and how repo and operator levels combine so a change cannot loosen its own policy. - [Dependencies and SBOM](https://cernly.dev/how/sbom/index.md): How Cernly reads dependencies from manifests and lockfiles, attaches them to services, and writes a deterministic CycloneDX 1.6 SBOM. - [Ownership and tags](https://cernly.dev/how/ownership/index.md): How Cernly reports who owns a repository from CODEOWNERS and Backstage catalog files, and how tags in .cernly.yml label a repo by team, product or domain. - [Architecture docs (arc42, C4)](https://cernly.dev/how/architecture-docs/index.md): How cernly docs turns one scan into arc42 sections and C4 views in Mermaid, with a footnote of evidence for every statement and blanks where the code cannot answer. - [MCP server](https://cernly.dev/how/mcp/index.md): How the Cernly MCP server serves one scan to AI agents with read-only tools, why it never adds structure, and how answers stay tied to file and line evidence. - [Open core boundary and contributing](https://cernly.dev/how/open-core/index.md): What is open in Cernly and why, how the boundary is enforced in code, and how to contribute a plugin or a fix under Apache-2.0 with a DCO sign-off.