Introduction to Linkly AI CLI
Linkly AI CLI is a command-line tool that connects to Linkly AI Desktop’s MCP service, allowing you to search, browse, and read local documents from the terminal. It also serves as a bridge between AI Agents (such as Claude Desktop, Cursor) and Linkly AI.Terminal Search
Search your documents directly from the command line — ideal for developers
and power users
MCP Bridge
Run in stdio MCP mode, enabling Claude Desktop, Cursor, and other AI tools
to call Linkly AI
Installation
- macOS / Linux
- Windows
Run in your terminal:
The CLI requires Linkly AI Desktop to be running. The CLI automatically
discovers and connects to the desktop app’s MCP service via the
~/.linkly/port file.Usage
The CLI follows a search → outline → read progressive workflow: first search to find target documents, then view the outline to understand the structure, and finally read the specific content.Check Connection Status
Search Documents
View Document Outline
DOC_ID is obtained from search results. You can view multiple documents at once:
Read Document Content
--offset to read progressively:
MCP Mode
- macOS / Linux
- Windows
Edit
~/.config/Claude/claude_desktop_config.json:- Name:
linkly-ai - Command:
linkly mcp
Update CLI
Parameter Reference
Global Options
| Option | Description |
|---|---|
--endpoint <URL> | Specify the MCP endpoint (auto-discovered from ~/.linkly/port by default) |
--json | Output in JSON format (suitable for scripting and automation) |
-V, --version | Display CLI version number |
-h, --help | Display help information |
search Parameters
| Parameter | Description | Default |
|---|---|---|
<QUERY> | Search keywords or phrase (required) | — |
--limit <N> | Maximum number of results | 20 |
--type <TYPES> | Filter by document type (comma-separated) | All |
outline Parameters
| Parameter | Description | Default |
|---|---|---|
<ID...> | Document ID (required, supports multiple) | — |
read Parameters
| Parameter | Description | Default |
|---|---|---|
<ID> | Document ID (required) | — |
--offset <N> | Starting line number (from 1) | 1 |
--limit <N> | Number of lines to read (max 500) | 200 |

