setup

package
v1.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package setup handles agent plugin installation.

  • OpenCode: copies embedded plugin file to ~/.config/opencode/plugins/ (patching ENGRAM_BIN to bake in the absolute binary path as a final fallback) and injects MCP registration in opencode.json using the resolved absolute binary path so child processes never require PATH resolution in headless/systemd environments.
  • Claude Code: runs `claude plugin marketplace add` + `claude plugin install`, then writes a durable MCP config to ~/.claude/mcp/engram.json using the absolute binary path so the subprocess never needs PATH resolution.
  • Gemini CLI: injects MCP registration in ~/.gemini/settings.json
  • Codex: injects MCP registration in ~/.codex/config.toml
  • Pi: installs gentle-engram/pi-mcp-adapter packages and writes Pi MCP config

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddClaudeCodeAllowlist

func AddClaudeCodeAllowlist() error

AddClaudeCodeAllowlist adds engram MCP tool names to ~/.claude/settings.json permissions.allow so Claude Code doesn't prompt for confirmation on each call. Idempotent: skips tools already present in the list.

func PostInstallSteps added in v1.17.0

func PostInstallSteps(agent string) []string

PostInstallSteps returns the human-facing "next steps" lines for an agent, or nil when the agent's post-install messaging is handled specially by the CLI (opencode's conditional TUI note, claude-code's interactive allowlist prompt).

Types

type Agent

type Agent struct {
	Name        string
	Description string
	InstallDir  string // resolved at runtime (display only for claude-code)
}

Agent represents a supported AI coding agent.

func SupportedAgents

func SupportedAgents() []Agent

SupportedAgents returns the list of agents that have plugins available. The list is derived from the registry (agentAdapters) so adding an agent there surfaces it here and in `engram setup --help` automatically.

type Result

type Result struct {
	Agent            string
	Destination      string
	Files            int
	TUIPluginEnabled bool
}

Result holds the outcome of an installation.

func Install

func Install(agentName string) (*Result, error)

Install installs the plugin for the given agent by looking it up in the registry and running its adapter (a bespoke installer or the generic driver).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL