elemenote-cli
v0.3.0
Published
CLI to set up Elemenote in an existing project.
Maintainers
Readme
elemenote-cli
CLI to set up Elemenote in an existing project.
npx elemenote-cli@latest initAlso works with pnpm dlx elemenote-cli@latest init and bunx elemenote-cli@latest init.
After install, the local bin is elemenote:
elemenote init
elemenote init --helpWhat it does
Interactive wizard (each prompt has a matching flag):
- CLI language (
en/pt) - Setup: Next.js, React, TanStack Start, or Script tag
- Optional MCP configuration for Cursor, Claude Code, or VS Code
- Optional Elemenote skills under
.agents/skills/elemenote/
The CLI installs the right package and prints a paste-ready snippet for your setup. It does not edit your layout files. For Next.js, the first snippet wraps next.config with withElemenote (host ids; the extension is the editor). Mounting <Elemenote /> is optional.
Non-interactive
npx elemenote-cli@latest init --defaults
npx elemenote-cli@latest init --setup react --mcp-host vscode,claude --skills --yes--defaults installs packages and skills. It does not write MCP config unless you pass --mcp-host. Using --mcp without --mcp-host fails (no editor is assumed).
| Flag | Description |
|------|-------------|
| --lang en\|pt | CLI language |
| --setup next\|react\|tanstack\|script | Install target |
| --mcp / --no-mcp | Write MCP configuration |
| --mcp-host <hosts> | Editors: cursor, claude, vscode (aliases: both, all). Required when MCP is on |
| --skills / --no-skills | Elemenote skills |
| -y, --yes | Skip confirmation (and remaining prompts) |
| -d, --defaults | Skip wizard |
| -f, --force | Overwrite existing MCP entry and skills |
| -c, --cwd <path> | Working directory |
MCP editors
| Editor | Project file |
|--------|----------------|
| Cursor | .cursor/mcp.json |
| Claude Code | .mcp.json |
| VS Code | .vscode/mcp.json |
Run init in the app that mounts Elemenote (your Next.js site, not the elemenote library repo). That writes .cursor/mcp.json next to your app with cwd and env.ELEMENOTE_AGENT_WORKSPACE set to ${workspaceFolder} so Run agent opens in your project.
Bridge settings (ELEMENOTE_MCP_BRIDGE_PORT, ELEMENOTE_MCP_BRIDGE_TOKEN) belong in the project .env / .env.local — elemenote-mcp loads them at boot. Cursor does not read .env into mcp.json; keep that file minimal.
Other editors (global only): Claude Desktop, Windsurf, Codex. See https://elemenote.io/docs/mcp
Docs
https://elemenote.io/docs
License
MIT
