Align CLI
OfficialAlign's MCP server lets an agent query, check, capture, and manage a cross-tool decision graph, mostly in local mode with some team/cloud and connector actions.
Check a proposed diff or code change before editing, surfacing related or conflicting past decisions and warning when a check is unknown/unverified.
Ask natural-language questions or search the local decision graph, with reasons, commit SHAs, and source context.
Capture new decisions from Slack, Jira, GitHub, Confluence, URLs, or raw text.
Check whether code/config/docs have drifted from a specific decision.
Explore decision relationships: linked decisions, impact, conflicts, related file/module decisions, topic timelines, rationale, and stale code built on superseded decisions.
Manage connected sources: backfill history, check/start sync status, estimate classification cost, and view/change source scopes.
Record the user's judgement on conflicts or false alarms as verdicts/notes, and request/complete sharing of ratified decisions with a team.
Plan and create backlog issues in Linear, GitHub Issues, or Jira from a decision, only after explicit user request and approval.
Note mode limits: some tools are local-only, team-graph behavior differs, and decision history timeline is unavailable in local mode.
Imports selected Confluence page trees as sources of team decisions.
Imports decision context from Git commit history, including commits that explain why a change was made, to build the local decision graph.
Reads recent merged pull requests and repository data from GitHub, within token permissions, to import decisions and their rationale.
Reads repository data from gitlab.com, within token permissions, to import decisions and their rationale into the graph.
Imports selected Jira projects, boards, or filters as sources of team decisions.
Imports selected Linear projects as sources of team decisions.
Imports selected Notion pages as sources of team decisions.
Imports decisions from Slack conversations into the decision graph.
Imports decisions from Zoom meetings into the decision graph.
Align CLI
Your AI agents know the code. They don't know the company.
Align reads the decisions your team already made, from commits, pull requests, docs, tickets and chat. Then it checks your coding agent's changes against them. Nobody writes the decisions in by hand: Align reads them from where they were made, and reads again when you run it.
See it catch a decision in a few seconds, with nothing installed and no account or AI key:
npx @aligndottech/cli demoIt runs in a temp folder and leaves your repo and ~/.align alone. The first run downloads a
small on-device model (about 50 MB) once.

