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
- Detects the project type (Node.js, Python, etc.)
- Checks if a
.mcp.jsonalready exists (if it does, asks whether to continue) - Looks for stored credentials in
~/.almirant/config.json- If found, offers to reuse them
- If not, starts the authentication flow
- Lets you choose the authentication method: OAuth via browser or manual API key
- Validates credentials against the server
- Shows available projects to select from
- Generates the
.mcp.jsonfile at the repository root - 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:
| Method | Description |
|---|---|
| OAuth browser flow (recommended) | Opens the browser to authenticate. If it fails, automatically falls back to the manual option. |
| Manual API key | Paste 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
| File | Description |
|---|---|
.mcp.json | MCP configuration with the project URL and API key |
.agents/skills/ | Skill templates for the AI agent |
When to use init vs link
- Use
initwhen it's the first time setting up Almirant on a team or new machine and you haven't runloginpreviously. - Use
linkwhen you already have stored credentials (vialogin) and just want to quickly link a new repository.