@infolang/claude-setup
v0.2.0
Published
Install InfoLang MCP, Claude Code hooks, and CLAUDE.md rules for hosted memory
Maintainers
Readme
@infolang/claude-setup
Install InfoLang for Claude Code in one command: remote MCP, settings hooks, and a compact CLAUDE.md block. No IL runtime on your machine.
Quick start
npx @infolang/claude-setupOpens browser login (OAuth, ?client=claude), stores session + a backup API key in ~/.config/infolang/session.json, and points Claude at a local stdio gateway → MCP proxy on :17342.
User MCP: prefers claude mcp add-json infolang … --scope user (spawn argv, no shell). Falls back to merging ~/.claude.json when the claude binary is not on PATH.
Paste-key mode:
npx @infolang/claude-setup --key il_live_YOUR_KEYWhat gets installed
| Artifact | Path |
|----------|------|
| User MCP infolang | claude mcp add-json → ~/.claude.json (fallback: direct merge) |
| Hooks (SessionStart + Stop) | ~/.claude/settings.json → node <abs>/claude-hook.mjs |
| Rules (managed block) | ~/.claude/CLAUDE.md (<!-- infolang:begin/end -->) |
| Local proxy (OAuth) | http://127.0.0.1:17342/mcp/ |
Team / repo (--project)
cd your-repo
npx @infolang/claude-setup --project| Artifact | Path |
|----------|------|
| Project MCP | repo-root .mcp.json |
| Pre-approve server | .claude/settings.json → enabledMcpjsonServers: ["infolang"] |
| Project hooks | .claude/settings.json |
| Project rules | repo-root CLAUDE.md |
Key mode + --project: .mcp.json uses Bearer ${INFOLANG_API_KEY} — never a literal il_live_ secret (file is commit-friendly). Export the var before starting Claude Code. If unset, Claude fails to parse the server config (loud, intentional).
OAuth + --project: .mcp.json uses durable node <gateway> stdio from ~/.config/infolang/gateway/<version>/.
Flags
| Flag | Effect |
|------|--------|
| (default) | Browser OAuth + local proxy + backup API key |
| --key <il_live_…> | Skip OAuth |
| --project | Also write .mcp.json + project settings / CLAUDE.md |
| --no-hooks | Skip settings hooks |
| --no-rules | Skip CLAUDE.md block |
| --no-overlay | Skip usage HUD |
| --dry-run | Print plan; no writes |
| proxy status\|install\|uninstall | Local MCP proxy service |
| overlay / overlay stop | Usage HUD |
| workspace link\|sync\|watch\|status\|unlink | Local Obsidian vault / folder sync (see below) |
Workspace sync (local Obsidian vault / markdown folder)
claude-setup workspace <verb> syncs a local Obsidian vault (or any
markdown folder) into hosted InfoLang memory, using manifest-diff sync so
only changed content is re-sent. Implemented in
@infolang/setup-core/lib/{sync,vault-parse,vault-ignore,vault-link,workspace-cli}.mjs
— this CLI is a thin wrapper.
claude-setup workspace link ~/Notes --include "Projects/**" --include "Areas/**"
claude-setup workspace sync # first sync always previews (dry-run)
claude-setup workspace sync --confirm # actually sends
claude-setup workspace watch # sync on file change
claude-setup workspace status
claude-setup workspace unlink <name>Privacy, non-negotiable:
workspace linkrequires explicit--include <glob>(repeatable) — it never defaults to syncing the whole vault. Omit--includeon an interactive terminal to pick folders instead..obsidian/and every binary/attachment are always excluded, and the sync summary always states what was skipped and why — never a silent drop.- The first
workspace syncon a fresh link is always a dry-run: it prints exactly which files/chunks would be sent, byte totals, and the destination, then requires--confirm(or an interactive yes) to actually push.--dry-runforces the same preview on any later sync. linkand the firstsyncprint a disclosure block: what leaves the device, where it goes (api.infolang.ai, the workspace namespace), and how to remove data later.
Parsing: wikilinks [[Note]] (incl. multiple links in one
frontmatter field — a known naive-parser failure mode), embeds
![[...]] (tagged distinctly from links, never double-ingested),
YAML frontmatter (tags become memory-record metadata, not body text),
.canvas files (parsed as JSON Canvas, never as markdown), and
Dataview inline fields (key:: value).
Known limitation: the hosted /v1/execute batch endpoint has been
observed in production to reject a batched remember op with 400
unknown op; sync automatically falls back to individual /v1/remember
calls (bounded concurrency) in that case. Namespace routing is done only
via the X-InfoLang-Workspace-Id header — the RememberRequest.namespace
body field is known to be silently ignored by the managed edge. See
@infolang/setup-core/lib/vault-transport.mjs for the pinned contract.
Hooks design
- SessionStart — JSON
additionalContext(auto_investigate-first). Matcher omitted (= all ofstartup|resume|clear|compact). - Stop —
decision: block+additionalContext(memorize reminder). If inputstop_hook_activeis true, exit 0 cleanly (one polite block max).
After install
- Restart Claude Code
claude mcp list— confirminfolang- Ask a codebase question; first tool call should be
auto_investigate
Docs
Local development
cd packages/setup-core && npm install && npm test
cd ../claude-setup && npm install && npm test
node bin/claude-setup.mjs --dry-run --key il_live_test123Depends on @infolang/setup-core via file:../setup-core in the monorepo.
Publish
Publish @infolang/overlay → @infolang/setup-core first, then this package.
scripts/publish-npm-packages.sh rewrites file: deps to ^semver for the
published tarball and restores package.json afterward:
scripts/publish-npm-packages.sh # overlay → setup-core → consumers
# or:
scripts/publish-npm-packages.sh claude-setup