sigilum-opencode-setup
v1.0.0
Published
One-shot setup: registers the sigilum MCP in opencode (~/.config/opencode/opencode.json) with your token. Installs opencode if missing. Idempotent — re-running only refreshes the token.
Maintainers
Readme
sigilum-opencode-setup
One-shot setup that connects the sigilum MCP to
opencode. It writes the MCP entry into
~/.config/opencode/opencode.json for you — no hand-editing JSON.
SIGILUM_TOKEN=viz_your_token npx -y sigilum-opencode-setupGet your viz_… token from the web app → Sigils → ⚙ Connect agent →
Generate token (shown once). The "Connect agent" panel also shows this exact command with your
token already filled in.
What it does (Linux)
- Checks your token (from
SIGILUM_TOKEN— legacyVISUALIZER_TOKENalso works — or--token viz_…). - Checks opencode is installed. If not, it asks whether to install it; on yes it runs
npm install -g opencode-ai, falling back to the official installer (curl -fsSL https://opencode.ai/install | bash) if that fails. On no, it stops. - Idempotently adds the MCP under
mcp.sigilumin~/.config/opencode/opencode.json:- creates the file / the
mcpobject / the entry when missing; - if the entry already exists, only the token is refreshed — your
command,enabledflag and any other fields stay exactly as they are.
- creates the file / the
The token is never printed. An existing opencode.json that isn't valid JSON is left untouched
(the tool refuses to overwrite it).
The entry it writes:
{
"mcp": {
"sigilum": {
"type": "local",
"command": ["npx", "-y", "sigilum-mcp@latest"],
"enabled": true,
"environment": { "SIGILUM_TOKEN": "viz_your_token" }
}
}
}Options & environment
SIGILUM_TOKEN(env) or--token viz_…/-t viz_…— your API token (required). LegacyVISUALIZER_TOKENis honoured as a fallback.SIGILUM_URL(env; legacyVISUALIZER_URL) — point the MCP at another deployment (e.g.http://127.0.0.1:3001for local dev). Only applied when the entry is first created.--yes/-y— auto-confirm the opencode install prompt (useful for unattended runs).--uninstall/-u— remove the MCP instead of adding it (see below). No token needed.
Remove it later
npx -y sigilum-opencode-setup --uninstallIdempotently checks ~/.config/opencode/opencode.json and removes the sigilum entry if it's
there — running it again (or when the entry was never added) is a safe no-op. Doesn't touch
opencode itself or any other MCP entries. Equivalent to deleting the sigilum block from
~/.config/opencode/opencode.json by hand.
This package only configures opencode. The MCP server itself is
sigilum-mcp,
which the entry above launches via npx.
