Skip to content

Terminal CLI (pleum)

Connect Claude Code, Aider, Codex and other coding agents to PleumRouter in one command.

Install

Run with npx pleumrouter (Node 18+), or install globally: npm install -g pleumrouter.

bash
# curl 원라이너 (npm 전역 설치를 감쌈)
curl -fsSL https://router.pleum.ai/install | sh

# 또는 패키지 매니저로
npm install -g pleumrouter
bun install -g pleumrouter

# 설치 없이 바로 실행
npx pleumrouter --help

Login

A browser window opens automatically. After logging in, click "Approve & Connect" and an OAuth session is saved to ~/.pleum/config.json. No API key is created.

bash
# 브라우저 로그인 (기본)
npx pleumrouter login

# 브라우저 없는 환경 (SSH · CI)
npx pleumrouter login --device
Use --device when you can't open a browser (SSH, CI). An 8-character code is shown; open router.pleum.ai/device on another device and enter it.

Launch an Agent

The CLI sets per-agent env vars and config files automatically — no need to touch ANTHROPIC_BASE_URL or TOML files manually.

bash
# 인자 없이 실행 = 런처 메뉴 (↑↓·휠 이동, enter·클릭 실행, →·우클릭 모델 설정)
pleum

# Claude Code
pleum launch claude --model claude-sonnet-4

# Aider
pleum launch aider --model gpt-4.1

# Codex (Responses API 자동 설정)
pleum launch codex --model gpt-4.1

# Goose
pleum launch goose

# OpenHands
pleum launch openhands

# -- 이후 인자는 도구로 그대로 전달
pleum launch codex --model gpt-4.1 -- --full-auto
opencode and crush require a local project file for provider config. Running pleum launch opencode prints the config snippet to copy.

Chat (REPL · one-shot · pipe)

A multi-turn interactive REPL — but pass a prompt as an argument or pipe via stdin and it runs once, ready for scripts. Omit the model to get an interactive picker. Cost is shown in credits after each response.

bash
# 대화형 REPL  응답은 마크다운 스트리밍 렌더(굵게·코드블록·리스트)
pleum run gpt-4.1
pleum run                 # 모델 미지정  화살표(↑↓) 선택

# 1회 실행 (스크립트 · 파이프  파이프면 자동으로 원문 그대로)
pleum run gpt-4.1 "한 줄로 요약: 트랜스포머란?"
cat error.log | pleum run gpt-4.1 "원인이 뭐야?"

# REPL 안에서: /help  /model(화살표 선택)  /system  /clear  /save  /load  /exit
# 생성  Ctrl+C = 중단(대화 유지) · 멀티라인은 """ · 이미지 경로 넣으면 멀티모달
Inside the REPL, type /help for commands. /model <id> switches models without losing the conversation (compare models side by side); /system, /clear, /save, /load are also supported. Wrap multi-line input in """, and include an image path in your message to send it multimodally.

Model List

Browse the public model catalog without authentication. Shows provider, context length, and price per 1M tokens; add --json for script-friendly output. --info opens a detail view with per-provider latency, throughput and uptime, and pleum top shows the router-wide usage leaderboard.

bash
pleum models              # 전체 목록 (provider · 컨텍스트 · 가격 크레딧/1M)
pleum models claude       # "claude" 포함된 모델만
pleum models gpt --json   # JSON 출력 (스크립트 · jq )

pleum models <id> --info  # 모델 상세  provider별 지연·처리량·업타임, 주간 사용량
pleum top                 # 라우터 전체 리더보드 + 제공자 점유율 (--period daily|monthly)

Check Balance

See your balance and spend right in the terminal. usage renders per-model/day spend as bar charts — if your session expired, run pleum login again.

bash
pleum balance                    # 잔액: 12,500 크레딧 / $9.4231
pleum usage --by model --days 7  #  지출 리포트(막대 차트)  model|provider|api_key|day
pleum health                     # 게이트웨이 연결·DB·환율·로그인 상태 점검

Utilities

completion prints a shell completion script (tab-complete commands and model names). upgrade reinstalls the latest version via npm.

bash
pleum version             # 버전 출력
pleum completion zsh      #  자동완성 스크립트 (>> ~/.zshrc)
pleum upgrade             # 최신 버전으로 재설치

Self-host / Staging

Override the gateway URL with the PLEUM_BASE_URL env var.

bash
PLEUM_BASE_URL=https://my-instance.example.com pleum launch claude