Prerequisites
- A Moxn account (moxn.dev)
- Node.js 18+ installed
- An API key (generate one in Settings > API Keys in the Moxn web app)
Step 1: Install the CLI
knowledge-base command globally.
Step 2: Set Your API Key
The CLI readsMOXN_API_KEY from the environment. The recommended approach is a .env file in your project root:
.env
.env files from the current directory — no global export needed.
Which approach should I use? If your agent inherits your shell configuration when it spawns processes (e.g., sources
~/.zshrc), you can put export MOXN_API_KEY="..." in your shell profile instead. If your agent runs each command in a fresh shell without your profile, use the .env file — the CLI picks it up regardless of shell config.Step 3: Install the Skill
The skill installer copies aSKILL.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):
.claude/skills/knowledge-base/SKILL.md in your current directory.
Global (available in all projects):
~/.claude/skills/knowledge-base/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 knowledge base for onboarding docs”
“Create a new document at /engineering/api-reference with an overview section”
“Read the auth guide from Moxn”The agent will call
knowledge-base 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:--force).