Skip to main content

Align CLI

@aligndottech/cli is free, open source (MIT) and needs no account. It imports decision history from the tools you already use into a local graph, and then serves that graph to any AI agent over MCP.

It is the fastest way to answer the question this product exists for: what would my agent say if it knew what we had already decided?

Install

npm install -g @aligndottech/cli
align --version

Requires Node.js 20 or later.

Ninety seconds to a graph your agent can read

align import git # your own repo history - no token, no account
align mcp --setup # detect your editors and write their MCP config

Then ask your agent something only the graph knows. align setup walks the same path interactively if you would rather be prompted.

Commands

Working with the graph

CommandWhat it does
align search "<query>"Semantic search. --limit (10), --space <slug>
align ask "<question>"Natural-language question over the graph. --limit (8)
align decisions listList decisions. --platform, --status, --space, --limit (20)
align decisions show <id>Full detail for one decision
align links listRelationships between decisions. --relation <type>, --decision <id>
align spaces listSpaces in the current workspace
align driftSuperseded and conflicting decisions
align export [topic]Export decisions. --format brief|json (brief), --limit (50)
align statusWorkspace and connection summary

Capturing and checking

CommandWhat it does
align capture <url>Capture a decision from a URL (a Slack thread, a PR, an issue)
align checkCheck your working changes against the graph. See below

Importing history

align import with no arguments runs interactively. Every source takes --approve to skip review, and --limit to bound the fetch.

CommandExtra flagsDefault limit
align import git--from, --to, --branch500
align import github100
align import gitlab--domain100
align import jira--email, --token, --domain100
align import confluence--email, --token, --domain50
align import linear100
align import slack--days-back (90)50
align import teams50
align import zoom30
align import notion50

Plus align import list, align import suggestions and align import scan-runs to inspect what a scan produced before approving it.

Slack is experimental and needs a user token (xoxp-), not a bot token. Create one at api.slack.com/apps with channels:read, channels:history, groups:read and groups:history.

Environment and auth

CommandWhat it does
align env set <prod|preview|local>Set the default environment
align env getShow the current environment
align loginConnect to a hosted workspace. --token <token> for non-interactive
align logoutClear stored credentials
align whoamiShow the authenticated identity
align setupGuided first-run setup. --local, --approve, --reset
align local start|status|resetManage the local embedded graph
align mcpRun as an MCP server. --setup writes your editor config

Every command accepts --env <prod|preview|local> to override the default for one invocation.

align login is optional. Without it the CLI works entirely locally; with it, it reads and writes your organisation's shared graph.

align check - the pre-commit and CI gate

align check # working changes vs the graph
align check --ci --base origin/main # in CI, over the whole branch
align check --hook --block-on-critical # as a git hook
align check --format claude # agent-readable output
FlagPurpose
--base <ref>Diff <ref>...HEAD instead of the working tree. Use this in CI
--ciCI mode
--allCheck everything, not just the diff
--advisoryReport, never fail
--block-on-criticalNon-zero exit on a critical conflict
--formatclaude, gemini, pi, opencode, text
--resolve <id>:<honored|overridden|context_changed>Record how you resolved a flagged decision
In CI, always pass --base

Without it, align check diffs the working tree - and a clean CI checkout has nothing staged and nothing uncommitted. It will report "no changes to check" and exit 0 on every pull request forever, which looks exactly like a passing gate.

The check returns unknown rather than a pass when it cannot reach the analysis service. Treat unknown as "unchecked", not as "fine". See the Agent Alignment Layer.

MCP server

align mcp --setup # writes the config for detected editors
align mcp # run it directly (stdio)

Manual configuration:

{
"mcpServers": {
"align": {
"command": "align",
"args": ["mcp"]
}
}
}

The CLI server exposes 8 tools with underscored names (search, capture, check_alignment, …). The hosted server exposes 19 with dotted names (search). They are different servers reading different graphs - see AI Assistants (MCP).

Environment variables

VariablePurpose
ALIGN_ENVlocal, preview or prod
ALIGN_GATEWAY_URLOverride the API URL
ALIGN_TOKENAPI token, for non-interactive use
ALIGN_TENANT_IDWorkspace tenant ID

What the CLI does not do

It builds a personal graph. Real-time capture from Slack or Teams, ambient suggestions, cross-team conflict detection and the shared org graph are hosted features - see Plans. Nothing you capture with the CLI is lost when you move to a shared workspace.

Next steps