setup

package
v1.10.3 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: MIT Imports: 8 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

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.

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.

type Result

type Result struct {
	Agent       string
	Destination string
	Files       int
}

Result holds the outcome of an installation.

func Install

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

Install installs the plugin for the given agent.

Jump to

Keyboard shortcuts

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