@infolang/cursor-setup
v0.6.0
Published
Install InfoLang MCP, Cursor hooks, and rules for hosted memory
Maintainers
Readme
@infolang/cursor-setup
Install InfoLang for Cursor in one command: remote MCP, agent hooks, and rules. No IL runtime on your machine.
One-click install (MCP only)
Points the client at https://api.infolang.ai/v1/mcp/ with client-native OAuth (no hand-edited JSON). For hooks, rules, and the usage HUD, use the CLI below.
Quick start (full Cursor setup)
npx @infolang/cursor-setupOpens browser login (OAuth), stores session + a backup API key in ~/.config/infolang/session.json, and points Cursor at a local MCP proxy on http://127.0.0.1:17342/mcp/ (forwards to https://api.infolang.ai/v1/mcp/).
If OAuth refresh later fails, the proxy automatically uses the backup il_live_* key.
On macOS, setup also installs a LaunchAgent (ai.infolang.mcp-proxy) so the proxy stays up across reboots.
npx @infolang/cursor-setup proxy status # health check
npx @infolang/cursor-setup proxy install # re-install LaunchAgent onlyPaste-key mode (skip OAuth; write Bearer into mcp.json):
npx @infolang/cursor-setup --key il_live_YOUR_KEYInstalls globally under ~/.cursor/:
| Artifact | Path |
|----------|------|
| MCP server infolang (tools + usage side panel) | ~/.cursor/mcp.json |
| Local token proxy (OAuth) | http://127.0.0.1:17342/mcp/ |
| Usage stats (tokens saved, queries) | ~/.config/infolang/mcp-usage-stats.json |
| Prompt hooks (retrieve + memorize) | ~/.cursor/hooks.json |
| Rules | ~/.cursor/rules/infolang-memory.mdc, infolang-output-brevity.mdc |
InfoLang Usage button (Tools & MCP)
Click InfoLang Usage under Settings → Tools & MCP → infolang to reopen the floating overlay (top-right HUD). Same as infolang_open_overlay or cursor-setup overlay.
Requires OAuth session (npx @infolang/cursor-setup once). Close the HUD with × or Esc.
Setup also launches the floating overlay automatically (top-right HUD):
- InfoLang Usage button in Tools & MCP reopens it after close
- Frosted glass card — Saved (tokens + % less input;
$in tooltip only) · Used · Left + query progress - Polls
http://127.0.0.1:17342/usageevery 30s - Token savings are this device · this UTC month; Used/Left prefer account D1 ledger when available
- Draggable; stays above the editor
- Close with the × button or Esc — relaunch with
cursor-setup overlay
# Restart overlay only (requires OAuth session from setup)
npx @infolang/cursor-setup overlay
# Close overlay
npx @infolang/cursor-setup overlay stop
# Or launch the HUD package directly
npx -y @infolang/overlay
# First-time: sign in once (creates ~/.config/infolang/session.json)
npx @infolang/cursor-setupHUD lives in @infolang/overlay (Electron). Headline is tokens saved and
measured % less input (tokens_saved / baseline_tokens). Dollar estimate stays
in the tooltip only (API list price for the last model on InfoLang’s LLM proxy —
Fable 5, Opus, Sonnet, GPT-5.x, Grok 4.5, etc.). Fallback rate: $3 / 1M input.
Override with IL_TOKEN_PRICE_PER_MTOK or token_price_per_mtok / model in
~/.config/infolang/il_config.json.
Team / repo setup
cd your-repo
npx @infolang/cursor-setup --projectWrites the same files under ./.cursor/ so you can commit hooks + rules for the team. Session secrets stay in ~/.config/infolang/.
Flags
| Flag | Effect |
|------|--------|
| (default) | Browser OAuth + local proxy + backup API key |
| --oauth | Same as default (compat alias) |
| --key <il_live_…> | Skip OAuth; paste key into mcp.json |
| --url <url> | Dedicated MCP endpoint (key mode / enterprise) |
| --project | Also install into ./.cursor/ |
| --global-only | Only ~/.cursor/ (default) |
| --no-hooks | Skip hooks.json |
| --no-rules | Skip .mdc rules |
| --no-overlay | Skip launching the usage HUD (OAuth) |
| --overlay / overlay | Launch or restart the usage HUD only |
| --dry-run | Print sample JSON; no writes |
| --no-proxy-service | OAuth only: skip macOS LaunchAgent (one-shot background process) |
| workspace link\|sync\|watch\|status\|unlink | Local Obsidian vault / folder sync (see below) |
Workspace sync (local Obsidian vault / markdown folder)
cursor-setup workspace <verb> syncs a local Obsidian vault (or any
markdown folder) into hosted InfoLang memory via manifest-diff sync —
only changed files/chunks are re-sent. Thin wrapper over
@infolang/setup-core/lib/{sync,vault-parse,vault-ignore,vault-link,workspace-cli}.mjs.
cursor-setup workspace link ~/Notes --include "Projects/**" --include "Areas/**"
cursor-setup workspace sync # first sync always previews (dry-run)
cursor-setup workspace sync --confirm # actually sends
cursor-setup workspace watch # sync on file change
cursor-setup workspace status
cursor-setup workspace unlink <name>Privacy, non-negotiable: workspace link requires explicit
--include <glob> (repeatable, never whole-vault by default; omit on a
TTY to pick folders interactively). .obsidian/ and every
binary/attachment are always excluded, and every sync summary reports
what was skipped and why. The first workspace sync on a fresh link is
always a dry-run (files/chunks/bytes/destination preview) until you pass
--confirm; link and the first sync print a disclosure of what
leaves the device, where it goes, and how to remove it later.
Parsing coverage: wikilinks (including multiple [[links]] inside
one frontmatter field), embeds (![[...]], tagged distinctly from
links), YAML frontmatter → tags/metadata, .canvas (JSON Canvas, never
treated as markdown), and Dataview inline fields (key:: value).
Known limitation: production /v1/execute has been observed to
reject a batched remember op (400 unknown op); sync falls back to
bounded-concurrency individual /v1/remember calls automatically.
Namespace isolation is via the X-InfoLang-Workspace-Id header only —
RememberRequest.namespace in the body is known to be ignored by the
managed edge. See @infolang/setup-core/lib/vault-transport.mjs.
Pin an InfoLang workspace
Accounts can own multiple workspaces (memory banks). Pin one per repo/Cursor project:
- Copy the UUID from Console → Workspaces (copy icon).
- Mint a key that allowlists it: API keys.
- Set in the project:
// il_config.json
{ "workspace": "YOUR-WORKSPACE-UUID" }Or export INFOLANG_WORKSPACE=YOUR-WORKSPACE-UUID, or add MCP header
X-InfoLang-Workspace-Id. Names can collide; always pin by ID.
With --key mode you can also put the header in mcp.json next to Authorization.
After install
- Restart Cursor
- Settings → Models → Override Base URL — e.g.
https://api.infolang.ai/v1 - Settings → Hooks — confirm
sessionStartandstopentries - Do not add provider API keys in Cursor — the LLM proxy uses your console vault keys.
- Pin a workspace (above) if the account has more than one.
See docs/CURSOR_SETUP.md and Workspaces.
Local dev
cd packages/setup-core
npm install
npm test
cd ../overlay
npm install
npm run build
npm test
cd ../cursor-setup
npm install
npm test
node bin/cursor-setup.mjs --dry-run --key il_live_test123
npm link && cursor-setup --help
node bin/cursor-setup.mjs overlay # launch HUD (OAuth session required)cursor-setup depends on @infolang/setup-core via file:../setup-core in the
services monorepo (scripts/publish-npm-packages.sh rewrites to ^semver for npm).
Publish
Publish @infolang/overlay and @infolang/setup-core first (core builds dist/
gateway bundles via prepare), then this package. Prefer the ordered helper
(rewrites file: → ^semver for the tarball only, restores afterward):
# from services repo root
scripts/publish-npm-packages.sh
# or:
scripts/publish-npm-packages.sh cursor-setupSee also docs/CURSOR_SETUP.md, CLAUDE_SETUP.md, MCP_SETUP.md.
