Official command-line interface for Linkup — AI-powered web search from your terminal.
pipx install linkup-cliDon't have pipx?
brew install pipx # macOS
# or: python3 -m pip install --user pipx
pipxinstalls CLI tools in isolated environments and is the recommended way to install Python CLIs on modern macOS/Linux. Plainpip install linkup-clialso works, but on macOS Sonoma+ and most Linux distros you'll hit an "externally-managed-environment" error from the system Python.
# 1. Configure your API key (opens browser to app.linkup.so)
linkup setup
# 2. Search
linkup search "What is the capital of France?"# Basic search (standard depth, AI-summarized answer with sources)
linkup search "your query"
# Deep search (more thorough, slower)
linkup search "complex research topic" --depth deep
# Raw search results (URLs + content, no AI summary)
linkup search "python tutorials" --output searchResults
# Structured output (JSON matching your schema)
linkup search "Tell me about the movie Inception" \
--output structured --schema-file movie.json
# Short aliases
linkup s "your query" -d deep -o searchResultsShell quoting doesn't handle long prompts well. Use one of these instead:
# From clipboard
linkup search --clipboard
# From a file
linkup search --file prompt.txt
# From stdin (pipe)
echo "your query" | linkup search
cat prompt.txt | linkup search
# Interactive mode (paste text, then Ctrl+D to submit)
linkup searchOn Linux, clipboard mode requires one of xclip, xsel, or wl-clipboard.
Get JSON results conforming to a schema you define.
# Schema in a file
cat > movie.json <<'EOF'
{
"type": "object",
"properties": {
"title": {"type": "string"},
"year": {"type": "integer"},
"director": {"type": "string"},
"main_cast": {"type": "array", "items": {"type": "string"}}
},
"required": ["title", "year", "director"]
}
EOF
linkup search "Inception (2010)" -o structured --schema-file movie.json
# Inline schema (good for short one-liners)
linkup search "iPhone 16 Pro release date and starting price" -o structured \
--schema '{"type":"object","properties":{"release_date":{"type":"string"},"starting_price_usd":{"type":"number"}}}'Extract clean markdown from any URL:
linkup fetch "https://example.com"linkup config # show current config + API key source
linkup setup # re-run interactive setupAPI key is stored at ~/.linkup/config (chmod 600). You can also set it via env var:
export LINKUP_API_KEY="your-key-here"Env var takes precedence over the config file.
| Command | Alias | Description |
|---|---|---|
linkup setup |
Interactive setup — open app.linkup.so, save API key, test connection | |
linkup search |
linkup s |
Search the web |
linkup fetch |
linkup f |
Fetch and extract content from a URL |
linkup config |
linkup c |
Show current configuration |
| Flag | Short | Values | Description |
|---|---|---|---|
--depth |
-d |
fast, standard, deep |
Search depth (default: standard) |
--output |
-o |
sourcedAnswer, searchResults, structured |
Output type (default: sourcedAnswer) |
--schema-file |
path | JSON schema file (required with -o structured) |
|
--schema |
JSON string | Inline JSON schema (required with -o structured if --schema-file not used) |
|
--clipboard |
-c |
Read query from system clipboard | |
--file |
-f |
path | Read query from a file |
| Variable | Description |
|---|---|
LINKUP_API_KEY |
Your Linkup API key. Overrides the config file when set. |
# Quick fact
linkup search "population of tokyo"
# Deep research
linkup search "latest developments in quantum computing" --depth deep
# Raw search results (URLs + content)
linkup search "best python web frameworks" --output searchResults
# Extract article content
linkup fetch "https://example.com/article"
# Pipe a long prompt
cat long-prompt.txt | linkup search --depth deepMIT