Skip to main content

Module installer

Module installer 

Source
Expand description

Installer / uninstaller for AgentSec.

Patches ~/.claude.json (MCP entry) and ~/.claude/settings.json (hooks). All public functions accept Paths so tests can redirect paths via the standard env-override mechanism.

§Dry-run default

Both install and uninstall accept a plan with an apply: bool field. When apply is false (the default) the functions compute what would change and return a report, but no file is written and no backup is created. Real writes only happen when apply is true.

Structs§

InstallPlan
Parameters for an install operation.
InstallReport
Report returned by install or uninstall.
MutationChange
A single file-level mutation.
UninstallPlan
Parameters for an uninstall operation.

Enums§

ChangeKind
Kind of change produced by an install/uninstall operation.
InstallScope
Scope for the MCP entry and hook install.

Functions§

install
Install AgentSec by patching ~/.claude.json and optionally ~/.claude/settings.json.
uninstall
Uninstall AgentSec by removing entries from ~/.claude.json and ~/.claude/settings.json.