Getting started

CLI installation

For a developer joining a project that already has a server — an Enterprise Server or the hosted plan. About fifteen minutes from install to the first context card.

Before you begin

  • Node.js 22 or newer on your PATH if you use the install script; the Homebrew formula brings its own. Use your team's managed runtime, not a temporary nvm shell: the persistent sidecar pins the exact Node binary it was installed with.
  • The URL of your project's server — your Enterprise Server's origin (for example https://knwlge.company-a.com), or the hosted origin your admin gives you.
  • A Knwlge account that has been added to the project (under My Projects) — that is the only way in; Enterprise Servers sign people in through Knwlge, never on their own.
  • Your agent: Claude Code, Cursor, Codex CLI, the Codex app or GitHub Copilot CLI.

Install and sign in

  1. Install the CLI once

    macOS with Homebrew:

    shell
    brew install replient/tap/knwlge
    

    Linux or macOS without Homebrew (needs Node.js 22 or newer on your PATH):

    shell
    curl -fsSL https://raw.githubusercontent.com/Replient/knwlge-releases/main/install-cli.sh | sh
    
    shell
    knwlge --version
    

    The command is knwlge; team-context still works as an alias if you have scripts that use the old name.

  2. Sign in to the project's server

    init opens knwlge.com in your browser: sign in, pick the project, press Authorize, done. The CLI receives a one-hour token for that server and renews it by itself for 30 days; you will not be asked again. The session lives in your OS keychain.

    shell
    knwlge init --api-url https://knwlge.company-a.com
    

    If the browser cannot reach the CLI on this machine (a remote shell, say), the page shows a one-time code instead; paste it where the terminal says Paste code here if prompted. Sign out with , or from any browser under Account → Devices in the Global App.

  3. Wire your agent, in the project directory

    install writes only Knwlge's own entries — hooks, the MCP server, and for instruct-channel clients a managed rules block. It backs up what it touches and never creates files you must commit.

    shell
    cd ~/work/project-a
    knwlge install --clients codex --auto-invoke --repo-root "$PWD"
    knwlge doctor --repair --repo-root "$PWD"
    knwlge status --repo-root "$PWD"
    

    Use claude_code, cursor, codex_app or copilot_cli for the other clients, or several at once: .

  4. Run the sidecar

    Foreground for a first look — it prints its local health, hook and MCP endpoints — or as a persistent service for the current user.

    shell
    knwlge sidecar start                             # foreground
    knwlge sidecar service-install --platform darwin   # launchd; systemd on Linux
    

Verify

shell
knwlge doctor --repo-root "$PWD"

Then ask your agent something only indexed context can answer. A pass cites a Knwlge source — a file and lines, or a knowledge item — or the transcript shows a context.brief call.

Everyday commands

CommandWhat it does
What is wired, which server, the effective capture policy.
Switch organization or team when you belong to several.
Diagnose and fix client wiring.
Remove everything install added, restoring the backups.