@shivnathtathe/sutra-cli
v0.2.1
Published
Connect AI coding agents to Sutra memory
Downloads
35
Maintainers
Readme
@shivnathtathe/sutra-cli
Connect Claude Code and OpenCode to Sutra's hosted MCP server.
Install
npm install -g @shivnathtathe/sutra-cliNode.js 18 or newer is required.
Usage
sutra connect claude-code
sutra connect opencode
sutra status
sutra disconnect claude-code
sutra disconnect opencodeConnect prompts for the API key with masked input. For automation, pass --api-key or set SUTRA_API_KEY; command-line flags remain supported for backwards compatibility.
The CLI merges Sutra into existing JSON or JSONC configuration files and writes updates atomically. It never prints API keys.
If another MCP server already uses the name sutra, the CLI stops without changing the config. Disconnect unregisters the bundled OpenCode instructions but leaves sutra.md on disk to avoid deleting a pre-existing or customized file.
Claude Code is configured at ~/.claude.json using its user-scoped mcpServers configuration. The CLI installs bundled instructions at ~/.claude/sutra.md and adds a marker-owned @sutra.md import to ~/.claude/CLAUDE.md. It never replaces that shared file, and disconnect removes only its own import block. The instruction file remains on disk so a pre-existing or customized file is never deleted.
OpenCode is configured at ~/.config/opencode/opencode.json; its bundled instructions are installed at ~/.config/opencode/sutra.md.
