multisage
v2.3.0
Published
CLI client for Multisage — ask questions from your terminal
Readme
multisage
Query Multisage from your terminal. Get answers from a panel of AI experts (Claude, GPT, Gemini) with a single command.
Installation
npm install -g multisageOr use without installing:
npx multisage "What's the best programming language for beginners?"Setup
- Create an API key at multisage.ai/settings
- Set the environment variable:
export MULTISAGE_API_KEY=msk_your_key_hereUsage
# Ask a question
multisage "React vs Vue for a new project?"
# Get full expert details and stages
multisage --full "Should I use TypeScript?"
# Output as JSON (for scripting)
multisage --json "Best laptop for developers?"
# Full details as JSON
multisage --json --full "React vs Vue?"
# Pipe to a markdown renderer
multisage "Explain async/await" | glow
# Save to file
multisage "Best practices for REST APIs" > advice.md
# Use with a different server
multisage --api-url https://staging.multisage.ai "test question"Options
| Flag | Short | Description | Default |
|------|-------|-------------|---------|
| --api-key <key> | -k | API key (overrides env var) | $MULTISAGE_API_KEY |
| --api-url <url> | -u | Base URL for API | https://multisage.ai |
| --stream | | Force streaming output (progressive rendering) | Auto-detect (TTY) |
| --no-stream | | Force blocking output (wait for full response) | |
| --full | -f | Include expert details and all stages | false |
| --json | -j | Output as structured JSON (implies --no-stream) | false |
| --quiet | -q | Suppress progress spinner | false |
| --version | | Show version | |
| --help | | Show help | |
Streaming Mode
By default, the CLI uses streaming mode when output is a terminal (TTY) and blocking mode when piped to a file or another command. Streaming mode shows content progressively as the AI panel works:
- Quick Answer appears first, streaming character by character
- Expert Responses (Claude, GPT, Gemini) appear as each expert completes
- Synthesis streams the combined analysis
- Debate streams if triggered
# Force streaming even when piped
multisage --stream "React vs Vue?" | tee output.md
# Force blocking (wait for complete response)
multisage --no-stream "React vs Vue?"--json always uses blocking mode (streaming partial JSON is invalid).
Output Modes
Default (Markdown)
Prints the synthesized answer as markdown to stdout.
Full (--full)
Prints all stages: Quick Answer, Expert Responses (per expert), Synthesis, and Debate (if triggered). Works with both streaming and blocking modes.
JSON (--json)
Outputs the API response as JSON to stdout. Combine with --full for the complete response schema. Always uses blocking mode.
Error Codes
| Error | Message | |-------|---------| | Invalid API key | "Invalid API key. Check your key at: https://multisage.ai/settings" | | Insufficient credits | "Insufficient credits. Purchase more at: https://multisage.ai/settings" | | Rate limited | "Rate limit exceeded. Try again in N seconds." | | Concurrent limit | "Too many concurrent requests. Try again in a few seconds." | | Network error | "Could not connect to {url}." | | Timeout | "Request timed out after 300 seconds." |
All errors exit with code 1. With --json, errors are also output as JSON to stdout for programmatic handling.
Requirements
- Node.js 18 or later
- A Multisage API key (get one here)
