@use-portal-co/cli
v0.1.1
Published
Portal CLI
Readme
Portal CLI
Command-line tools for deploying Portal agent configurations.
Install
npm install -g @useportal/cliOr run without installing:
npx @useportal/cliConfigure
Set your Portal secret API key:
portal config set api-key sk_...Set your LLM provider key once:
portal config set llm-key sk-ant-...The LLM key is sent to Portal and stored on your account. It is not stored locally.
Define Agents
Create portal.config.ts in your project root:
export default {
environmentId: "env_xxx",
agents: {
"support-agent": {
name: "Support Agent",
model: "anthropic/claude-sonnet-4-20250514",
instructions: "You are a helpful support assistant.",
tools: {},
},
},
};Deploy
portal deployOr specify the environment directly:
portal deploy --environment env_xxxCommands
portal deploy
portal config set api-key <key>
portal config set llm-key <key>
portal config set api-url <url>
portal config get
portal whoamiConfiguration Resolution
API key priority:
PORTAL_API_KEY
local CLI configAPI URL priority:
PORTAL_API_URL
local CLI config
https://api.useportal.coEnvironment priority:
--environment
portal.config.ts environmentIdDevelopment
pnpm install
pnpm buildLicense
MIT
