Skip to main content

almirant init

Configure the Almirant MCP integration for the current repository. This is the all-in-one flow: it includes authentication, project selection, and configuration file generation.

Usage

almirant init

What it does

  1. Detects the project type (Node.js, Python, etc.)
  2. Checks if a .mcp.json already exists (if it does, asks whether to continue)
  3. Looks for stored credentials in ~/.almirant/config.json
    • If found, offers to reuse them
    • If not, starts the authentication flow
  4. Lets you choose the authentication method: OAuth via browser or manual API key
  5. Validates credentials against the server
  6. Shows available projects to select from
  7. Generates the .mcp.json file at the repository root
  8. Copies skill templates to .agents/skills/

Interactive flow

$ almirant init

Almirant init

Detected project type: node
? Stored credentials found ([email protected]). Use them? (Y/n)
Using stored credentials (API: https://api.almirant.ai)

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

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

Next: run your agent using the project MCP config.

Authentication methods

If no stored credentials are found (or you choose not to reuse them), the CLI presents two options:

MethodDescription
OAuth browser flow (recommended)Opens the browser to authenticate. If it fails, automatically falls back to the manual option.
Manual API keyPaste an existing API key directly in the terminal.
info

If you already used almirant login, your credentials are detected automatically and you don't need to authenticate again.

Generated files

FileDescription
.mcp.jsonMCP configuration with the project URL and API key
.agents/skills/Skill templates for the AI agent
  • Use init when it's the first time setting up Almirant on a team or new machine and you haven't run login previously.
  • Use link when you already have stored credentials (via login) and just want to quickly link a new repository.