Skip to main content
Portal CLI gives you terminal access to Portal. You can run the latest release with npx, so you do not need to install it globally.

Prerequisites

Before you start, make sure you have:
  • Access to a Portal instance
  • Your Portal instance URL, such as https://portal.example.com
  • CLI authentication enabled in your Portal backend through CIMD. For a hosted Portal instance, ask your Portal administrator to enable CIMD before you run auth login.
  • Node.js 24 and npm

Connect to Portal

1

Run Portal CLI

Check the latest published version:
npx downloads and runs the latest release without adding a global installation.
2

Authenticate

Sign in with your Portal instance URL:
The command opens a browser for authentication. If the environment cannot open one, add --no-browser and open the printed authorization URL yourself.
3

Verify the instance

List your configured instances:
The Portal instance you just authenticated with should be selected.
4

Run your first Portal workflow

Run a bounded search across the software catalog and TechDocs:
This is read-only. A successful response is a JSON document with items, totalItems, and pageInfo. An empty items array still means the command succeeded; try a term used by your organization.

Use Portal with a coding agent

The Portal AI plugins add Portal workflows to Claude Code, Codex, and Cursor. The plugins use Portal CLI for setup, diagnostics, search, service briefings, and Portal actions.
Add the marketplace and install the plugin:
Start a new Claude Code session, then run:
After setup, ask your coding agent to search Portal, inspect a service, or find an action. See the plugin repository for the available workflows and host-specific usage.

Log out

Clear the stored credentials for one instance:
Run auth login again when you want to reconnect.

Troubleshooting

If auth login reports that the server does not support CLI authentication, the Portal backend does not expose the CIMD metadata that the CLI needs. Ask your Portal administrator to enable Client ID metadata documents under App Settings > General > MCP, then retry the command. For a hosted Portal instance, this setting is managed by the instance administrator.
Confirm the Portal instance URL, then retry without opening a browser automatically:
Open the printed authorization URL yourself. If access is denied, confirm that you can sign in to the Portal instance in your browser.
List the configured instances, select the intended one, and verify it:
Inspect the latest published command help:
The help output for the latest release is the authoritative source for available commands and flags.

Next steps