dalian

Repository index, quota check and MCP client for LLM work, in one binary.

Named after a doll that holds a phantom library.

LLM toolingCLIRustv0.2.1, AGPL-3.0-or-later

$ cargo install dalian

What it is

Dalian is the Black Biblioprincess, keeper of Dantalian's Archives, a doll-like human vessel containing the phantom library. Here she is a Rust CLI with several LLM-related jobs: indexing repositories, searching what was indexed, checking provider quotas, and talking to MCP servers.

dalian index [/path/to/repository]
dalian apropos [search-query]
dalian quota

Quota

dalian quota checks usage for GitHub Copilot, Cursor, Kimi, OpenAI/ChatGPT, Devin and Z.AI, or one of them with dalian quota cursor. Credentials come from environment variables such as COPILOT_API_KEY, CURSOR_COOKIE or ZAI_API_KEY.

MCP client

The mcp subcommands list servers, tools, resources and prompts, call a tool with JSON arguments, read a resource, or fetch a prompt:

dalian mcp config init
dalian mcp tools filesystem
dalian mcp call <server-name> <tool-name> [args-as-json]

Servers live in ~/.config/dalian/config.toml and can use three transports:

TransportDetails
child_processlocal stdio server started from command and args
httpstreamable HTTP/SSE; a Bearer token in headers.Authorization goes to rmcp's auth_header, other headers pass through reqwest
websocketJSON-RPC over text frames, binary UTF-8 frames accepted, pings answered, close frames shut down cleanly