Command Line Interface (CLI)

An overview of the Guru CLI — what it is, why it pairs well with AI agents, and what your agent can do with access to your knowledge base.

The Guru CLI

The Guru CLI is a recommended way to give an AI agent access to your Guru knowledge base. It's a command-line tool — built for Claude Code, Cursor, and any other coding assistant — that lets your agent search, read, and (with your permission) write to Guru through structured commands, with safety controls and full audit logging built in.

Why use the CLI with an agent

The CLI is purpose-built for agent workflows:

  • Predictable, structured output. Every command returns JSON. No scraping, no parsing unstructured text, no guessing what the shape of a response will be.
  • Lower token usage. MCP servers inject tool definitions into your agent's context on every turn, which can eat up significant context as the number of tools grows. The CLI exposes its capabilities on demand instead — leaving more room for your agent to actually work, and lowering your token costs.
  • Configurable write levels. Decide exactly what operations your agent can perform — read-only, read-and-comment, full authoring, or full access. Start conservative and loosen up as you build trust.
  • Complete audit logging. Every mutation attempt — allowed or blocked — is recorded when configured. You always know what your agent did.
  • Portable across agents. Same setup, same commands, whether you're using Claude Code, Cursor, etc. Your workflows and docs travel with you.

What your agent can do with it

  • Answer questions from your knowledge base. Pull trusted, verified information from Guru instead of leaning on training data or guesswork.
  • Create and maintain documentation. Draft cards, verify content, add comments when information changes, or tag cards for reorganization — all with your safety rails in place.
  • Automate content operations. Drive bulk updates, imports, migrations, and reports with a clear audit trail.
  • Keep your knowledge base current. Give your agent a standing instruction to flag outdated cards, propose updates, or suggest missing documentation when it spots gaps.

Who this is for

  • Developers and teams pointing an AI coding agent (Claude Code, Cursor, Copilot) at your Guru knowledge base
  • Admins setting up an AI workflow or automation system that needs knowledge-base access
  • Ops and platform folks building agent-driven content pipelines

You can also use the CLI directly from the terminal if you want — it's a fully-featured API client on its own — but pairing it with an agent is where it really earns its keep.

Getting started

See Using the Guru CLI with an AI agent for an overview of what setup looks like and the decisions you'll make along the way. Installation instructions, configuration details, and the complete command reference live on the npm package page — that's the source of truth for how to use the CLI and we keep it up to date with every release.