All docs

CLI Connect

The fastest way to connect AI clients like Claude Code, Cursor, and Codex to your m-notes instance. Install the mnotes CLI, log in once, and mnotes connect auto-configures your AI client.

Prerequisites

Install the mnotes CLI globally with npm. Node.js 20 or newer is required.

bash
npm install -g @frameworkby/mnotes

Verify the install with mnotes --version. If the command is not found, ensure your global npm bin directory is on your PATH.

Authenticate

Sign in once to associate the CLI with your m-notes account. The command opens your browser, completes OAuth, and stores credentials securely on your machine.

bash
mnotes login

You can also pass --url to point at a self-hosted instance. See the API Keys guide if you prefer non-interactive authentication via MNOTES_API_KEY.

Connect your AI client

Run the connect wizard from your project root. It detects which AI clients you have installed and writes the right config files for each one — Claude Code, Cursor, Codex, OpenClaw, and more. No manual JSON editing required.

bash
mnotes connect

The wizard prompts you to pick a workspace and confirms the targets to configure. After it finishes, restart your AI client — m-notes tools will appear automatically.

Manage workspaces

Each project usually has its own workspace. List the ones available to your account:

bash
mnotes workspace list

Switch the active workspace for the current shell:

bash
mnotes workspace select <workspace-id>

See the Workspaces guide for more on scoping notes, tags, and templates.

Verify

Confirm your CLI can reach your instance and read from the active workspace:

bash
mnotes note search "test"

If you get results, you're connected. If not, re-run mnotes login or check that mnotes workspace list shows the expected workspaces.

For full command reference, see the CLI Reference. For deeper agent integration patterns, see Agent Connect.