Files
agent-manager/completions/_am
T
bruno 8ee3ddf3db agent-manager v0.2.0 : gestionnaire d'agents IA locaux
- CLI Rust (am) : list/install/uninstall/update/start/stop/restart/run/status/search/info/config/doctor/completion/export/import/self-update + shell interactif (Tab, historique)
- 9 methodes d'installation (npm, pip, uv, cargo, go, bun, curl, binary, git)
- catalogue de 72 agents, dependances, processus, securite (dry-run, checksums)
- sondes de version paralleles + cache (am list ~25 ms a chaud)
- installateurs one-liner : install.sh, install.ps1
2026-08-15 11:26:34 -04:00

971 lines
38 KiB
Plaintext

#compdef am
autoload -U is-at-least
_am() {
typeset -A opt_args
typeset -a _arguments_options
local ret=1
if is-at-least 5.2; then
_arguments_options=(-s -S -C)
else
_arguments_options=(-s -C)
fi
local context curcontext="$curcontext" state line
_arguments "${_arguments_options[@]}" : \
'-c+[Use an alternate configuration file]:FILE:_files' \
'--config=[Use an alternate configuration file]:FILE:_files' \
'-v[Verbose output\: show every command executed and its details]' \
'--verbose[Verbose output\: show every command executed and its details]' \
'(-v --verbose)-q[Quiet mode\: only errors are printed]' \
'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \
'-y[Answer yes to every confirmation prompt]' \
'--yes[Answer yes to every confirmation prompt]' \
'--dry-run[Simulate the action without changing anything]' \
'--json[Emit machine-readable JSON on stdout (for scripts)]' \
'--no-color[Disable ANSI colors]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
":: :_am_commands" \
"*::: :->am" \
&& ret=0
case $state in
(am)
words=($line[1] "${words[@]}")
(( CURRENT += 1 ))
curcontext="${curcontext%:*:*}:am-command-$line[1]:"
case $line[1] in
(list)
_arguments "${_arguments_options[@]}" : \
'--category=[Only show agents of this category]:CATEGORY:_default' \
'-c+[Use an alternate configuration file]:FILE:_files' \
'--config=[Use an alternate configuration file]:FILE:_files' \
'--installed-only[Only show agents that are installed (managed or external)]' \
'--all[Include hidden agents as well]' \
'-v[Verbose output\: show every command executed and its details]' \
'--verbose[Verbose output\: show every command executed and its details]' \
'(-v --verbose)-q[Quiet mode\: only errors are printed]' \
'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \
'-y[Answer yes to every confirmation prompt]' \
'--yes[Answer yes to every confirmation prompt]' \
'--dry-run[Simulate the action without changing anything]' \
'--json[Emit machine-readable JSON on stdout (for scripts)]' \
'--no-color[Disable ANSI colors]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(start)
_arguments "${_arguments_options[@]}" : \
'*--args=[Extra arguments passed to the agent (repeatable; quoted strings are split on spaces)]::ARGS:_default' \
'*--env=[Set an environment variable for the agent (repeatable)\: --env KEY=VALUE]:KEY=VALUE:_default' \
'-c+[Use an alternate configuration file]:FILE:_files' \
'--config=[Use an alternate configuration file]:FILE:_files' \
'(-f --foreground)-b[Run detached in the background; output goes to the agent log file]' \
'(-f --foreground)--background[Run detached in the background; output goes to the agent log file]' \
'-f[Run in the foreground, attached to this terminal (the default)]' \
'--foreground[Run in the foreground, attached to this terminal (the default)]' \
'--notify[Send a desktop notification once the agent has started]' \
'-v[Verbose output\: show every command executed and its details]' \
'--verbose[Verbose output\: show every command executed and its details]' \
'(-v --verbose)-q[Quiet mode\: only errors are printed]' \
'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \
'-y[Answer yes to every confirmation prompt]' \
'--yes[Answer yes to every confirmation prompt]' \
'--dry-run[Simulate the action without changing anything]' \
'--json[Emit machine-readable JSON on stdout (for scripts)]' \
'--no-color[Disable ANSI colors]' \
'-h[Print help]' \
'--help[Print help]' \
':agent -- Agent name, alias, or group\:<name>:_default' \
&& ret=0
;;
(stop)
_arguments "${_arguments_options[@]}" : \
'--timeout=[Grace period in seconds before killing (default\: from config, 5s)]:SECS:_default' \
'-c+[Use an alternate configuration file]:FILE:_files' \
'--config=[Use an alternate configuration file]:FILE:_files' \
'--force[Kill immediately instead of terminating gracefully]' \
'-v[Verbose output\: show every command executed and its details]' \
'--verbose[Verbose output\: show every command executed and its details]' \
'(-v --verbose)-q[Quiet mode\: only errors are printed]' \
'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \
'-y[Answer yes to every confirmation prompt]' \
'--yes[Answer yes to every confirmation prompt]' \
'--dry-run[Simulate the action without changing anything]' \
'--json[Emit machine-readable JSON on stdout (for scripts)]' \
'--no-color[Disable ANSI colors]' \
'-h[Print help]' \
'--help[Print help]' \
':agent -- Agent name, alias, or group\:<name>:_default' \
&& ret=0
;;
(restart)
_arguments "${_arguments_options[@]}" : \
'*--args=[Extra arguments passed to the agent (repeatable; quoted strings are split on spaces)]::ARGS:_default' \
'*--env=[Set an environment variable for the agent (repeatable)\: --env KEY=VALUE]:KEY=VALUE:_default' \
'--timeout=[Grace period in seconds before killing (default\: from config, 5s)]:SECS:_default' \
'-c+[Use an alternate configuration file]:FILE:_files' \
'--config=[Use an alternate configuration file]:FILE:_files' \
'(-f --foreground)-b[Run detached in the background; output goes to the agent log file]' \
'(-f --foreground)--background[Run detached in the background; output goes to the agent log file]' \
'-f[Run in the foreground, attached to this terminal (the default)]' \
'--foreground[Run in the foreground, attached to this terminal (the default)]' \
'--notify[Send a desktop notification once the agent has started]' \
'--force[Kill immediately instead of terminating gracefully]' \
'-v[Verbose output\: show every command executed and its details]' \
'--verbose[Verbose output\: show every command executed and its details]' \
'(-v --verbose)-q[Quiet mode\: only errors are printed]' \
'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \
'-y[Answer yes to every confirmation prompt]' \
'--yes[Answer yes to every confirmation prompt]' \
'--dry-run[Simulate the action without changing anything]' \
'--json[Emit machine-readable JSON on stdout (for scripts)]' \
'--no-color[Disable ANSI colors]' \
'-h[Print help]' \
'--help[Print help]' \
':agent -- Agent name, alias, or group\:<name>:_default' \
&& ret=0
;;
(status)
_arguments "${_arguments_options[@]}" : \
'-c+[Use an alternate configuration file]:FILE:_files' \
'--config=[Use an alternate configuration file]:FILE:_files' \
'-v[Verbose output\: show every command executed and its details]' \
'--verbose[Verbose output\: show every command executed and its details]' \
'(-v --verbose)-q[Quiet mode\: only errors are printed]' \
'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \
'-y[Answer yes to every confirmation prompt]' \
'--yes[Answer yes to every confirmation prompt]' \
'--dry-run[Simulate the action without changing anything]' \
'--json[Emit machine-readable JSON on stdout (for scripts)]' \
'--no-color[Disable ANSI colors]' \
'-h[Print help]' \
'--help[Print help]' \
'::agent -- Agent name or alias (omit to show all installed agents):_default' \
&& ret=0
;;
(install)
_arguments "${_arguments_options[@]}" : \
'--method=[Select the install method (index, or type\: npm, pip, uv, cargo, go, bun, curl, binary, git)]:METHOD:_default' \
'-c+[Use an alternate configuration file]:FILE:_files' \
'--config=[Use an alternate configuration file]:FILE:_files' \
'--force[Reinstall even if already installed]' \
'-v[Verbose output\: show every command executed and its details]' \
'--verbose[Verbose output\: show every command executed and its details]' \
'(-v --verbose)-q[Quiet mode\: only errors are printed]' \
'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \
'-y[Answer yes to every confirmation prompt]' \
'--yes[Answer yes to every confirmation prompt]' \
'--dry-run[Simulate the action without changing anything]' \
'--json[Emit machine-readable JSON on stdout (for scripts)]' \
'--no-color[Disable ANSI colors]' \
'-h[Print help]' \
'--help[Print help]' \
':agent -- Agent name or alias:_default' \
&& ret=0
;;
(uninstall)
_arguments "${_arguments_options[@]}" : \
'-c+[Use an alternate configuration file]:FILE:_files' \
'--config=[Use an alternate configuration file]:FILE:_files' \
'--purge[Also remove logs and the agent entry from the user config file]' \
'-v[Verbose output\: show every command executed and its details]' \
'--verbose[Verbose output\: show every command executed and its details]' \
'(-v --verbose)-q[Quiet mode\: only errors are printed]' \
'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \
'-y[Answer yes to every confirmation prompt]' \
'--yes[Answer yes to every confirmation prompt]' \
'--dry-run[Simulate the action without changing anything]' \
'--json[Emit machine-readable JSON on stdout (for scripts)]' \
'--no-color[Disable ANSI colors]' \
'-h[Print help]' \
'--help[Print help]' \
':agent -- Agent name or alias:_default' \
&& ret=0
;;
(update)
_arguments "${_arguments_options[@]}" : \
'-c+[Use an alternate configuration file]:FILE:_files' \
'--config=[Use an alternate configuration file]:FILE:_files' \
'--all[Update every installed managed agent]' \
'-v[Verbose output\: show every command executed and its details]' \
'--verbose[Verbose output\: show every command executed and its details]' \
'(-v --verbose)-q[Quiet mode\: only errors are printed]' \
'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \
'-y[Answer yes to every confirmation prompt]' \
'--yes[Answer yes to every confirmation prompt]' \
'--dry-run[Simulate the action without changing anything]' \
'--json[Emit machine-readable JSON on stdout (for scripts)]' \
'--no-color[Disable ANSI colors]' \
'-h[Print help]' \
'--help[Print help]' \
'::agent -- Agent name or alias (required unless --all):_default' \
&& ret=0
;;
(search)
_arguments "${_arguments_options[@]}" : \
'--category=[Restrict to this category]:CATEGORY:_default' \
'-c+[Use an alternate configuration file]:FILE:_files' \
'--config=[Use an alternate configuration file]:FILE:_files' \
'-v[Verbose output\: show every command executed and its details]' \
'--verbose[Verbose output\: show every command executed and its details]' \
'(-v --verbose)-q[Quiet mode\: only errors are printed]' \
'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \
'-y[Answer yes to every confirmation prompt]' \
'--yes[Answer yes to every confirmation prompt]' \
'--dry-run[Simulate the action without changing anything]' \
'--json[Emit machine-readable JSON on stdout (for scripts)]' \
'--no-color[Disable ANSI colors]' \
'-h[Print help]' \
'--help[Print help]' \
':keyword -- Keyword to search for (case-insensitive substring):_default' \
&& ret=0
;;
(info)
_arguments "${_arguments_options[@]}" : \
'-c+[Use an alternate configuration file]:FILE:_files' \
'--config=[Use an alternate configuration file]:FILE:_files' \
'-v[Verbose output\: show every command executed and its details]' \
'--verbose[Verbose output\: show every command executed and its details]' \
'(-v --verbose)-q[Quiet mode\: only errors are printed]' \
'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \
'-y[Answer yes to every confirmation prompt]' \
'--yes[Answer yes to every confirmation prompt]' \
'--dry-run[Simulate the action without changing anything]' \
'--json[Emit machine-readable JSON on stdout (for scripts)]' \
'--no-color[Disable ANSI colors]' \
'-h[Print help]' \
'--help[Print help]' \
':agent -- Agent name or alias:_default' \
&& ret=0
;;
(config)
_arguments "${_arguments_options[@]}" : \
'-c+[Use an alternate configuration file]:FILE:_files' \
'--config=[Use an alternate configuration file]:FILE:_files' \
'-v[Verbose output\: show every command executed and its details]' \
'--verbose[Verbose output\: show every command executed and its details]' \
'(-v --verbose)-q[Quiet mode\: only errors are printed]' \
'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \
'-y[Answer yes to every confirmation prompt]' \
'--yes[Answer yes to every confirmation prompt]' \
'--dry-run[Simulate the action without changing anything]' \
'--json[Emit machine-readable JSON on stdout (for scripts)]' \
'--no-color[Disable ANSI colors]' \
'-h[Print help]' \
'--help[Print help]' \
":: :_am__subcmd__config_commands" \
"*::: :->config" \
&& ret=0
case $state in
(config)
words=($line[1] "${words[@]}")
(( CURRENT += 1 ))
curcontext="${curcontext%:*:*}:am-config-command-$line[1]:"
case $line[1] in
(show)
_arguments "${_arguments_options[@]}" : \
'-c+[Use an alternate configuration file]:FILE:_files' \
'--config=[Use an alternate configuration file]:FILE:_files' \
'-v[Verbose output\: show every command executed and its details]' \
'--verbose[Verbose output\: show every command executed and its details]' \
'(-v --verbose)-q[Quiet mode\: only errors are printed]' \
'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \
'-y[Answer yes to every confirmation prompt]' \
'--yes[Answer yes to every confirmation prompt]' \
'--dry-run[Simulate the action without changing anything]' \
'--json[Emit machine-readable JSON on stdout (for scripts)]' \
'--no-color[Disable ANSI colors]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(path)
_arguments "${_arguments_options[@]}" : \
'-c+[Use an alternate configuration file]:FILE:_files' \
'--config=[Use an alternate configuration file]:FILE:_files' \
'-v[Verbose output\: show every command executed and its details]' \
'--verbose[Verbose output\: show every command executed and its details]' \
'(-v --verbose)-q[Quiet mode\: only errors are printed]' \
'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \
'-y[Answer yes to every confirmation prompt]' \
'--yes[Answer yes to every confirmation prompt]' \
'--dry-run[Simulate the action without changing anything]' \
'--json[Emit machine-readable JSON on stdout (for scripts)]' \
'--no-color[Disable ANSI colors]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(edit)
_arguments "${_arguments_options[@]}" : \
'-c+[Use an alternate configuration file]:FILE:_files' \
'--config=[Use an alternate configuration file]:FILE:_files' \
'-v[Verbose output\: show every command executed and its details]' \
'--verbose[Verbose output\: show every command executed and its details]' \
'(-v --verbose)-q[Quiet mode\: only errors are printed]' \
'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \
'-y[Answer yes to every confirmation prompt]' \
'--yes[Answer yes to every confirmation prompt]' \
'--dry-run[Simulate the action without changing anything]' \
'--json[Emit machine-readable JSON on stdout (for scripts)]' \
'--no-color[Disable ANSI colors]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(validate)
_arguments "${_arguments_options[@]}" : \
'-c+[Use an alternate configuration file]:FILE:_files' \
'--config=[Use an alternate configuration file]:FILE:_files' \
'-v[Verbose output\: show every command executed and its details]' \
'--verbose[Verbose output\: show every command executed and its details]' \
'(-v --verbose)-q[Quiet mode\: only errors are printed]' \
'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \
'-y[Answer yes to every confirmation prompt]' \
'--yes[Answer yes to every confirmation prompt]' \
'--dry-run[Simulate the action without changing anything]' \
'--json[Emit machine-readable JSON on stdout (for scripts)]' \
'--no-color[Disable ANSI colors]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(add)
_arguments "${_arguments_options[@]}" : \
'-c+[Use an alternate configuration file]:FILE:_files' \
'--config=[Use an alternate configuration file]:FILE:_files' \
'-v[Verbose output\: show every command executed and its details]' \
'--verbose[Verbose output\: show every command executed and its details]' \
'(-v --verbose)-q[Quiet mode\: only errors are printed]' \
'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \
'-y[Answer yes to every confirmation prompt]' \
'--yes[Answer yes to every confirmation prompt]' \
'--dry-run[Simulate the action without changing anything]' \
'--json[Emit machine-readable JSON on stdout (for scripts)]' \
'--no-color[Disable ANSI colors]' \
'-h[Print help]' \
'--help[Print help]' \
':file -- YAML (or JSON) file defining agents to include:_files' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_am__subcmd__config__subcmd__help_commands" \
"*::: :->help" \
&& ret=0
case $state in
(help)
words=($line[1] "${words[@]}")
(( CURRENT += 1 ))
curcontext="${curcontext%:*:*}:am-config-help-command-$line[1]:"
case $line[1] in
(show)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(path)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(edit)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(validate)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(add)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
esac
;;
esac
;;
esac
;;
esac
;;
(doctor)
_arguments "${_arguments_options[@]}" : \
'-c+[Use an alternate configuration file]:FILE:_files' \
'--config=[Use an alternate configuration file]:FILE:_files' \
'--fix[Attempt to repair problems (create directories, fix the state file)]' \
'-v[Verbose output\: show every command executed and its details]' \
'--verbose[Verbose output\: show every command executed and its details]' \
'(-v --verbose)-q[Quiet mode\: only errors are printed]' \
'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \
'-y[Answer yes to every confirmation prompt]' \
'--yes[Answer yes to every confirmation prompt]' \
'--dry-run[Simulate the action without changing anything]' \
'--json[Emit machine-readable JSON on stdout (for scripts)]' \
'--no-color[Disable ANSI colors]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(run)
_arguments "${_arguments_options[@]}" : \
'-c+[Use an alternate configuration file]:FILE:_files' \
'--config=[Use an alternate configuration file]:FILE:_files' \
'-v[Verbose output\: show every command executed and its details]' \
'--verbose[Verbose output\: show every command executed and its details]' \
'(-v --verbose)-q[Quiet mode\: only errors are printed]' \
'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \
'-y[Answer yes to every confirmation prompt]' \
'--yes[Answer yes to every confirmation prompt]' \
'--dry-run[Simulate the action without changing anything]' \
'--json[Emit machine-readable JSON on stdout (for scripts)]' \
'--no-color[Disable ANSI colors]' \
'-h[Print help]' \
'--help[Print help]' \
':agent -- Agent name or alias:_default' \
'*::args -- Arguments passed through to the agent command:_default' \
&& ret=0
;;
(completion)
_arguments "${_arguments_options[@]}" : \
'-c+[Use an alternate configuration file]:FILE:_files' \
'--config=[Use an alternate configuration file]:FILE:_files' \
'-v[Verbose output\: show every command executed and its details]' \
'--verbose[Verbose output\: show every command executed and its details]' \
'(-v --verbose)-q[Quiet mode\: only errors are printed]' \
'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \
'-y[Answer yes to every confirmation prompt]' \
'--yes[Answer yes to every confirmation prompt]' \
'--dry-run[Simulate the action without changing anything]' \
'--json[Emit machine-readable JSON on stdout (for scripts)]' \
'--no-color[Disable ANSI colors]' \
'-h[Print help]' \
'--help[Print help]' \
':shell -- Shell to generate completions for:(bash elvish fish powershell zsh)' \
&& ret=0
;;
(self-update)
_arguments "${_arguments_options[@]}" : \
'--to=[Download the new binary to this path instead of replacing the current one]:FILE:_files' \
'-c+[Use an alternate configuration file]:FILE:_files' \
'--config=[Use an alternate configuration file]:FILE:_files' \
'--check[Only check whether a newer version exists]' \
'-v[Verbose output\: show every command executed and its details]' \
'--verbose[Verbose output\: show every command executed and its details]' \
'(-v --verbose)-q[Quiet mode\: only errors are printed]' \
'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \
'-y[Answer yes to every confirmation prompt]' \
'--yes[Answer yes to every confirmation prompt]' \
'--dry-run[Simulate the action without changing anything]' \
'--json[Emit machine-readable JSON on stdout (for scripts)]' \
'--no-color[Disable ANSI colors]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(export)
_arguments "${_arguments_options[@]}" : \
'--output=[Output file (default\: am-export.json)]:FILE:_files' \
'-c+[Use an alternate configuration file]:FILE:_files' \
'--config=[Use an alternate configuration file]:FILE:_files' \
'-v[Verbose output\: show every command executed and its details]' \
'--verbose[Verbose output\: show every command executed and its details]' \
'(-v --verbose)-q[Quiet mode\: only errors are printed]' \
'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \
'-y[Answer yes to every confirmation prompt]' \
'--yes[Answer yes to every confirmation prompt]' \
'--dry-run[Simulate the action without changing anything]' \
'--json[Emit machine-readable JSON on stdout (for scripts)]' \
'--no-color[Disable ANSI colors]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(import)
_arguments "${_arguments_options[@]}" : \
'-c+[Use an alternate configuration file]:FILE:_files' \
'--config=[Use an alternate configuration file]:FILE:_files' \
'-v[Verbose output\: show every command executed and its details]' \
'--verbose[Verbose output\: show every command executed and its details]' \
'(-v --verbose)-q[Quiet mode\: only errors are printed]' \
'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \
'-y[Answer yes to every confirmation prompt]' \
'--yes[Answer yes to every confirmation prompt]' \
'--dry-run[Simulate the action without changing anything]' \
'--json[Emit machine-readable JSON on stdout (for scripts)]' \
'--no-color[Disable ANSI colors]' \
'-h[Print help]' \
'--help[Print help]' \
':file -- File exported by the export command:_files' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_am__subcmd__help_commands" \
"*::: :->help" \
&& ret=0
case $state in
(help)
words=($line[1] "${words[@]}")
(( CURRENT += 1 ))
curcontext="${curcontext%:*:*}:am-help-command-$line[1]:"
case $line[1] in
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(start)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(stop)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(restart)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(status)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(install)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(uninstall)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(update)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(search)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(info)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(config)
_arguments "${_arguments_options[@]}" : \
":: :_am__subcmd__help__subcmd__config_commands" \
"*::: :->config" \
&& ret=0
case $state in
(config)
words=($line[1] "${words[@]}")
(( CURRENT += 1 ))
curcontext="${curcontext%:*:*}:am-help-config-command-$line[1]:"
case $line[1] in
(show)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(path)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(edit)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(validate)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(add)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
esac
;;
esac
;;
(doctor)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(run)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(completion)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(self-update)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(export)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(import)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
esac
;;
esac
;;
esac
;;
esac
}
(( $+functions[_am_commands] )) ||
_am_commands() {
local commands; commands=(
'list:List agents\: installed ones, or every agent known to the catalog' \
'start:Start an agent (foreground by default, or detached with --background)' \
'stop:Stop a background agent (SIGTERM, then SIGKILL after the timeout)' \
'restart:Restart an agent\: stop, then start with the same options' \
'status:Show the state of one agent, or of every installed agent' \
'install:Install an agent and its dependencies' \
'uninstall:Uninstall an agent and clean its files' \
'update:Update an installed agent to the latest available version' \
'search:Search the catalog by keyword (name, description, category, tags)' \
'info:Show detailed information about one agent' \
'config:Manage the configuration file' \
'doctor:Check the environment\: tools, config validity, paths, permissions' \
'run:Run the agent command directly with the given arguments (no process management)' \
'completion:Generate a shell completion script' \
'self-update:Update agent-manager itself from GitHub Releases' \
'export:Export the configuration and installation state (backup)' \
'import:Import a previously exported configuration and state' \
'help:Print this message or the help of the given subcommand(s)' \
)
_describe -t commands 'am commands' commands "$@"
}
(( $+functions[_am__subcmd__completion_commands] )) ||
_am__subcmd__completion_commands() {
local commands; commands=()
_describe -t commands 'am completion commands' commands "$@"
}
(( $+functions[_am__subcmd__config_commands] )) ||
_am__subcmd__config_commands() {
local commands; commands=(
'show:Print the effective (merged) configuration as YAML' \
'path:Print the location of the configuration file(s)' \
'edit:Open the user configuration file in your editor' \
'validate:Validate the configuration file(s)' \
'add:Add another agent definition file to the user configuration' \
'help:Print this message or the help of the given subcommand(s)' \
)
_describe -t commands 'am config commands' commands "$@"
}
(( $+functions[_am__subcmd__config__subcmd__add_commands] )) ||
_am__subcmd__config__subcmd__add_commands() {
local commands; commands=()
_describe -t commands 'am config add commands' commands "$@"
}
(( $+functions[_am__subcmd__config__subcmd__edit_commands] )) ||
_am__subcmd__config__subcmd__edit_commands() {
local commands; commands=()
_describe -t commands 'am config edit commands' commands "$@"
}
(( $+functions[_am__subcmd__config__subcmd__help_commands] )) ||
_am__subcmd__config__subcmd__help_commands() {
local commands; commands=(
'show:Print the effective (merged) configuration as YAML' \
'path:Print the location of the configuration file(s)' \
'edit:Open the user configuration file in your editor' \
'validate:Validate the configuration file(s)' \
'add:Add another agent definition file to the user configuration' \
'help:Print this message or the help of the given subcommand(s)' \
)
_describe -t commands 'am config help commands' commands "$@"
}
(( $+functions[_am__subcmd__config__subcmd__help__subcmd__add_commands] )) ||
_am__subcmd__config__subcmd__help__subcmd__add_commands() {
local commands; commands=()
_describe -t commands 'am config help add commands' commands "$@"
}
(( $+functions[_am__subcmd__config__subcmd__help__subcmd__edit_commands] )) ||
_am__subcmd__config__subcmd__help__subcmd__edit_commands() {
local commands; commands=()
_describe -t commands 'am config help edit commands' commands "$@"
}
(( $+functions[_am__subcmd__config__subcmd__help__subcmd__help_commands] )) ||
_am__subcmd__config__subcmd__help__subcmd__help_commands() {
local commands; commands=()
_describe -t commands 'am config help help commands' commands "$@"
}
(( $+functions[_am__subcmd__config__subcmd__help__subcmd__path_commands] )) ||
_am__subcmd__config__subcmd__help__subcmd__path_commands() {
local commands; commands=()
_describe -t commands 'am config help path commands' commands "$@"
}
(( $+functions[_am__subcmd__config__subcmd__help__subcmd__show_commands] )) ||
_am__subcmd__config__subcmd__help__subcmd__show_commands() {
local commands; commands=()
_describe -t commands 'am config help show commands' commands "$@"
}
(( $+functions[_am__subcmd__config__subcmd__help__subcmd__validate_commands] )) ||
_am__subcmd__config__subcmd__help__subcmd__validate_commands() {
local commands; commands=()
_describe -t commands 'am config help validate commands' commands "$@"
}
(( $+functions[_am__subcmd__config__subcmd__path_commands] )) ||
_am__subcmd__config__subcmd__path_commands() {
local commands; commands=()
_describe -t commands 'am config path commands' commands "$@"
}
(( $+functions[_am__subcmd__config__subcmd__show_commands] )) ||
_am__subcmd__config__subcmd__show_commands() {
local commands; commands=()
_describe -t commands 'am config show commands' commands "$@"
}
(( $+functions[_am__subcmd__config__subcmd__validate_commands] )) ||
_am__subcmd__config__subcmd__validate_commands() {
local commands; commands=()
_describe -t commands 'am config validate commands' commands "$@"
}
(( $+functions[_am__subcmd__doctor_commands] )) ||
_am__subcmd__doctor_commands() {
local commands; commands=()
_describe -t commands 'am doctor commands' commands "$@"
}
(( $+functions[_am__subcmd__export_commands] )) ||
_am__subcmd__export_commands() {
local commands; commands=()
_describe -t commands 'am export commands' commands "$@"
}
(( $+functions[_am__subcmd__help_commands] )) ||
_am__subcmd__help_commands() {
local commands; commands=(
'list:List agents\: installed ones, or every agent known to the catalog' \
'start:Start an agent (foreground by default, or detached with --background)' \
'stop:Stop a background agent (SIGTERM, then SIGKILL after the timeout)' \
'restart:Restart an agent\: stop, then start with the same options' \
'status:Show the state of one agent, or of every installed agent' \
'install:Install an agent and its dependencies' \
'uninstall:Uninstall an agent and clean its files' \
'update:Update an installed agent to the latest available version' \
'search:Search the catalog by keyword (name, description, category, tags)' \
'info:Show detailed information about one agent' \
'config:Manage the configuration file' \
'doctor:Check the environment\: tools, config validity, paths, permissions' \
'run:Run the agent command directly with the given arguments (no process management)' \
'completion:Generate a shell completion script' \
'self-update:Update agent-manager itself from GitHub Releases' \
'export:Export the configuration and installation state (backup)' \
'import:Import a previously exported configuration and state' \
'help:Print this message or the help of the given subcommand(s)' \
)
_describe -t commands 'am help commands' commands "$@"
}
(( $+functions[_am__subcmd__help__subcmd__completion_commands] )) ||
_am__subcmd__help__subcmd__completion_commands() {
local commands; commands=()
_describe -t commands 'am help completion commands' commands "$@"
}
(( $+functions[_am__subcmd__help__subcmd__config_commands] )) ||
_am__subcmd__help__subcmd__config_commands() {
local commands; commands=(
'show:Print the effective (merged) configuration as YAML' \
'path:Print the location of the configuration file(s)' \
'edit:Open the user configuration file in your editor' \
'validate:Validate the configuration file(s)' \
'add:Add another agent definition file to the user configuration' \
)
_describe -t commands 'am help config commands' commands "$@"
}
(( $+functions[_am__subcmd__help__subcmd__config__subcmd__add_commands] )) ||
_am__subcmd__help__subcmd__config__subcmd__add_commands() {
local commands; commands=()
_describe -t commands 'am help config add commands' commands "$@"
}
(( $+functions[_am__subcmd__help__subcmd__config__subcmd__edit_commands] )) ||
_am__subcmd__help__subcmd__config__subcmd__edit_commands() {
local commands; commands=()
_describe -t commands 'am help config edit commands' commands "$@"
}
(( $+functions[_am__subcmd__help__subcmd__config__subcmd__path_commands] )) ||
_am__subcmd__help__subcmd__config__subcmd__path_commands() {
local commands; commands=()
_describe -t commands 'am help config path commands' commands "$@"
}
(( $+functions[_am__subcmd__help__subcmd__config__subcmd__show_commands] )) ||
_am__subcmd__help__subcmd__config__subcmd__show_commands() {
local commands; commands=()
_describe -t commands 'am help config show commands' commands "$@"
}
(( $+functions[_am__subcmd__help__subcmd__config__subcmd__validate_commands] )) ||
_am__subcmd__help__subcmd__config__subcmd__validate_commands() {
local commands; commands=()
_describe -t commands 'am help config validate commands' commands "$@"
}
(( $+functions[_am__subcmd__help__subcmd__doctor_commands] )) ||
_am__subcmd__help__subcmd__doctor_commands() {
local commands; commands=()
_describe -t commands 'am help doctor commands' commands "$@"
}
(( $+functions[_am__subcmd__help__subcmd__export_commands] )) ||
_am__subcmd__help__subcmd__export_commands() {
local commands; commands=()
_describe -t commands 'am help export commands' commands "$@"
}
(( $+functions[_am__subcmd__help__subcmd__help_commands] )) ||
_am__subcmd__help__subcmd__help_commands() {
local commands; commands=()
_describe -t commands 'am help help commands' commands "$@"
}
(( $+functions[_am__subcmd__help__subcmd__import_commands] )) ||
_am__subcmd__help__subcmd__import_commands() {
local commands; commands=()
_describe -t commands 'am help import commands' commands "$@"
}
(( $+functions[_am__subcmd__help__subcmd__info_commands] )) ||
_am__subcmd__help__subcmd__info_commands() {
local commands; commands=()
_describe -t commands 'am help info commands' commands "$@"
}
(( $+functions[_am__subcmd__help__subcmd__install_commands] )) ||
_am__subcmd__help__subcmd__install_commands() {
local commands; commands=()
_describe -t commands 'am help install commands' commands "$@"
}
(( $+functions[_am__subcmd__help__subcmd__list_commands] )) ||
_am__subcmd__help__subcmd__list_commands() {
local commands; commands=()
_describe -t commands 'am help list commands' commands "$@"
}
(( $+functions[_am__subcmd__help__subcmd__restart_commands] )) ||
_am__subcmd__help__subcmd__restart_commands() {
local commands; commands=()
_describe -t commands 'am help restart commands' commands "$@"
}
(( $+functions[_am__subcmd__help__subcmd__run_commands] )) ||
_am__subcmd__help__subcmd__run_commands() {
local commands; commands=()
_describe -t commands 'am help run commands' commands "$@"
}
(( $+functions[_am__subcmd__help__subcmd__search_commands] )) ||
_am__subcmd__help__subcmd__search_commands() {
local commands; commands=()
_describe -t commands 'am help search commands' commands "$@"
}
(( $+functions[_am__subcmd__help__subcmd__self-update_commands] )) ||
_am__subcmd__help__subcmd__self-update_commands() {
local commands; commands=()
_describe -t commands 'am help self-update commands' commands "$@"
}
(( $+functions[_am__subcmd__help__subcmd__start_commands] )) ||
_am__subcmd__help__subcmd__start_commands() {
local commands; commands=()
_describe -t commands 'am help start commands' commands "$@"
}
(( $+functions[_am__subcmd__help__subcmd__status_commands] )) ||
_am__subcmd__help__subcmd__status_commands() {
local commands; commands=()
_describe -t commands 'am help status commands' commands "$@"
}
(( $+functions[_am__subcmd__help__subcmd__stop_commands] )) ||
_am__subcmd__help__subcmd__stop_commands() {
local commands; commands=()
_describe -t commands 'am help stop commands' commands "$@"
}
(( $+functions[_am__subcmd__help__subcmd__uninstall_commands] )) ||
_am__subcmd__help__subcmd__uninstall_commands() {
local commands; commands=()
_describe -t commands 'am help uninstall commands' commands "$@"
}
(( $+functions[_am__subcmd__help__subcmd__update_commands] )) ||
_am__subcmd__help__subcmd__update_commands() {
local commands; commands=()
_describe -t commands 'am help update commands' commands "$@"
}
(( $+functions[_am__subcmd__import_commands] )) ||
_am__subcmd__import_commands() {
local commands; commands=()
_describe -t commands 'am import commands' commands "$@"
}
(( $+functions[_am__subcmd__info_commands] )) ||
_am__subcmd__info_commands() {
local commands; commands=()
_describe -t commands 'am info commands' commands "$@"
}
(( $+functions[_am__subcmd__install_commands] )) ||
_am__subcmd__install_commands() {
local commands; commands=()
_describe -t commands 'am install commands' commands "$@"
}
(( $+functions[_am__subcmd__list_commands] )) ||
_am__subcmd__list_commands() {
local commands; commands=()
_describe -t commands 'am list commands' commands "$@"
}
(( $+functions[_am__subcmd__restart_commands] )) ||
_am__subcmd__restart_commands() {
local commands; commands=()
_describe -t commands 'am restart commands' commands "$@"
}
(( $+functions[_am__subcmd__run_commands] )) ||
_am__subcmd__run_commands() {
local commands; commands=()
_describe -t commands 'am run commands' commands "$@"
}
(( $+functions[_am__subcmd__search_commands] )) ||
_am__subcmd__search_commands() {
local commands; commands=()
_describe -t commands 'am search commands' commands "$@"
}
(( $+functions[_am__subcmd__self-update_commands] )) ||
_am__subcmd__self-update_commands() {
local commands; commands=()
_describe -t commands 'am self-update commands' commands "$@"
}
(( $+functions[_am__subcmd__start_commands] )) ||
_am__subcmd__start_commands() {
local commands; commands=()
_describe -t commands 'am start commands' commands "$@"
}
(( $+functions[_am__subcmd__status_commands] )) ||
_am__subcmd__status_commands() {
local commands; commands=()
_describe -t commands 'am status commands' commands "$@"
}
(( $+functions[_am__subcmd__stop_commands] )) ||
_am__subcmd__stop_commands() {
local commands; commands=()
_describe -t commands 'am stop commands' commands "$@"
}
(( $+functions[_am__subcmd__uninstall_commands] )) ||
_am__subcmd__uninstall_commands() {
local commands; commands=()
_describe -t commands 'am uninstall commands' commands "$@"
}
(( $+functions[_am__subcmd__update_commands] )) ||
_am__subcmd__update_commands() {
local commands; commands=()
_describe -t commands 'am update commands' commands "$@"
}
if [ "$funcstack[1]" = "_am" ]; then
_am "$@"
else
compdef _am am
fi