The same prompt, two real runs on Align's own repo (14 Oct 2026). The text is copied from those runs and shortened. The GIF replays it, so it isn't a live session (how). Without Align the agent plans to skip signature checks; with it, the agent stops and cites the decision that ruled that out.
Use it on your own repo
npm install -g @aligndottech/cli
alignNo Node? curl -fsSL https://align.tech/install.sh | sh installs a standalone binary instead.
Windows and the details are in Installing.
Run align in a git repo. It reads your commits, ADRs and RFCs, decision logs, CLAUDE.md,
AGENTS.md and recent merged pull requests, and stores what was decided, why and where in a local
file, ~/.align/local.db. This README calls that the graph. Then it asks how you want to use it.
Before it writes anything it lists every file and asks.
MIT, no account needed. Beta, pre-1.0.
Related MCP server: beadless
Three ways to use it
Use one, or all three.
1. A decisions file you commit
Nothing is wired into your agent. One command writes the file, and your agent reads it like any other file in the repo. It needs no setup first.
align up --out DECISIONS.md --limit 30This reads the repo's commits, pull requests and docs, writes DECISIONS.md, and adds
@DECISIONS.md to your CLAUDE.md. With no CLAUDE.md, it prints that line for you to add.
Commit both. Run it again whenever you want a new version.
The file lists the rules written in your docs first, then the commits that state a decision, with
the reason where one was given. Fixes and chores are left out.
Two protections. It never replaces a file it did not write, and it will not write into
CLAUDE.md or AGENTS.md. And --out only writes when every decision comes from this repo's
own commits, pull requests and committed docs, on your local graph. If any decision comes from a
chat, a ticket, another repo or a doc you have not committed, --out refuses. Plain align up
then writes a private .align/decisions.md that stays out of git.
2. A check inside your agent
align wires two things into your agent. An edit hook checks each edit against the graph. An MCP
server (the standard way an agent calls an outside tool) lets the agent ask the graph a question.
The hook runs outside the model, so the agent doesn't have to remember to ask. It shows the
decision behind the code and where it came from.
Claude Code: the check runs before the edit is written. That is recorded in headless runs only; interactive sessions are not tested.
Cursor, Copilot CLI and Gemini CLI: their hooks hand the result to the model after the edit lands. None of the three has been tested against a live session.
It warns by default, and blocking is opt-in. If Align is slow or errors, the edit goes ahead.
Hook coverage lists what has and has not been tested, host by host.
Agent hooks has what each agent can and can't do, what setup writes, and
how the pieces fit.
To undo everything Align wrote, run align use --undo.
Claude Code users can install it as a plugin instead:
/plugin marketplace add aligndottech/align-cli
/plugin install align-cli@aligndottechThen run npx @aligndottech/cli once in the repo to build the graph. Codex has a plugin too. Its
hook does nothing until you approve it once inside Codex. After that we have seen it run in
codex exec (Codex CLI 0.153.0), though no recorded payload backs that yet. Both are in
Installing.
3. A check in CI
Fail a pull request that goes against a decision in your committed file:
align check --ci --base origin/main --decisions-file DECISIONS.mdIt needs only your own provider key, for example OPENAI_API_KEY from a repository secret. No
account, no graph, no MCP. It exits 1 on a conflict and 2 when it could not check, so a
check that did not run never passes. A diff too big for the model to read whole is a 2 as
well. The workflow file is in Alignment check.
ADRs in your repo
align adr lists the decisions that never got an ADR. align adr write goes through them and
drafts one for each you accept, in your existing ADR folder, numbered after the last one. The
text comes from the commit or pull request itself, with a link back to it. No model writes it,
and no file is ever replaced.
What it reads
Git history, the repo's ADRs and RFCs, decision logs, CLAUDE.md, AGENTS.md, tenets and
architecture docs. With align connect: GitHub, GitLab, Jira, Confluence, Linear, Notion, Slack,
Teams and Zoom. Also nightshift's parking lot and
plan record (align connect nightshift), MIRSAD exports, and the ADR replacements
ADR Guard validated (align connect adr-guard). All read-only.
Importing has every source and its flags.
Connected sources refresh in the background when you start align, at most every 15 minutes per
source. There is no timer, so nothing refreshes while you only have your agent open.
Privacy and telemetry
Align is open source (MIT). In local mode the graph is a SQLite file on your machine,
~/.align/local.db. Tokens you paste for a connector go in your OS credential store (Keychain,
Secret Service or DPAPI), or in config.json if there is none. In local-only mode the only thing
sent to Align is anonymous usage counts, never code or decision text, unless you run align share.
It tells you once before the first one and sends nothing from CI. Turn them off with
align telemetry off or DO_NOT_TRACK=1.
Two things do leave your machine. The first run in a github.com repo reads that repo's recent
merged pull requests from api.github.com without asking. And align ask and align check send
your question or your diff, with the matching decisions, to the AI provider whose key you set, or
to your local model. They do not go to Align. npm releases are published with provenance.
What touches the network and every field we send.
Everyday commands
align # set up, or see your graph and what to do next
align ask "how does our auth work" # an answer, with sources
align ask src/auth/session.ts # decisions about a file
align connect # pick a source to import: git, docs, jira, github, ...
align connect jira --token ... # import one source directly
align check # check your staged diff against the graph
align mcp --setup # wire your agent to the graphalign --help lists the main ones, and the rest are in docs/commands.md. Something not working? align doctor
checks the install, the graph and one real question, and names the next step for each failure.
align ask and align check need an AI key or a local Ollama to write an answer or a verdict.
So does telling a replaced decision from a conflicting one on a local graph. Inside your agent,
search needs no key, because the agent does the reading.
Setting one up.
Teams
Team graphs are by invitation: your admin sends a link, and you run align join. Already have a
team graph? Run align login, then align. Starting a new one is by call for now. A personal
email doesn't get a cloud graph, so solo use is the local graph.
Joining your team.
Does it work
One published study gave a coding agent the product decisions on record and saw decision compliance go from 46% to 95% (Dillon & Varanasi, arXiv:2605.08112). It's a small vendor study, 8 tasks and 41 decision points, and it isn't our data.
Our own benchmark is on our own repos: 29 decisions, every answer labelled by a person. With Align the agent followed the current decision in 139 of 145 runs, with read-only repo search 96 of 145, and with no tools 34 of 145. Where the decision was never written in the code, it was 29 of 30 against 5 of 30. It's dogfood, not customer data, and the product was tuned on these tasks. Method and raw results.
From people using it:
Align caught a gap in my own pull request to Align. It flagged that my change went against a decision the team had already recorded, and it was right. With pi, the finding reaches the model before the edit lands, which is exactly where you want it.
Ryan Joshua Gapac (#569)
With pi, a finding that blocks stops the edit before it runs. One that doesn't is added to the edit's result, so the model reads it straight after.
The pipe-guard question found the right commit and its reason: that guard would have refused about 1 in 24 of the Bash calls I'd recorded. Handy to get that back.
Collin Nerdahl, maker of Andon
Want a hand setting it up? I do free 30-minute calls: https://calendly.com/tom-align/setup
Docs
npm, the binary, Windows, the Claude Code and Codex plugins | |
Three prompts, which agent runs, and how to tell the check is running | |
Every source, tokens, flags | |
Modes, exit codes, CI, the GitHub Action | |
How it works, what setup writes, and what each host can and can't do | |
What has been tested, host by host | |
What runs where, what touches the network | |
Every event and field, and how to turn it off | |
Editor config, the tools your agent gets | |
AI providers, env vars, auth, self-hosting | |
| |
API, CLI JSON or MCP, and why | |
Full reference |
License
MIT, see LICENSE. The CLI, the MCP server and the connector SDK are open source. The hosted team product is a separate commercial service.
Available Tools
19 toolsalign_askARead-only
Ask a natural language question and get answers from the decision graph. Use this when the user asks "how", "what was decided about", or any question about past decisions. Each result carries reason: the stated reason extracted from the commit message, up to two sentences quoted as written. It may be null when the commit states no reason, and a null is not a claim that no reason exists. sha is the commit, when the result is one. Searches the LOCAL decision graph on this machine, not a hosted Align tenant. This local graph shows a decision as superseded only when a supersedes link exists (a person recorded one with align mark, or a typed link); most decisions have no status, so if two results cover the same topic, prefer the one with the most recent decided_at or created_at. That is a heuristic, not a verified status.
Inputs: question (required), limit.
align_backfillA
Import more history from a source the user has ALREADY connected (for example the last year of GitHub PRs) into the local graph on this machine. Offer it when the user asks for older context than the graph holds. It runs in the background, only reads from the source, and makes no LLM calls. It never takes a token or key: if the source is not connected, or its saved token was refused, nothing starts and the reply gives the exact align connect <source> command for the user to run themselves. Do not ask the user to paste a token into the chat.
Inputs: source (required), since.
align_backlogA
Turn one decision into a backlog of issues (one per task, up to 8) in the user's own Linear, GitHub Issues or Jira. Call it ONLY when the user asks for tickets, issues or a backlog from a decision. Never call it on your own initiative. It works in two steps. Step 1: pass decision (and tracker, team, repo or project only if the user said them). You get a PLAN: tracker, destination, the task titles, and a plan_id. Nothing is created until step 2. Show the plan to the user, with the destination and the number of issues, and ask whether to create them. Step 2, only after the user says yes: call again with only plan_id set to the plan_id. That creates exactly the tasks you showed, once. If the plan comes back as needs_choice, ask the user the question it carries (its options are real choices) and call step 1 again with their answer. Never guess a team, repo or project. If the user changes their mind about a task or the destination, plan again. The tool remembers the destination per repo after the first success, so later plans need no question. It uses the user's own tracker credential, and never takes a token or key.
Inputs: repo, team, plan_id, project, +2 more.
align_captureA
Capture a decision from ANY tool - a Slack thread, Jira ticket, GitHub PR, Confluence/doc URL, or raw text. Call this whenever a decision gets made in conversation so the cross-tool decision graph stays current and relationships across tools can be detected.
Inputs: input (required).
align_check_alignmentARead-only
BEFORE writing or changing significant code, call this with the proposed change to surface prior decisions across ALL the user's tools (Slack, Jira, GitHub, git) that it conflicts with or relates to. A "conflict" status means the change opposes a past decision - stop and confirm with the user before proceeding. An "unknown" status means the check could not run and is NOT a pass: the decisions it returns are unchecked, so stop and ask the human rather than treating it as clear. Pass a real unified diff when you have one, and name the files you intend to change: the decisions that wrote those lines are checked too (found_by: blame-lines or blame-file).
Inputs: diff (required), context.
align_check_driftA
Check whether one piece of code, config or documentation still matches one decision you already have the id of (from align_search or align_ask). Use it to ask "has this file moved away from what we decided?". To check a proposed change against every decision, use align_check_alignment instead. Local mode returns score (embedding similarity, 0 to 1) and drifted (true when the score is below 0.5). Both are null, with a note, when the decision has no comparable embedding. A similarity score is a hint, not a verdict. On a team graph a model judges it instead: result.drift_detected, a severity and a recommended action, and the check is saved against the decision.
Inputs: content (required), decision_id (required), source_type.
align_get_conflictsARead-only
List conflicts and contradictions in the decision graph. conflict_count is the exact total; the links list holds one page, and a message says when there are more than it shows - never present the listed links as the complete set unless they match conflict_count.
Inputs: no named parameters.
align_get_decision_rationaleARead-only
Retrieve the rationale, goals, risks, and context behind a specific decision, plus its acceptance criteria and actions when stored (often the concrete fix or command the decision prescribes). Use this when you need to understand WHY a decision was made - the reasoning, trade-offs, and constraints that led to it - or exactly what it requires.
Inputs: decision_id (required).
align_get_decision_timelineARead-only
Get the chronological history of events for a decision - when it was created, when conflicts were detected, when it was acknowledged or resolved. Use to understand how a decision has evolved over time. NOT AVAILABLE IN LOCAL MODE: this local graph has no implementation for it, so the call will fail. Use align_ask to search the local graph instead, or a cloud environment for this tool.
Inputs: decision_id (required).
align_get_impactARead-only
List the decisions linked to one decision, to see what rests on it before you change, reverse or retire it. Local mode returns upstream (links from other decisions to this one, such as a newer decision that supersedes it) and downstream (links from this one to others), one hop each, and every link names its relation. On a team graph it walks up to 5 hops and returns dependencies (what this decision is built on) and impact (what depends on it). For the full story of a topic, use align_get_topic_timeline.
Inputs: decision_id (required).
align_get_topic_timelineARead-only
Everything the team ever decided about a TOPIC, in time order, across every connected tool. Use for "what is the story on X", "how did we end up here", or onboarding onto an unfamiliar area. Includes superseded and archived decisions, because the retired past is what explains why the current answer is current. Not to be confused with align_get_decision_timeline, which is the change history of ONE decision. Answer compactly by default: the current standard first in one sentence, the contested line when decisions disagree, up to three pivotal dated steps, a one-line chain summary, and the sharpest open question the chain leaves open - then offer the rest. Only when the user asked for the story or asks the follow-up, render the full timeline: walk the supersession chain oldest first - which decision replaced which, active vs superseded - with each step's why from align_get_decision_rationale, keep each decision's source_url inline with that decision rather than in a trailing sources list, put the status beside the title, and close with the still-open risks, each naming which decision it came from. When the payload carries still_open, those are the decisions' own stated open questions - close on them.
Inputs: topic (required), limit.
align_markADestructive
Record the USER's judgement in the local graph on this machine. After a conflict from align_check_alignment or align_get_conflicts, ASK the user "Was that a real conflict?" and pass their answer; never decide for them. For a check hit: decision_id + verdict (real or false) + check_files (the files the check covered, as the check result lists them); a false verdict hides that decision only for a later check of the same files. For a stored conflict: decision_id + counterpart_id + verdict. Also kind note (text: one line of plain text, 500 characters at most). Each is recorded as passed on by you, under your agent name; the user sees it labelled that way, a hit you hide is shown as hidden by you, and every check says so. Nothing is shared or sent; sharing is a separate step the user confirms. You cannot hide a decision (not_a_decision), mark one replaced (supersede) or ratify: those are the user's own acts, and asking for one returns the exact align mark or align ratify command to give them. You cannot replace a mark the user made themselves. It never takes a token or key. The user can list or undo marks with align mark --list and --undo.
Inputs: decision_id (required), kind, text, verdict, +2 more.
align_scopeA
See, or change, what the sources the user has ALREADY connected read into the local graph on this machine: only their own items, or everyone's in one named GitHub repo, Jira project, Linear team, GitLab project or Confluence space that their token can see. action "view" lists each connected source's scope (and any change waiting for the person); use it when asked what is read or why teammates' items are missing. action "set" changes one source; offer it when the user asks to include their team's items, or to go back to only their own. A Jira project can be narrowed to one board, and a Linear team to some of its projects. Widening re-reads that source's history on its next sync (a few minutes; the reply says how far back). It deletes nothing and reads other people's items onto this machine only. A team change you make WAITS: nothing reads it, in the background or via align_sync, until a person runs align sync <source> at a terminal, which shows what it reads and asks (default No). Tell them so, with the reply's disclosure sentence in your own words. That prompt is a speed bump, not proof of consent: an agent with shell access could answer it from a pseudo-terminal, and you must never do that. Narrowing to their own items is immediate. Zoom is only the user's own; Slack and Teams already read all their token can see, and so does Notion unless the person picked pages. It never takes a token or key: for a source that is not connected, or whose saved token was refused, the reply gives the exact align connect <source> command for the user to run themselves. Do not ask the user to paste a token into the chat.
Inputs: action (required), repo, board, scope, +6 more.
align_searchARead-only
Alias of align_ask: the same search of the decision graph, taking the text as query. Kept for callers that already use this name; prefer align_ask. Results carry the same reason (the stated reason extracted from the commit message, may be null) and sha. Searches the LOCAL decision graph on this machine, not a hosted Align tenant. This local graph shows a decision as superseded only when a supersedes link exists (a person recorded one with align mark, or a typed link); most decisions have no status, so if two results cover the same topic, prefer the one with the most recent decided_at or created_at. That is a heuristic, not a verified status.
Inputs: query (required), limit.
align_stale_codeARead-only
List code in the current repository still built on a decision that a later decision replaced, with line counts and ranges per file. Only links a person confirmed, unless include_ai is true. Run it inside the repository; needs full git history.
Inputs: include_ai.
align_syncA
Check on, or start, the refresh of the sources the user has ALREADY connected into the local graph on this machine. action "status" says per source when it last synced, whether it needs the person to re-authenticate, and what is still waiting; use it when the user asks whether the graph is up to date or why something is missing. action "run" starts a background refresh now (it only reads from the sources, makes no LLM calls, and returns at once). action "classify_estimate" says what typing the imported items with the user's own AI key would cost, plus the command for the user to run; it cannot start that. It never takes a token or key: for a source that is not connected, or whose saved token was refused, the reply gives the exact align connect <source> command for the user to run themselves. Do not ask the user to paste a token into the chat.
Inputs: action (required), max, source.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Several clusters overlap: align_ask and align_search are literally the same tool under two names, and align_check_alignment, align_check_drift, align_get_related_decisions and align_stale_code all answer variants of 'does this code still match a decision', with only subtle input differences. The descriptions do heavy cross-referencing to steer the agent, which keeps this above a 2, but an agent must read carefully to pick the right check.
Every tool uses the same align_ prefix and snake_case, with no camelCase or style mixing. The deviation is verb style: verb_noun forms (align_check_drift, align_get_impact, align_capture) coexist with bare noun/single-verb forms (align_scope, align_sync, align_backlog, align_stale_code), which is readable but not fully predictable.
19 tools is at the heavy end for a decision-graph server, and at least one slot is wasted on an exact alias (align_search) while another (align_get_decision_timeline) is documented as non-functional in local mode. Most remaining tools do earn a distinct role (sync, scope, share, backlog, drift), so it is over-stuffed rather than bloated.
The surface covers capture, search/Q&A, rationale, topic and decision timelines, conflict listing, drift/alignment checks, impact traversal, backfill/sync/scope, sharing and backlog creation — a broad lifecycle. Gaps are deliberate but real: supersede/retire/ratify and decision hiding are CLI-only (not callable), there is no plain browse/list tool, and align_get_decision_timeline is a documented dead end locally.
Maintenance
Related MCP Connectors
Codebase intelligence for AI coding agents: graph, git history, docs, decisions, code health.
Persistent knowledge graph for AI-augmented teams. Store decisions, findings, and standing rules across agent sessions with semantic search and typed connections. Includes cross-session memory, audit trail, workspace isolation, and secret detection. Built for teams running agents that need to remember. Free until launch with team tier as default, anon trial available.
Shared project memory for AI coding agents: decisions, lessons, risks and tasks in one graph.
Self-hostable shared brain for you and your AI agents — docs, flows, meetings, decisions, rationale
Related MCP Servers
- AlicenseAqualityBmaintenanceDecision memory for teams building with AI coding agents. Captures every engineering decision once, ranks it by blast radius, and briefs every MCP-compatible agent before it acts, so agents stop making conflicting changes across repos.2012Apache 2.0
- AlicenseNot gradedqualityCmaintenanceProvides AI coding agents with git-native persistent memory and a dependency-aware task graph, letting them record and fuzzy-recall architectural decisions, lessons, and gotchas while creating, claiming, and completing tasks that auto-unblock downstream work. Stores everything as plain JSON and Markdown committed inside the repository, so context stays branch-aware, team-shared, and reviewable in pull requests.6 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to read and manage a Git-native decision ledger, providing tools for querying decisions, evidence, cross-repository workspaces, validation, and commit tracing, all operating locally and without a cloud service.MIT
- AlicenseBqualityBmaintenanceLocal-first engineering memory and code-graph tools for coding agents. Supports private session handoffs, code-cited knowledge, repository graph inspection, and optional Git-backed team sharing.2529AGPL 3.0