CLI
The Plenar CLI connects your repo to a Plenar project and configures Claude Code automatically. It handles authentication, MCP setup, CLAUDE.md instructions, and agent hooks in one flow.
For day-to-day work, use the MCP integration through Claude Code. The CLI is for setup and connection management.
Installation
npm install -g @plenar/cli
Commands
plenar connect
Connect this repo to a Plenar project. Opens your browser to authenticate, then:
- Signs you in via OAuth
- Lists your projects and lets you pick one
- Writes
.mcp.jsonwith the MCP endpoint and API token - Updates
CLAUDE.mdwith Plenar workflow instructions - Adds agent coordination hooks to
.claude/settings.json - Detects GitHub repo and links it (if applicable)
plenar connect
If a connection already exists, you are prompted to keep it, switch to a different user/project, or disconnect.
Files created or modified:
| File | What it does |
|---|---|
.mcp.json | MCP server config with Plenar endpoint and auth token |
CLAUDE.md | Workflow instructions (start task, complete task, report blocker, link artifacts) |
.claude/settings.json | Agent coordination hooks |
plenar disconnect
Remove all Plenar configuration from this repo. Revokes the API token and deletes the config files created by connect.
plenar disconnect
Files removed:
- Plenar entry from
.mcp.json - Plenar workflow section from
CLAUDE.md - Agent hooks from
.claude/settings.json
plenar status
Show the current connection status: user, project, and whether the token is valid.
plenar status
Output: Connected user email, project name, token validity. Returns a non-zero exit code if not connected or token is expired.
Options
| Flag | Description |
|---|---|
-h, --help | Show help |
-v, --version | Show version |
Authentication flow
The CLI uses browser-based OAuth — no API tokens to copy/paste manually.
plenar connectgenerates a one-time auth code- Opens your browser to
dashboard.plenar.appwhere you sign in - The browser confirms the auth code
- The CLI exchanges the code for a project-scoped API token
- The token is stored locally in
.mcp.json
The token is scoped to a single project with Planner role. To change the project or user, run plenar connect again.
Manual setup
If you cannot use the CLI (e.g., CI environments or air-gapped networks), see the manual configuration steps in the Connect Claude Code tutorial.