Skip to main content
The context CLI is the fastest setup for AI coding agents in the terminal. It authenticates with an API key or a browser sign-in, and works as a Claude Code skill — no MCP configuration required. For web and desktop apps, see MCP Quick Start.

Prerequisites

  • A Moxn account (moxn.dev)
  • Node.js 18+ installed
  • An API key (Settings > API Keys in the Moxn web app) — or skip it and sign in with your browser (Step 2)

Step 1: Install the CLI

This installs the context command globally.

Step 2: Authenticate

Two options — an API key or a browser sign-in. When both are configured, the API key wins. Option A: API key. The CLI reads MOXN_API_KEY from the environment. The recommended approach is a .env file in your project root:
.env
The CLI automatically loads .env files from the current directory — no global export needed. Option B: Browser sign-in (OAuth). No key to manage — sign in once per workspace and the CLI caches your credentials (refreshing them automatically):
Check how the CLI is currently authenticating with context whoami, and sign out with context logout. Sign-in credentials are shared with the Moxn MCP server: if you’ve already connected the MCP for a workspace, the CLI is authenticated for it with no extra step — and a context login also signs the MCP in.
Which approach should I use? For agents running headless commands, the .env API key is the most predictable — it works in any shell without cached state. The browser sign-in is ideal for your own terminal use. If your agent inherits your shell configuration, an export MOXN_API_KEY="..." in your shell profile also works.
Verify the connection:
You should see a JSON response with your documents.

Step 3: Install the Skill

The skill installer copies a SKILL.md file into your project (or home directory) so your AI coding agent automatically knows how to use the CLI. Project-local (recommended — scoped to one repo):
This creates .claude/skills/context/SKILL.md in your current directory. Global (available in all projects):
This creates the skill in ~/.claude/skills/context/SKILL.md.
The skill file includes a checksum so future install-skill runs can safely update it. If you’ve manually edited the file, use --force to overwrite.

Try It Out

Once the skill is installed, your AI agent can use it immediately. Try asking:
“Search my docs for onboarding content”
“Create a new document at /engineering/api-reference with an overview section”
“Read the auth guide from Moxn”
The agent will call context commands and get JSON responses — no MCP server needed.

Updating

When a new version is published, update the CLI and re-run the skill installer:
The installer only overwrites the skill file if it hasn’t been manually modified (or if you pass --force).