Linkly AILinkly AI
Back to blog

Without Leaving the Terminal, Let AI Search Every Document on Your Computer

·Linkly AI·

Linkly AI Desktop quietly indexes your documents in the background. But how do you use those indexes?

One way is through the MCP protocol, letting AI assistants call them directly. Another, more direct way — from the command line.

Linkly AI CLI is that command-line tool. Written in Rust, just a few MB in size, it connects to the desktop app via MCP and brings document search to your terminal.

Three Core Commands

The CLI follows the Outlines Index progressive workflow: search → outline → read.

search — Find Documents

$ linkly search "Docker deployment" --limit 5

Found 5 results:

#1  Production Deployment Guide
    doc_id: 1044 | type: pdf | words: 12,400 | lines: 580
    has_outline: yes | relevance: 0.89

#2  Docker Compose Configuration
    doc_id: 591 | type: md | words: 1,200 | lines: 85
    has_outline: yes | relevance: 0.82
...

Filter by document type:

$ linkly search "API docs" --type pdf,md,docx

outline — View Document Structure

$ linkly outline 1044

[1] Overview [L1-30, 30 lines]
[2] Environment Setup [L31-80, 50 lines]
[3] Docker Deployment [L81-250, 170 lines]
  [3.1] Dockerfile Configuration [L85-140, 56 lines]
  [3.2] Docker Compose [L141-220, 80 lines]
  [3.3] Environment Variables [L221-250, 30 lines]
[4] Kubernetes Deployment [L251-450, 200 lines]
...

View outlines for multiple documents at once:

$ linkly outline 1044 591 302

read — Read Content

$ linkly read 1044 --offset 141 --limit 80

141 | ## Docker Compose
142 |
143 | Use docker-compose to manage multi-container deployments...
...
220 | Run `docker-compose up -d` to start the services.

Showing lines 141-220 of 580.

Once you’ve found the target section, read it precisely. No need to open a PDF reader or leave the terminal.

MCP Bridge: Connecting AI Tools

One of the CLI’s most important features is the mcp command:

$ linkly mcp

This runs a stdio MCP server, converting Linkly AI’s HTTP MCP into stdio MCP. Any AI client that supports stdio MCP can connect through it.

Claude Desktop configuration:

{
  "mcpServers": {
    "linkly-ai": {
      "command": "linkly",
      "args": ["mcp"]
    }
  }
}

Cursor configuration: Settings → MCP Servers → Add Server, enter linkly mcp.

Once configured, your Claude Desktop or Cursor can directly search and read documents on your computer.

Other Useful Features

Status check:

$ linkly status

CLI version:  0.1.5
App version:  0.1.9
Endpoint:     http://127.0.0.1:60606/mcp
Documents:    3,260
Status:       Up to date (watching)

JSON output (for scripting):

$ linkly search "contract" --json | jq '.results[0].title'

LAN search (access documents on other devices):

$ linkly search "report" --endpoint http://192.168.1.100:60606/mcp

Self-update:

$ linkly self-update

Installation

# macOS / Linux (recommended)
curl -sSL https://updater.linkly.ai/cli/install.sh | sh

# Homebrew
brew tap LinklyAI/tap && brew install linkly

# Cargo
cargo install linkly-ai-cli

# Windows (PowerShell)
irm https://updater.linkly.ai/cli/install.ps1 | iex

After installation, make sure Linkly AI Desktop is running. The CLI automatically discovers the desktop app via the ~/.linkly/port file. Zero configuration.


Built by the Linkly AI team. The CLI is open source on GitHub.