Skip to main content

almirant link

Link the current repository to an Almirant project. Uses the credentials stored by almirant login to generate the .mcp.json file and copy skill templates.

Usage

almirant link
warning

Requires having run almirant login previously. If no stored credentials are found, the command will show an error and ask you to run almirant login first.

What it does

  1. Reads credentials from ~/.almirant/config.json
  2. Validates that the API key is still valid
  3. Fetches the list of available projects
  4. Lets you select a project (or enter an ID manually)
  5. Generates the .mcp.json file at the repository root
  6. Copies skill templates to .agents/skills/
  7. Optionally configures your shell to include almirant in the PATH

Interactive flow

$ almirant link

Almirant link

Using credentials for: [email protected]
API: https://api.almirant.ai

Validating API key...
API key is valid.

? Select project
> My Project (a1b2c3d4-e5f6-7890-abcd-ef1234567890)
Another Project (f9e8d7c6-b5a4-3210-fedc-ba0987654321)
Enter project ID manually

Project linked successfully.
- MCP config: /home/user/my-repo/.mcp.json
- Skills dir: .agents/skills
- Skills copied: implement.md, review.md

Shell integration

When finished, the CLI detects your shell (zsh, bash, or fish) and offers to add almirant to the PATH:

Detected shell: zsh (~/.zshrc)
? Add almirant to PATH in ~/.zshrc? (y/N)

If you accept, it adds the following line to your shell configuration file:

# Added by Almirant CLI
export PATH="$HOME/.almirant/bin:$PATH"

Generated files

FileDescription
.mcp.jsonMCP configuration with the project URL and API key
.agents/skills/Skill templates for the AI agent

Difference from almirant init

link is the quick command: it assumes you already authenticated with login and goes straight to project selection. init is the complete flow that includes authentication (OAuth or manual) and configuration in a single step.