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

Method run

atomic-cli/src/commands/agent/status.rs:262–495  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

260
261impl Command for AgentStatus {
262 fn run(&self) -> CliResult<()> {
263 let repo_root = find_repository_root()?;
264
265 let registry = AgentRegistry::with_defaults();
266
267 if self.json {
268 println!(
269 "{}",
270 serde_json::to_string(&self.to_json(&repo_root, &registry))
271 .expect("status is plain data and always serializes")
272 );
273 return Ok(());
274 }
275
276 // Installed agents
277
278 println!("Agent Integration Status");
279 println!("=======================");
280 println!();
281
282 // Identity — the delegated identity hooks sign as, machine-global,
283 // shown even when no hooks are installed yet because the selection
284 // is exactly what a future `atomic agent enable` will record as.
285 match super::identity::resolve_effective_agent_identity() {
286 Some((name, source)) => {
287 println!(" Identity: {name} ({source})");
288 }
289 None => {
290 println!(" Identity: none — hooks record as the plus-tag of the default identity");
291 }
292 }
293 println!();
294
295 let installed = registry.installed(&repo_root);
296 let detected = registry.detect(&repo_root);
297
298 if installed.is_empty() {
299 println!(" Hooks: not installed");
300 println!();
301 if !detected.is_empty() {
302 println!(
303 " Detected agent{}: {}",
304 if detected.len() == 1 { "" } else { "s" },
305 detected.join(", "),
306 );
307 println!();
308 println!(" Run 'atomic agent enable' to start recording agent turns.");
309 } else {
310 println!(" No agents detected in this repository.");
311 println!(
312 " Create a .claude/ directory (or similar) and run 'atomic agent enable'."
313 );
314 }
315 println!();
316 return Ok(());
317 }
318
319 // Show installed agents

Callers

nothing calls this directly

Calls 13

find_repository_rootFunction · 0.85
print_hook_healthFunction · 0.85
installedMethod · 0.80
getMethod · 0.65
detectMethod · 0.45
is_emptyMethod · 0.45
containsMethod · 0.45
listMethod · 0.45
collectMethod · 0.45
iterMethod · 0.45
is_endedMethod · 0.45

Tested by

no test coverage detected