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
| Command | What it does |
|---|---|
align search "<query>" | Semantic search. --limit (10), --space <slug> |
align ask "<question>" | Natural-language question over the graph. --limit (8) |
align decisions list | List decisions. --platform, --status, --space, --limit (20) |
align decisions show <id> | Full detail for one decision |
align links list | Relationships between decisions. --relation <type>, --decision <id> |
align spaces list | Spaces in the current workspace |
align drift | Superseded and conflicting decisions |
align export [topic] | Export decisions. --format brief|json (brief), --limit (50) |
align status | Workspace and connection summary |
Capturing and checking
| Command | What it does |
|---|---|
align capture <url> | Capture a decision from a URL (a Slack thread, a PR, an issue) |
align check | Check 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.
| Command | Extra flags | Default limit |
|---|---|---|
align import git | --from, --to, --branch | 500 |
align import github | 100 | |
align import gitlab | --domain | 100 |
align import jira | --email, --token, --domain | 100 |
align import confluence | --email, --token, --domain | 50 |
align import linear | 100 | |
align import slack | --days-back (90) | 50 |
align import teams | 50 | |
align import zoom | 30 | |
align import notion | 50 |
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
| Command | What it does |
|---|---|
align env set <prod|preview|local> | Set the default environment |
align env get | Show the current environment |
align login | Connect to a hosted workspace. --token <token> for non-interactive |
align logout | Clear stored credentials |
align whoami | Show the authenticated identity |
align setup | Guided first-run setup. --local, --approve, --reset |
align local start|status|reset | Manage the local embedded graph |
align mcp | Run 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
| Flag | Purpose |
|---|---|
--base <ref> | Diff <ref>...HEAD instead of the working tree. Use this in CI |
--ci | CI mode |
--all | Check everything, not just the diff |
--advisory | Report, never fail |
--block-on-critical | Non-zero exit on a critical conflict |
--format | claude, gemini, pi, opencode, text |
--resolve <id>:<honored|overridden|context_changed> | Record how you resolved a flagged decision |
--baseWithout 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
| Variable | Purpose |
|---|---|
ALIGN_ENV | local, preview or prod |
ALIGN_GATEWAY_URL | Override the API URL |
ALIGN_TOKEN | API token, for non-interactive use |
ALIGN_TENANT_ID | Workspace 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
- AI Assistants (MCP) - wire it into Claude, Cursor or Copilot
- Integrations - hosted connectors vs CLI sources
- Plans - what the shared graph adds