Command-line interface for expand.ai
Use the Expand CLI to authenticate locally, fetch pages from a terminal, and install agent integrations.
Install the CLI globally with your package manager.
npm install -g expandaipnpm add -g expandaibun add -g expandaiFor local development and agent harnesses, sign in through the browser. The CLI stores the local credential and reuses it for commands and MCP.
expandai loginUse EXPAND_API_KEY for CI, servers, and other non-interactive environments where browser login is not available.
expandai fetch https://example.com
expandai fetch https://example.com --search "authentication"
expandai fetch https://example.com --format jsonfetch prints Markdown by default. Use JSON output when you need response metadata or other included evidence.
Claude Code and OpenCode use hooks:
expandai hook install claude-code project
expandai hook install opencode projectCursor and Codex use a skill plus MCP:
expandai skill install cursor project
expandai mcp install cursor project
expandai skill install codex project
expandai mcp install codex projectUse global instead of project only when Expand should be available in every project on this machine.
expandai whoami