Skip to main content

CLI Quickstart

The Align CLI (@aligndottech/cli) is free and open source (MIT). It lets you import decision history from Git, Jira, Linear, Confluence, Slack and Notion into a decision graph, then exposes that graph as a local MCP server so AI assistants like Claude and Cursor can read your decisions as context.

Free, open source, no account required

Read the code, run it yourself - no sign-up needed to build a personal graph locally. align login is optional: it connects the CLI to your Team workspace so the org's shared graph is available too. The published package is @aligndottech/cli.

Installation

npm install -g @aligndottech/cli

Requires Node.js 20+.

Login (optional)

Login is only needed to sync with a hosted Team workspace. To use the CLI against a personal local graph, you can skip this step.

align login

This opens your browser to complete authentication. Your API token is saved locally and reused across commands.

To set a default environment (if you have multiple):

align env set preview

Import from Git

Import decisions from commit messages in your local git history:

align import git

Options:

FlagDefaultDescription
--limit100Max commits to import
--branchcurrent branchGit branch to scan
--from-Start date (ISO, e.g. 2025-01-01)
--to-End date (ISO)
--approve-Skip confirmation prompt

Import from Jira

align import jira \
--token <your-jira-api-token> \
--email your@email.com \
--domain yourorg.atlassian.net

Import from Linear

align import linear --token <your-linear-api-key>

Import from Confluence

align import confluence \
--token <your-confluence-api-token> \
--email your@email.com \
--domain yourorg.atlassian.net

Import from Slack

Experimental

align import slack is experimental. It requires a Slack user token (xoxp-...), not a bot token.

To get a token: go to api.slack.com/apps, create a new app, add these User Token Scopes under OAuth & Permissions: channels:read, channels:history, groups:read, groups:history. Install to your workspace, then copy the OAuth User Token.

align import slack --token xoxp-<your-slack-user-token>

Options:

FlagDefaultDescription
--limit50Max threads to import
--days-back90How many days back to scan

Import from Notion

align import notion --token <your-notion-integration-token>

Search your decision graph

align search "why did we migrate from REST to GraphQL"

Returns the most relevant decisions from your graph using semantic search.

Check for drift

align drift

Flags decisions that are marked as superseded or in conflict with recent activity.

align links

Shows related decisions and cross-tool relationships for context in your current workspace.

Use as an MCP server

The CLI can run as a local Model Context Protocol (MCP) server, making your decision graph available as context to AI assistants.

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):

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

Cursor

Add to your Cursor MCP settings:

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

Once configured, your AI assistant can call tools like align_search, align_capture, and align_check_drift to query and update your decision graph inline.

Environment variables

VariableDescription
ALIGN_GATEWAY_URLOverride the gateway URL (useful for self-hosted)
ALIGN_TOKENAlign API token (alternative to align login)
ALIGN_TENANT_IDTenant ID override
ALIGN_ENVDefault environment (local, preview, or prod)

Common commands

align login Authenticate with Align
align logout Remove stored credentials
align whoami Show current authenticated user
align capture Capture a decision interactively
align check Check alignment against existing decisions
align import git Import from Git commit history
align import jira Import from Jira
align import linear Import from Linear
align import confluence Import from Confluence
align import slack Import from Slack (experimental)
align import notion Import from Notion
align search <query> Search your decision graph
align decisions list List decisions in your graph
align drift Check for superseded or conflicting decisions
align links Show related decisions
align spaces Manage decision spaces
align connector Manage connectors
align env set <name> Set default environment
align env get Show current environment
align mcp Start local MCP server