Skip to main content
Best for: using Valyu yourself. Search, deep research, content extraction, and answers from your terminal - and inside AI coding agents.

Paste into your AI coding agent to install and use the Valyu CLI.

Open in Cursor

Installation

The cURL, Homebrew, and PowerShell methods install standalone binaries that do not require Node.js.

Overview

The Valyu CLI brings Valyu’s full platform to your terminal - search, deep research, content extraction, and AI-powered answers across web and specialised data sources. It’s agent-native, built for use inside AI coding agents like Claude Code, Cursor, and Windsurf, but equally powerful as a standalone tool for knowledge workers who prefer the terminal. Key features:
  • Deep research - Generate comprehensive research reports with human-in-the-loop review on plans, sources, and outlines
  • Batch research - Run multiple research queries in parallel
  • AI-powered answers - Streaming answers with real-time source citations
  • Content extraction - Pull clean content from any URL with optional summarization and structured output
  • Search - Web and specialised sources including academic, financial, biomedical, patents, SEC filings, economics, and news
  • Agent-native - Auto-detects non-TTY environments and outputs structured JSON for piping and scripting
  • Stdin support - Pipe queries from other tools directly into Valyu
  • Account management - Provision budget-capped API keys, check your balance, top up, and rotate or revoke keys, from the terminal or programmatically

Authentication

Run valyu login to authenticate. It opens your browser, you approve the request, and the CLI mints a scoped val_ key and stores it locally - there is nothing to copy and paste:
Use --no-browser to print the URL and code instead (useful for headless or agent environments), or request specific management scopes with --scope:
For CI or scripting, log in with an existing key or use an environment variable:
Key precedence: --api-key flag, then your valyu login key, then VALYU_API_KEY. A logged-in key takes precedence over the environment variable, so you don’t need to unset VALYU_API_KEY after logging in.
Don’t have a key yet? Sign up at platform.valyu.ai for $10 free credits ($20 with a work email). The CLI supports multiple named profiles for switching between accounts:

Commands

Search across web and specialised data sources:
Options:
  • -n, --limit <number> - Number of results (default: 10)
  • --max-price <number> - Maximum price per result

Answer

Get AI-powered answers with streaming and source citations:
In TTY mode, the answer streams in real-time with formatted citations. In non-TTY mode (piping, scripts), it outputs a single JSON object.

Contents

Extract clean content from web pages:
Accepts up to 10 URLs per request.

Deep research

Generate comprehensive research reports:
Research modes: fast (~5 min), standard (~10-20 min), heavy (~60 min), max (~90 min). The watch command supports human-in-the-loop interactions where the research agent pauses for your input on planning questions, research plans, sources, and report outlines.

Batch research

Run multiple research queries in parallel:

Browse data sources

View all available data sources and their pricing:

Account and API keys

Manage your organisation’s keys, balance, and budgets, all self-serve from the terminal. An agent can provision its own scoped, budget-capped key, use Valyu, and revoke it when it is done.
Create and manage API keys:
keys create options:
  • --cap <usd> - hard spend ceiling for the key (omit for uncapped). Once a key reaches its cap, further requests are rejected.
  • --window <total|monthly> - whether the cap is a running total or resets monthly (default: total).
  • --scopes <list> - comma-separated management scopes (see below). Search and data access is automatic, so omit this for a search-only key.
  • --rate-limit <rpm> - requests-per-minute limit.
  • --expires <iso> - expiry as an ISO 8601 timestamp.
Top up credits:
Charges the card on file, or returns a Stripe Checkout link if there is none. Management scopes gate account management only - search and data access is always automatic: A key can only create child keys with a subset of its own scopes and a cap within its remaining budget, so you can hand a scoped, budget-capped key to a sub-agent and trust it cannot exceed those limits.

Utility commands

Agent integration

The CLI is designed to work seamlessly inside AI coding agents. When stdout is not a TTY (e.g. when called by an agent or piped), all commands automatically output structured JSON without needing the --json flag. This means agents can call Valyu directly:
The CLI also ships with an Agent Skill that teaches AI coding agents how to use it without an MCP server:

Global flags

Search types

Additional resources

GitHub Repository

Source code, issues, and releases

npm Package

Install via npm

Get API Key

Sign up for $10 free credits ($20 with a work email)

API Reference

Full Valyu API documentation