MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / Enable

Class Enable

atomic-cli/src/commands/agent/enable.rs:45–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43/// Install agent hooks for turn-level recording.
44#[derive(Debug, Args)]
45pub struct Enable {
46 /// Which agent to install hooks for.
47 ///
48 /// If not specified, auto-detects which agent is present in the
49 /// repository (looks for `.claude/`, `.gemini/`, etc.).
50 #[arg(long, value_name = "NAME")]
51 agent: Option<String>,
52
53 /// Force reinstall hooks even if already installed.
54 ///
55 /// Removes existing Atomic hooks before installing new ones.
56 /// Non-Atomic hooks in the agent's config are preserved.
57 #[arg(short, long)]
58 force: bool,
59
60 /// Install hooks for all detected agents.
61 ///
62 /// If multiple agents are detected (e.g., both Claude Code and
63 /// Gemini CLI are configured), install hooks for all of them.
64 #[arg(long)]
65 all: bool,
66
67 /// Install hooks globally (~/.claude/settings.json).
68 ///
69 /// Global hooks fire for every Claude Code session regardless of
70 /// project. This is the recommended way to enable Atomic tracking —
71 /// install once, works everywhere that has a `.atomic/` directory.
72 #[arg(short, long)]
73 global: bool,
74
75 /// Install hooks from an integration-supplied manifest file.
76 ///
77 /// The manifest (shipped by an integration package such as atomic-codex)
78 /// names its own target settings file and the hook commands to register,
79 /// and is merged in idempotently — preserving non-Atomic hooks. Because the
80 /// definitions live in the integration repo, updating an agent's hook
81 /// wiring never requires rebuilding `atomic`. When set, `--agent`/`--global`
82 /// are not needed; the manifest is self-describing.
83 #[arg(long, value_name = "FILE")]
84 hooks: Option<std::path::PathBuf>,
85
86 /// Install the integration package from a local checkout instead of
87 /// syncing it from Atomic storage.
88 ///
89 /// For development of integration packages (e.g. a local atomic-opencode
90 /// clone): installs exactly what the storage path would, per the
91 /// package's atomic-integration.toml, without any network access.
92 #[arg(long, value_name = "PATH")]
93 from: Option<std::path::PathBuf>,
94}
95
96impl Enable {
97 /// Create a default instance for testing.

Callers 1

Calls

no outgoing calls

Tested by 1