v0.4.1 : Phase 1 complete (17/17) - dashboard TUI (#33), favoris/notes/tags (#39), profils d'environnement (#40), completions dynamiques + man pages (#41), packaging officiel + CI (#42), self-update Gitea, state v3, 212 tests
This commit is contained in:
@@ -0,0 +1,103 @@
|
||||
# Gitea Actions : pipeline de release (issue #42).
|
||||
#
|
||||
# Sur chaque tag v* : construit les binaires de toutes les plateformes,
|
||||
# archive + publie la release Gitea avec les artefacts. Les installateurs
|
||||
# (install.sh / install.ps1) et 'am self-update' consomment ces artefacts.
|
||||
#
|
||||
# Labels de runners attendus : ubuntu-latest, windows-latest, macos-latest.
|
||||
# Un runner manquant laisse son job en attente ; le job linux couvre la
|
||||
# majorite des cas (les artefacts windows/macos peuvent aussi etre produits
|
||||
# par les scripts locaux documentes dans RELEASING.md).
|
||||
name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
jobs:
|
||||
linux:
|
||||
runs-on: ubuntu-latest
|
||||
container: rust:1.94-alpine
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install build tools
|
||||
run: apk add --no-cache build-base zip
|
||||
|
||||
- name: Add musl targets
|
||||
run: rustup target add x86_64-unknown-linux-musl aarch64-unknown-linux-musl
|
||||
|
||||
- name: Build linux x86_64 (static musl)
|
||||
run: cargo build --release --locked --target x86_64-unknown-linux-musl
|
||||
|
||||
- name: Build linux aarch64 (static musl)
|
||||
run: cargo build --release --locked --target aarch64-unknown-linux-musl
|
||||
|
||||
- name: Stage archives
|
||||
run: |
|
||||
mkdir -p dist
|
||||
cp target/x86_64-unknown-linux-musl/release/am dist/am-linux-x86_64
|
||||
cp target/aarch64-unknown-linux-musl/release/am dist/am-linux-aarch64
|
||||
cd dist
|
||||
tar -czf am-linux-x86_64.tar.gz am-linux-x86_64
|
||||
tar -czf am-linux-aarch64.tar.gz am-linux-aarch64
|
||||
sha256sum am-*.tar.gz > checksums.txt
|
||||
|
||||
- name: Publish release
|
||||
uses: https://gitea.com/actions/gitea-release-action@v1
|
||||
with:
|
||||
files: dist/am-linux-x86_64.tar.gz
|
||||
dist/am-linux-aarch64.tar.gz
|
||||
dist/checksums.txt
|
||||
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
|
||||
windows:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build windows x86_64
|
||||
run: cargo build --release --locked
|
||||
|
||||
- name: Stage archive
|
||||
run: |
|
||||
New-Item -ItemType Directory -Force dist | Out-Null
|
||||
Compress-Archive -Path target/release/am.exe -DestinationPath dist/am-windows-x86_64.zip -Force
|
||||
(Get-FileHash dist/am-windows-x86_64.zip -Algorithm SHA256).Hash.ToLower() | Out-File dist/checksums.txt
|
||||
|
||||
- name: Publish release
|
||||
uses: https://gitea.com/actions/gitea-release-action@v1
|
||||
with:
|
||||
files: dist/am-windows-x86_64.zip
|
||||
dist/checksums.txt
|
||||
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
|
||||
macos:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build macos x86_64 + aarch64
|
||||
run: |
|
||||
rustup target add x86_64-apple-darwin aarch64-apple-darwin
|
||||
cargo build --release --locked --target x86_64-apple-darwin
|
||||
cargo build --release --locked --target aarch64-apple-darwin
|
||||
|
||||
- name: Stage archives
|
||||
run: |
|
||||
mkdir -p dist
|
||||
cp target/x86_64-apple-darwin/release/am dist/am-macos-x86_64
|
||||
cp target/aarch64-apple-darwin/release/am dist/am-macos-aarch64
|
||||
cd dist
|
||||
tar -czf am-macos-x86_64.tar.gz am-macos-x86_64
|
||||
tar -czf am-macos-aarch64.tar.gz am-macos-aarch64
|
||||
shasum -a 256 am-*.tar.gz > checksums.txt
|
||||
|
||||
- name: Publish release
|
||||
uses: https://gitea.com/actions/gitea-release-action@v1
|
||||
with:
|
||||
files: dist/am-macos-x86_64.tar.gz
|
||||
dist/am-macos-aarch64.tar.gz
|
||||
dist/checksums.txt
|
||||
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
Generated
+1193
-9
File diff suppressed because it is too large
Load Diff
+4
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "agent-manager"
|
||||
version = "0.4.0"
|
||||
version = "0.4.1"
|
||||
edition = "2021"
|
||||
description = "Manage local AI coding agents: list, install, start, stop, update — with automatic dependency handling and a YAML-driven catalog."
|
||||
license = "MIT"
|
||||
@@ -35,6 +35,9 @@ wait-timeout = "0.2"
|
||||
keyring = "3"
|
||||
which = "7"
|
||||
zip = "0.6"
|
||||
crossterm = "0.29"
|
||||
ratatui = "0.30"
|
||||
clap_mangen = "0.3"
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
windows-sys = { version = "0.52", features = ["Win32_Foundation", "Win32_System_Threading", "Win32_System_ProcessStatus", "Win32_System_Diagnostics_ToolHelp", "Win32_System_Console"] }
|
||||
|
||||
+96
@@ -285,3 +285,99 @@ avec purge.
|
||||
$ am uninstall cowsay --purge --yes
|
||||
removed 'cowsay' from .../cowsay.yaml (backup: .../cowsay.yaml.bak)
|
||||
uninstalled Cowsay (files removed, config purged)
|
||||
|
||||
## Favoris, notes et tags personnels (v0.4.1)
|
||||
|
||||
$ am favorite claude-code
|
||||
⭐ claude-code added to favorites
|
||||
|
||||
$ am note claude-code use sonnet for this repo
|
||||
note saved for 'claude-code'
|
||||
|
||||
$ am tag claude-code python frontend
|
||||
tagged 'claude-code' with python, frontend
|
||||
|
||||
$ am tags
|
||||
┌───┬────────────┬───────┬─────────────┐
|
||||
│ # │ TAG │ COUNT │ AGENTS │
|
||||
├───┼────────────┼───────┼─────────────┤
|
||||
│ 0 │ #frontend │ 1 │ claude-code │
|
||||
│ 1 │ #python │ 1 │ claude-code │
|
||||
└───┴────────────┴───────┴─────────────┘
|
||||
|
||||
L'étoile apparaît dans am list, am status et am info ; les tags sont
|
||||
filtrables avec am search --tag, et tout survit au redémarrage (état v3) :
|
||||
|
||||
$ am info claude-code | tail
|
||||
tags anthropic · assistant · source-available · mainstream
|
||||
personal
|
||||
● favorite ★
|
||||
● tags #frontend #python
|
||||
● note use sonnet for this repo
|
||||
|
||||
$ am search --tag python
|
||||
┌───┬──────────────────────────┬──────────────┬─────────────┬─────────────┐
|
||||
│ # │ NAME │ CATEGORY │ INSTALLABLE │ DESCRIPTION │
|
||||
├───┼──────────────────────────┼──────────────┼─────────────┼─────────────┤
|
||||
│ 0 │ ★ Claude Code │ coding-agent │ yes │ Agent termi… │
|
||||
└───┴──────────────────────────┴──────────────┴─────────────┴─────────────┘
|
||||
|
||||
## Profils d'environnement (v0.4.1)
|
||||
|
||||
Des profils nommés dans la configuration (env + args + agent par défaut)
|
||||
s'appliquent au lancement :
|
||||
|
||||
profiles:
|
||||
dev:
|
||||
agent: claude-code
|
||||
env: {DEBUG: "1", LOG_LEVEL: debug}
|
||||
args: [--model, sonnet]
|
||||
prod:
|
||||
env: {LOG_LEVEL: info}
|
||||
|
||||
$ am profile list
|
||||
PROFILE AGENT ENV ARGS
|
||||
------- ----------- --------------------- ----------------
|
||||
dev claude-code DEBUG=1 LOG_LEVEL=… --model sonnet
|
||||
prod — LOG_LEVEL=info —
|
||||
|
||||
$ am start claude-code --profile dev
|
||||
# lance claude --model sonnet avec DEBUG=1 et LOG_LEVEL=debug
|
||||
|
||||
$ am start --profile dev # agent par défaut du profil
|
||||
$ am start --profile staging # -> error: unknown profile 'staging' — …
|
||||
# available profiles: dev, prod
|
||||
|
||||
## Dashboard TUI (v0.4.1)
|
||||
|
||||
am dashboard ouvre un tableau de bord temps réel (ratatui/crossterm, aucune
|
||||
dépendance runtime) : vue d'ensemble (statuts, PID, uptime, ★), activité
|
||||
(journal d'événements), stats par agent, sessions et projets. Tab / ← / →
|
||||
changent d'onglet, j/k défilent, q quitte ; rafraîchissement chaque seconde.
|
||||
Sur une sortie non interactive (pipe, script), un instantané texte est
|
||||
affiché à la place :
|
||||
|
||||
$ am dashboard | head
|
||||
agent-manager dashboard — 2 installed · 1 running · 12 sessions
|
||||
|
||||
overview
|
||||
★ claude-code running 2.1.233 pid 4242 (up 3h12m)
|
||||
aider installed 0.76.0 —
|
||||
codex external — —
|
||||
|
||||
$ am dashboard --json # l'instantané complet en JSON pour les scripts
|
||||
|
||||
## Pages de manuel et complétions dynamiques (v0.4.1)
|
||||
|
||||
$ am man dashboard
|
||||
.TH am-dashboard 1 "dashboard "
|
||||
.SH NAME
|
||||
dashboard - Live TUI dashboard: overview, activity, stats, sessions, projects
|
||||
...
|
||||
|
||||
$ am man --output man/ # am.1 + une page par commande (44 pages)
|
||||
man pages written to man/ (am.1 + 44 pages)
|
||||
|
||||
$ am completion bash --installed # Tab complète dynamiquement les
|
||||
# agents installés, alias et groupes
|
||||
# (interroge 'am _agents --installed')
|
||||
|
||||
@@ -119,6 +119,19 @@ sur le PATH) · ⚪ not-installed · 🔴 not-installable (SaaS/desktop)
|
||||
| am sessions [agent] --status --show --resume | registre des sessions + reprise d'une session arrêtée |
|
||||
| am history --search --failed --rerun N | historique des commandes (am + shell), filtrable et réexécutable |
|
||||
| am logs <agent> --follow | tail du log d'un agent, en direct |
|
||||
| am dashboard | tableau de bord TUI temps réel : vue d'ensemble, activité, stats, sessions, projets (Tab/←/→ : onglets, j/k : défilement, q : quitter) |
|
||||
|
||||
### 🎯 Personnaliser
|
||||
|
||||
| Commande | Rôle |
|
||||
|----------|------|
|
||||
| am favorite <agent> / am unfavorite | étoile ★ dans am list, am status et am info (persistante) |
|
||||
| am note <agent> <texte…> | note libre affichée dans am info (am note <agent> : affiche) |
|
||||
| am tag <agent> <mot>… / am untag <agent> <mot> | tags personnels, filtrables avec am search --tag |
|
||||
| am tags [agent] | liste les tags personnels et les agents qui les portent |
|
||||
| am profile list / show | profils d'environnement (env + args + agent par défaut) |
|
||||
| am start <agent> --profile dev | lance un agent avec un profil ; am start --profile dev utilise l'agent du profil |
|
||||
| am man [commande] --output man/ | génère les pages de manuel (am.1 + une page par commande) |
|
||||
|
||||
### 🧰 Système
|
||||
|
||||
@@ -130,7 +143,7 @@ sur le PATH) · ⚪ not-installed · 🔴 not-installable (SaaS/desktop)
|
||||
| am secret set NOM --agent A --value … / list / unset | secrets dans le trousseau du système (jamais en clair) |
|
||||
| am config show / edit / add / set | gère votre configuration (hooks on_start/on_stop/… dans settings.hooks) |
|
||||
| am open <agent> | ouvre le répertoire d'installation dans l'explorateur |
|
||||
| am completion <shell> | script de complétion (bash, zsh, fish, powershell) |
|
||||
| am completion <shell> [--installed] | script de complétion (bash, zsh, fish, powershell, elvish) ; --installed complète dynamiquement les agents installés, alias et groupes |
|
||||
| am self-update | met à jour am lui-même (si configuré) |
|
||||
| am self-uninstall | désinstalle am et tout ce qu'il a créé (confirmation) |
|
||||
| am | shell interactif : bannière, passerelle système, Tab et historique |
|
||||
@@ -186,10 +199,16 @@ Disponibles avant **ou après** la sous-commande.
|
||||
am start cc # alias (cc -> claude-code)
|
||||
am start group:dev # démarre tout un groupe en arrière-plan
|
||||
am stop group:dev
|
||||
am start cc --profile dev # profil d'environnement : env + args injectés
|
||||
|
||||
am dashboard # TUI temps réel : toute l'activité d'un coup d'œil
|
||||
am favorite cc && am tag cc python # personnalisez votre parc
|
||||
am search --tag python # retrouvez les agents que vous avez tagués
|
||||
|
||||
am # shell interactif (bannière style Hermes) :
|
||||
❯ inst<Tab> # complétion Tab : commandes, agents, groupes, options
|
||||
❯ inst<Tab> # complétion Tab : commandes, agents installés, groupes, options
|
||||
❯ install jcode
|
||||
❯ dashboard # le dashboard se lance aussi depuis le REPL
|
||||
❯ exit # historique persistant (flèches haut/bas)
|
||||
|
||||
### 🐚 Passerelle système
|
||||
|
||||
+72
-30
@@ -1,62 +1,104 @@
|
||||
# Publier une release
|
||||
|
||||
Les installateurs one-liner (`install.sh` et `install.ps1`) téléchargent
|
||||
les binaires attachés à la **dernière release** du dépôt Gitea
|
||||
Les installateurs one-liner (`install.sh` et `install.ps1`), la commande
|
||||
`am self-update` et les paquets (scoop/winget/homebrew) consomment les
|
||||
**artefacts attachés à la dernière release** du dépôt Gitea
|
||||
(https://git.dracodev.net/Projets/agent-manager). Sans binaire pour la
|
||||
plateforme, ils retombent sur `cargo install --git` (plus lent mais toujours
|
||||
fonctionnel).
|
||||
plateforme, les installateurs retombent sur `cargo install --git`.
|
||||
|
||||
La phase 1 (v0.4.1) a ajouté le pipeline CI (issue #42) : sur chaque tag
|
||||
`v*`, `.gitea/workflows/release.yml` construit Linux (x86_64 + aarch64
|
||||
musl statiques), Windows (x86_64) et macOS (x86_64 + aarch64) et publie la
|
||||
release. La procédure locale ci-dessous reste disponible pour produire
|
||||
manuellement les mêmes artefacts (ou les plateformes sans runner CI).
|
||||
|
||||
## 1. Bumper la version
|
||||
|
||||
Dans Cargo.toml (ex. `0.2.1`), puis mettre à jour Cargo.lock
|
||||
(`cargo check`) et compiler :
|
||||
Dans Cargo.toml (ex. `0.4.1`), puis `cargo check` pour mettre à jour
|
||||
Cargo.lock, et lancer toute la batterie :
|
||||
|
||||
cargo build --release # binaire Windows (am.exe) sur Windows
|
||||
cargo test --locked # 240+ tests
|
||||
cargo clippy --all-targets -- -D warnings # si possible
|
||||
|
||||
## 2. Produire les binaires et les archives
|
||||
|
||||
### Windows (x86_64) — natif
|
||||
|
||||
scripts/build-release.ps1 # target/release/am.exe -> dist/am-windows-x86_64.zip
|
||||
|
||||
### Linux — binaire STATIQUE (musl), compatible toutes distributions,
|
||||
### y compris Debian 12 (glibc 2.36) — ne JAMAIS publier un binaire glibc
|
||||
### compilé sur une base récente.
|
||||
|
||||
# binaire Linux STATIQUE (musl) : compatible toutes distributions,
|
||||
# y compris Debian 12 (glibc 2.36) — ne JAMAIS publier un binaire glibc
|
||||
# compilé sur une base récente.
|
||||
docker run --rm -v "${PWD}:/work" -w /work -e CARGO_TARGET_DIR=/tmp/target-musl \
|
||||
rust:1.94-alpine sh -c "apk add --no-cache build-base && \
|
||||
rustup target add x86_64-unknown-linux-musl && \
|
||||
rustup target add x86_64-unknown-linux-musl aarch64-unknown-linux-musl && \
|
||||
cargo build --release --locked --target x86_64-unknown-linux-musl && \
|
||||
cp /tmp/target-musl/x86_64-unknown-linux-musl/release/am dist/am-linux-x86_64"
|
||||
cargo build --release --locked --target aarch64-unknown-linux-musl && \
|
||||
mkdir -p dist && \
|
||||
cp /tmp/target-musl/x86_64-unknown-linux-musl/release/am dist/am-linux-x86_64 && \
|
||||
cp /tmp/target-musl/aarch64-unknown-linux-musl/release/am dist/am-linux-aarch64 && \
|
||||
cd dist && tar -czf am-linux-x86_64.tar.gz am-linux-x86_64 && \
|
||||
tar -czf am-linux-aarch64.tar.gz am-linux-aarch64"
|
||||
|
||||
## 2. Créer les archives des binaires
|
||||
### macOS (x86_64 + aarch64) — via CI (runner macOS) :
|
||||
|
||||
Windows (PowerShell) :
|
||||
# le job 'macos' du workflow release.yml produit :
|
||||
# am-macos-x86_64.tar.gz am-macos-aarch64.tar.gz
|
||||
# (compilation croisée macOS impossible depuis Windows/Linux ; sans
|
||||
# runner macOS, ces archives manquent et l'install.sh compile depuis
|
||||
# les sources sur macOS, ce qui reste fonctionnel.)
|
||||
|
||||
Compress-Archive target\release\am.exe am-windows-x86_64.zip
|
||||
Vérifier chaque archive : `am version` doit répondre, et `am doctor` ne
|
||||
doit signaler aucune dépendance manquante.
|
||||
|
||||
Linux (l'archive doit contenir un fichier nommé « am ») :
|
||||
## 3. Rendre les manifests de packaging (issue #42)
|
||||
|
||||
docker run --rm -v "${PWD}:/work" -w /work rust:1.94-alpine sh -c \
|
||||
"cd dist && cp am-linux-x86_64 am && tar -czf am-linux-x86_64.tar.gz am && rm am"
|
||||
Une fois toutes les archives dans `dist/` :
|
||||
|
||||
## 3. Créer la release sur Gitea
|
||||
scripts/render-manifests.ps1 -Version 0.4.1
|
||||
|
||||
Via l'interface web : Releases > New Release, tag v0.2.0, attacher les
|
||||
archives ci-dessus.
|
||||
Ce script rend, avec la version et les sha256 réels :
|
||||
|
||||
Ou via l'API (jeton Gitea requis) :
|
||||
- `dist/scoop/am.json` → `scoop install dist/scoop/am.json`
|
||||
(ou à ajouter à un bucket ; checkver/autoupdate inclus)
|
||||
- `dist/winget/*.yaml` → à soumettre à microsoft/winget-pkgs
|
||||
(`winget install BrunoDracodev.AgentManager`)
|
||||
- `dist/homebrew/am.rb` → à servir via un tap, ou à soumettre
|
||||
- `dist/rpm/am.spec` → rpmbuild -bb (avec am-linux-x86_64.tar.gz
|
||||
dans ~/rpmbuild/SOURCES)
|
||||
- Paquet deb : `packaging/deb/make-deb.sh 0.4.1` → dist/am_0.4.1_amd64.deb
|
||||
|
||||
## 4. Créer la release sur Gitea
|
||||
|
||||
Via l'interface web : Releases > New Release, tag v0.4.1, attacher les
|
||||
archives. Ou via l'API (jeton Gitea requis) :
|
||||
|
||||
curl -X POST -H "Authorization: token <JETON>" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"tag_name":"v0.2.0","name":"v0.2.0","body":"notes de version"}' \
|
||||
-d '{"tag_name":"v0.4.1","name":"v0.4.1","body":"notes de version"}' \
|
||||
https://git.dracodev.net/api/v1/repos/Projets/agent-manager/releases
|
||||
|
||||
curl -X POST -H "Authorization: token <JETON>" \
|
||||
-F "attachment=@am-windows-x86_64.zip" \
|
||||
-F "attachment=@dist/am-windows-x86_64.zip" \
|
||||
https://git.dracodev.net/api/v1/repos/Projets/agent-manager/releases/<id>/assets?name=am-windows-x86_64.zip
|
||||
|
||||
curl -X POST -H "Authorization: token <JETON>" \
|
||||
-F "attachment=@am-linux-x86_64.tar.gz" \
|
||||
https://git.dracodev.net/api/v1/repos/Projets/agent-manager/releases/<id>/assets?name=am-linux-x86_64.tar.gz
|
||||
# idem pour am-linux-x86_64.tar.gz, am-linux-aarch64.tar.gz,
|
||||
# am-macos-x86_64.tar.gz, am-macos-aarch64.tar.gz (si CI) et
|
||||
# checksums.txt.
|
||||
|
||||
## 4. Tag git
|
||||
## 5. Tag git (déclenche aussi le pipeline CI)
|
||||
|
||||
git tag v0.2.0 && git push origin v0.2.0
|
||||
git tag v0.4.1 && git push origin v0.4.1
|
||||
|
||||
## Conventions de nommage (attendues par les installateurs et self-update)
|
||||
|
||||
Les conventions de nommage attendues par les installateurs :
|
||||
- am-windows-x86_64.zip (contient am.exe)
|
||||
- am-linux-x86_64.tar.gz (contient am)
|
||||
- am-linux-aarch64.tar.gz (contient am)
|
||||
- am-macos-x86_64.tar.gz / am-macos-aarch64.tar.gz (contiennent am)
|
||||
|
||||
## Vérification finale
|
||||
|
||||
am self-update --check # doit annoncer la nouvelle version
|
||||
am self-update # met à jour le binaire courant
|
||||
|
||||
+8
-6
@@ -1,16 +1,18 @@
|
||||
# 🗺️ ROADMAP agent-manager — vers le « super outil »
|
||||
|
||||
> **Version du document : 2.1** · Statut : propositions, non engagées
|
||||
> **Version du document : 2.2** · Statut : propositions, non engagées
|
||||
> Base : analyse du code **v0.2.7** (Rust, 45+ tests, zéro dépendance runtime)
|
||||
>
|
||||
> ✅ **Phase 0 livrée en v0.3.0 (2026-08-17)** : issues #2 à #16 clôturées,
|
||||
> 157 tests, release publiée sur Gitea. Les découpages des phases 1 à 3 sont
|
||||
> en place sur Gitea (issues #25 à #80) : v0.4.0, v0.5.0, v1.0.
|
||||
>
|
||||
> 🔵 **Phase 1 livrée partiellement en v0.4.0 (2026-08-17)** : 13/17 issues
|
||||
> clôturées (#26–#32, #34–#38), 187 tests. Restent : #33 dashboard TUI,
|
||||
> #39 favoris/notes/tags, #40 profils d'environnement, #41 complétions+man,
|
||||
> #42 packaging.
|
||||
> ✅ **Phase 1 livrée en v0.4.1 (2026-08-17)** : 17/17 issues clôturées
|
||||
> (#26–#42), 240+ tests. v0.4.0 a livré 13/17 (#26–#32, #34–#38) ; v0.4.1
|
||||
> complète avec le dashboard TUI (#33), les favoris/notes/tags (#39), les
|
||||
> profils d'environnement (#40), les complétions dynamiques + man pages
|
||||
> (#41) et le packaging officiel + CI (#42). Binaires Windows/Linux publiés
|
||||
> sur Gitea — am self-update et les installateurs servent la v0.4.1.
|
||||
|
||||
---
|
||||
|
||||
@@ -145,7 +147,7 @@ tableau de bord et copilote.
|
||||
| sessions.json | index des sessions | dérivé du journal | doctor --fix (rejoue le journal) |
|
||||
| projects.json | agrégats par projet | dérivé du journal | doctor --fix |
|
||||
| history/*.jsonl | commandes REPL | repl.rs | non (données primaires) |
|
||||
| state.json v2 | installations + résumé | state.rs | partiellement (compteurs depuis le journal) |
|
||||
| state.json v3 | installations + résumé + annotations (★, notes, tags) | state.rs | partiellement (compteurs depuis le journal) |
|
||||
|
||||
**Règles :** JSONL append-only pour les faits · JSON dérivés régénérables ·
|
||||
migration additive (state v1 reste lisible partout) · doctor --fix répare
|
||||
|
||||
+991
-347
File diff suppressed because it is too large
Load Diff
+713
-126
File diff suppressed because it is too large
Load Diff
+1273
-544
File diff suppressed because it is too large
Load Diff
+678
-96
@@ -20,6 +20,7 @@ set edit:completion:arg-completer[am] = {|@words|
|
||||
&'am'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
@@ -33,31 +34,445 @@ set edit:completion:arg-completer[am] = {|@words|
|
||||
cand --help 'Print help (see more with ''--help'')'
|
||||
cand -V 'Print version'
|
||||
cand --version 'Print version'
|
||||
cand list 'List agents: installed ones, or every agent known to the catalog'
|
||||
cand list 'List installed agents (default); use --all for the whole catalog'
|
||||
cand logs 'Tail the log file of an agent (--follow for a live view)'
|
||||
cand open 'Open an agent''s installation directory in the file manager'
|
||||
cand watch 'Supervise an agent and optionally restart it on crash'
|
||||
cand dashboard 'Live TUI dashboard: overview, activity, stats, sessions, projects'
|
||||
cand favorite 'Mark an agent as a favorite (star in list and status)'
|
||||
cand unfavorite 'Remove the favorite star from an agent'
|
||||
cand note 'Attach a free-form note to an agent (shown in ''am info''); ''am note <agent>'' without text prints the current note'
|
||||
cand tag 'Add a personal tag to an agent'
|
||||
cand untag 'Remove a personal tag from an agent'
|
||||
cand tags 'List personal tags (with counts), optionally for one agent'
|
||||
cand profile 'Manage environment profiles (dev, prod, ...)'
|
||||
cand man 'Generate a man page for am (or for one command)'
|
||||
cand _agents 'Internal: list agent names for shell completions (hidden)'
|
||||
cand alias 'Manage command aliases (cc -> claude-code)'
|
||||
cand secret 'Manage secrets in the OS keyring (never in plaintext config)'
|
||||
cand start 'Start an agent (foreground by default, or detached with --background)'
|
||||
cand stop 'Stop a background agent (SIGTERM, then SIGKILL after the timeout)'
|
||||
cand restart 'Restart an agent: stop, then start with the same options'
|
||||
cand status 'Show the state of one agent, or of every installed agent'
|
||||
cand sessions 'List the sessions of every agent (and of the interactive shell)'
|
||||
cand stats 'Show usage statistics computed from the event journal'
|
||||
cand top 'Show the most used agents (top 10)'
|
||||
cand report 'Write a markdown activity report'
|
||||
cand projects 'Show which agent works on which project'
|
||||
cand timeline 'One chronological view of every activity (journal + REPL history)'
|
||||
cand log 'Read the event journal: everything am did'
|
||||
cand install 'Install an agent and its dependencies'
|
||||
cand uninstall 'Uninstall an agent and clean its files'
|
||||
cand uninstall 'Uninstall an agent (managed or external) and clean its files'
|
||||
cand update 'Update an installed agent to the latest available version'
|
||||
cand search 'Search the catalog by keyword (name, description, category, tags)'
|
||||
cand history 'Search the command history (am and shell commands)'
|
||||
cand info 'Show detailed information about one agent'
|
||||
cand init 'Generate a local agent-manager.yaml for the current directory'
|
||||
cand help 'Display help: the overview, a command, the command list, or a search'
|
||||
cand version 'Display version and build information'
|
||||
cand config 'Manage the configuration file'
|
||||
cand doctor 'Check the environment: tools, config validity, paths, permissions'
|
||||
cand run 'Run the agent command directly with the given arguments (no process management)'
|
||||
cand completion 'Generate a shell completion script'
|
||||
cand self-update 'Update agent-manager itself from GitHub Releases'
|
||||
cand self-uninstall 'Remove agent-manager and everything it created from this machine'
|
||||
cand export 'Export the configuration and installation state (backup)'
|
||||
cand import 'Import a previously exported configuration and state'
|
||||
cand help 'Print this message or the help of the given subcommand(s)'
|
||||
}
|
||||
&'am;list'= {
|
||||
cand --category 'Only show agents of this category'
|
||||
cand --sort 'Sort by name, version or status (default: name)'
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --installed-only 'Only show agents that are installed (managed or external)'
|
||||
cand --all 'Include hidden agents as well'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand --all 'Show every agent known to the catalog, not only the installed ones'
|
||||
cand --running 'Only show running agents'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;logs'= {
|
||||
cand --lines 'Number of lines to show (default: 20)'
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand --follow 'Follow the log as it grows'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;open'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;watch'= {
|
||||
cand --interval 'Check interval in seconds (default: 5)'
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand --restart 'Restart the agent automatically when it dies (with backoff)'
|
||||
cand --notify 'Desktop notification on every restart'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;dashboard'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;favorite'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;unfavorite'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;note'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;tag'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;untag'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;tags'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;profile'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
cand list 'List every defined profile'
|
||||
cand show 'Show one profile in detail (agent, env, args)'
|
||||
}
|
||||
&'am;profile;list'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;profile;show'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;man'= {
|
||||
cand --output 'Write the page(s) to this directory instead of stdout'
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;_agents'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand --installed 'Only installed agents (managed + external), aliases and groups'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;alias'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
cand add 'Add an alias (am alias add cc claude-code)'
|
||||
cand remove 'Remove an alias'
|
||||
cand list 'List every alias'
|
||||
}
|
||||
&'am;alias;add'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;alias;remove'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;alias;list'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;secret'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
cand set 'Store a secret for an agent'
|
||||
cand unset 'Remove a secret'
|
||||
cand list 'List stored secret names (values are never shown)'
|
||||
}
|
||||
&'am;secret;set'= {
|
||||
cand --agent 'Agent it belongs to'
|
||||
cand --value 'Secret value (prefer --value over shell history; never logged)'
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;secret;unset'= {
|
||||
cand --agent 'Agent it belongs to'
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;secret;list'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
@@ -73,8 +488,10 @@ set edit:completion:arg-completer[am] = {|@words|
|
||||
&'am;start'= {
|
||||
cand --args 'Extra arguments passed to the agent (repeatable; quoted strings are split on spaces)'
|
||||
cand --env 'Set an environment variable for the agent (repeatable): --env KEY=VALUE'
|
||||
cand --profile 'Apply an environment profile (env + args, defined in the config)'
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -b 'Run detached in the background; output goes to the agent log file'
|
||||
cand --background 'Run detached in the background; output goes to the agent log file'
|
||||
cand -f 'Run in the foreground, attached to this terminal (the default)'
|
||||
@@ -96,6 +513,7 @@ set edit:completion:arg-completer[am] = {|@words|
|
||||
cand --timeout 'Grace period in seconds before killing (default: from config, 5s)'
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand --force 'Kill immediately instead of terminating gracefully'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
@@ -112,9 +530,11 @@ set edit:completion:arg-completer[am] = {|@words|
|
||||
&'am;restart'= {
|
||||
cand --args 'Extra arguments passed to the agent (repeatable; quoted strings are split on spaces)'
|
||||
cand --env 'Set an environment variable for the agent (repeatable): --env KEY=VALUE'
|
||||
cand --profile 'Apply an environment profile (env + args, defined in the config)'
|
||||
cand --timeout 'Grace period in seconds before killing (default: from config, 5s)'
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -b 'Run detached in the background; output goes to the agent log file'
|
||||
cand --background 'Run detached in the background; output goes to the agent log file'
|
||||
cand -f 'Run in the foreground, attached to this terminal (the default)'
|
||||
@@ -136,6 +556,135 @@ set edit:completion:arg-completer[am] = {|@words|
|
||||
&'am;status'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;sessions'= {
|
||||
cand --project 'Only sessions of this project'
|
||||
cand --status 'Only sessions with this status (running, stopped, failed, interrupted)'
|
||||
cand --show 'Show one session in detail (summary + log excerpt)'
|
||||
cand --resume 'Resume a finished session: relaunch the agent with its recorded arguments'
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;stats'= {
|
||||
cand --period 'Only events of the last period (7d, 30d, 90d, all)'
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;top'= {
|
||||
cand --period 'Only events of the last period (7d, 30d, 90d, all)'
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;report'= {
|
||||
cand --output 'Output file (default: report-YYYYMMDD.md in the state directory)'
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand --last-week 'Cover the last 7 days'
|
||||
cand --last-month 'Cover the last 30 days'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;projects'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;timeline'= {
|
||||
cand --project 'Only activity of this project'
|
||||
cand --since 'Only activity at or after this date (YYYY-MM-DD or RFC 3339)'
|
||||
cand --limit 'Maximum number of entries (default: 50)'
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;log'= {
|
||||
cand --kind 'Only these event kinds (comma separated: start,stop,run,install,...)'
|
||||
cand --since 'Only events at or after this date (YYYY-MM-DD or RFC 3339)'
|
||||
cand --limit 'Maximum number of events (default: 50)'
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand --follow 'Follow the journal as new events arrive'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
@@ -152,6 +701,7 @@ set edit:completion:arg-completer[am] = {|@words|
|
||||
cand --method 'Select the install method (index, or type: npm, pip, uv, cargo, go, bun, curl, binary, git)'
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand --force 'Reinstall even if already installed'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
@@ -168,6 +718,7 @@ set edit:completion:arg-completer[am] = {|@words|
|
||||
&'am;uninstall'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand --purge 'Also remove logs and the agent entry from the user config file'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
@@ -184,6 +735,7 @@ set edit:completion:arg-completer[am] = {|@words|
|
||||
&'am;update'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand --all 'Update every installed managed agent'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
@@ -199,8 +751,33 @@ set edit:completion:arg-completer[am] = {|@words|
|
||||
}
|
||||
&'am;search'= {
|
||||
cand --category 'Restrict to this category'
|
||||
cand --tag 'Only agents carrying this personal tag'
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;history'= {
|
||||
cand --kind 'Only commands of this kind (am or shell)'
|
||||
cand --cwd 'Only commands run in this directory'
|
||||
cand --search 'Full-text search in the command line'
|
||||
cand --session 'Only commands of this session'
|
||||
cand --limit 'Maximum number of entries (default: 100)'
|
||||
cand --rerun 'Re-run the Nth most recent entry (with confirmation)'
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand --failed 'Only failed commands'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
@@ -216,6 +793,57 @@ set edit:completion:arg-completer[am] = {|@words|
|
||||
&'am;info'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;init'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand --force 'Overwrite an existing agent-manager.yaml'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;help'= {
|
||||
cand --find 'Search through all help commands table'
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;version'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
@@ -231,6 +859,7 @@ set edit:completion:arg-completer[am] = {|@words|
|
||||
&'am;config'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
@@ -247,11 +876,12 @@ set edit:completion:arg-completer[am] = {|@words|
|
||||
cand edit 'Open the user configuration file in your editor'
|
||||
cand validate 'Validate the configuration file(s)'
|
||||
cand add 'Add another agent definition file to the user configuration'
|
||||
cand help 'Print this message or the help of the given subcommand(s)'
|
||||
cand set 'Set one configuration key without an editor (config set settings.default_shell pwsh)'
|
||||
}
|
||||
&'am;config;show'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
@@ -267,6 +897,7 @@ set edit:completion:arg-completer[am] = {|@words|
|
||||
&'am;config;path'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
@@ -282,6 +913,7 @@ set edit:completion:arg-completer[am] = {|@words|
|
||||
&'am;config;edit'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
@@ -297,6 +929,7 @@ set edit:completion:arg-completer[am] = {|@words|
|
||||
&'am;config;validate'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
@@ -312,6 +945,7 @@ set edit:completion:arg-completer[am] = {|@words|
|
||||
&'am;config;add'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
@@ -324,29 +958,26 @@ set edit:completion:arg-completer[am] = {|@words|
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;config;help'= {
|
||||
cand show 'Print the effective (merged) configuration as YAML'
|
||||
cand path 'Print the location of the configuration file(s)'
|
||||
cand edit 'Open the user configuration file in your editor'
|
||||
cand validate 'Validate the configuration file(s)'
|
||||
cand add 'Add another agent definition file to the user configuration'
|
||||
cand help 'Print this message or the help of the given subcommand(s)'
|
||||
}
|
||||
&'am;config;help;show'= {
|
||||
}
|
||||
&'am;config;help;path'= {
|
||||
}
|
||||
&'am;config;help;edit'= {
|
||||
}
|
||||
&'am;config;help;validate'= {
|
||||
}
|
||||
&'am;config;help;add'= {
|
||||
}
|
||||
&'am;config;help;help'= {
|
||||
&'am;config;set'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;doctor'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand --fix 'Attempt to repair problems (create directories, fix the state file)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
@@ -363,6 +994,7 @@ set edit:completion:arg-completer[am] = {|@words|
|
||||
&'am;run'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
@@ -378,6 +1010,8 @@ set edit:completion:arg-completer[am] = {|@words|
|
||||
&'am;completion'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand --installed 'Add dynamic completion of the installed agents, aliases and groups (queried from ''am _agents'' at Tab time)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
@@ -394,6 +1028,7 @@ set edit:completion:arg-completer[am] = {|@words|
|
||||
cand --to 'Download the new binary to this path instead of replacing the current one'
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand --check 'Only check whether a newer version exists'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
@@ -407,10 +1042,27 @@ set edit:completion:arg-completer[am] = {|@words|
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;self-uninstall'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
cand --quiet 'Quiet mode: only errors are printed'
|
||||
cand -y 'Answer yes to every confirmation prompt'
|
||||
cand --yes 'Answer yes to every confirmation prompt'
|
||||
cand --dry-run 'Simulate the action without changing anything'
|
||||
cand --json 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
cand --no-color 'Disable ANSI colors'
|
||||
cand -h 'Print help (see more with ''--help'')'
|
||||
cand --help 'Print help (see more with ''--help'')'
|
||||
}
|
||||
&'am;export'= {
|
||||
cand --output 'Output file (default: am-export.json)'
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
@@ -426,6 +1078,7 @@ set edit:completion:arg-completer[am] = {|@words|
|
||||
&'am;import'= {
|
||||
cand -c 'Use an alternate configuration file'
|
||||
cand --config 'Use an alternate configuration file'
|
||||
cand --theme 'Color theme for the output (see ''am help theme'' for the list)'
|
||||
cand -v 'Verbose output: show every command executed and its details'
|
||||
cand --verbose 'Verbose output: show every command executed and its details'
|
||||
cand -q 'Quiet mode: only errors are printed'
|
||||
@@ -438,77 +1091,6 @@ set edit:completion:arg-completer[am] = {|@words|
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
}
|
||||
&'am;help'= {
|
||||
cand list 'List agents: installed ones, or every agent known to the catalog'
|
||||
cand start 'Start an agent (foreground by default, or detached with --background)'
|
||||
cand stop 'Stop a background agent (SIGTERM, then SIGKILL after the timeout)'
|
||||
cand restart 'Restart an agent: stop, then start with the same options'
|
||||
cand status 'Show the state of one agent, or of every installed agent'
|
||||
cand install 'Install an agent and its dependencies'
|
||||
cand uninstall 'Uninstall an agent and clean its files'
|
||||
cand update 'Update an installed agent to the latest available version'
|
||||
cand search 'Search the catalog by keyword (name, description, category, tags)'
|
||||
cand info 'Show detailed information about one agent'
|
||||
cand config 'Manage the configuration file'
|
||||
cand doctor 'Check the environment: tools, config validity, paths, permissions'
|
||||
cand run 'Run the agent command directly with the given arguments (no process management)'
|
||||
cand completion 'Generate a shell completion script'
|
||||
cand self-update 'Update agent-manager itself from GitHub Releases'
|
||||
cand export 'Export the configuration and installation state (backup)'
|
||||
cand import 'Import a previously exported configuration and state'
|
||||
cand help 'Print this message or the help of the given subcommand(s)'
|
||||
}
|
||||
&'am;help;list'= {
|
||||
}
|
||||
&'am;help;start'= {
|
||||
}
|
||||
&'am;help;stop'= {
|
||||
}
|
||||
&'am;help;restart'= {
|
||||
}
|
||||
&'am;help;status'= {
|
||||
}
|
||||
&'am;help;install'= {
|
||||
}
|
||||
&'am;help;uninstall'= {
|
||||
}
|
||||
&'am;help;update'= {
|
||||
}
|
||||
&'am;help;search'= {
|
||||
}
|
||||
&'am;help;info'= {
|
||||
}
|
||||
&'am;help;config'= {
|
||||
cand show 'Print the effective (merged) configuration as YAML'
|
||||
cand path 'Print the location of the configuration file(s)'
|
||||
cand edit 'Open the user configuration file in your editor'
|
||||
cand validate 'Validate the configuration file(s)'
|
||||
cand add 'Add another agent definition file to the user configuration'
|
||||
}
|
||||
&'am;help;config;show'= {
|
||||
}
|
||||
&'am;help;config;path'= {
|
||||
}
|
||||
&'am;help;config;edit'= {
|
||||
}
|
||||
&'am;help;config;validate'= {
|
||||
}
|
||||
&'am;help;config;add'= {
|
||||
}
|
||||
&'am;help;doctor'= {
|
||||
}
|
||||
&'am;help;run'= {
|
||||
}
|
||||
&'am;help;completion'= {
|
||||
}
|
||||
&'am;help;self-update'= {
|
||||
}
|
||||
&'am;help;export'= {
|
||||
}
|
||||
&'am;help;import'= {
|
||||
}
|
||||
&'am;help;help'= {
|
||||
}
|
||||
]
|
||||
$completions[$command]
|
||||
}
|
||||
|
||||
+441
-49
@@ -1,6 +1,6 @@
|
||||
# Print an optspec for argparse to handle cmd's options that are independent of any subcommand.
|
||||
function __fish_am_global_optspecs
|
||||
string join \n c/config= v/verbose q/quiet y/yes dry-run json no-color h/help V/version
|
||||
string join \n c/config= v/verbose q/quiet y/yes dry-run json no-color theme= h/help V/version
|
||||
end
|
||||
|
||||
function __fish_am_needs_command
|
||||
@@ -25,6 +25,7 @@ function __fish_am_using_subcommand
|
||||
end
|
||||
|
||||
complete -c am -n "__fish_am_needs_command" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_needs_command" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_needs_command" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_needs_command" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_needs_command" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
@@ -33,28 +34,56 @@ complete -c am -n "__fish_am_needs_command" -l json -d 'Emit machine-readable JS
|
||||
complete -c am -n "__fish_am_needs_command" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_needs_command" -s h -l help -d 'Print help (see more with \'--help\')'
|
||||
complete -c am -n "__fish_am_needs_command" -s V -l version -d 'Print version'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "list" -d 'List agents: installed ones, or every agent known to the catalog'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "list" -d 'List installed agents (default); use --all for the whole catalog'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "logs" -d 'Tail the log file of an agent (--follow for a live view)'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "open" -d 'Open an agent\'s installation directory in the file manager'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "watch" -d 'Supervise an agent and optionally restart it on crash'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "dashboard" -d 'Live TUI dashboard: overview, activity, stats, sessions, projects'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "favorite" -d 'Mark an agent as a favorite (star in list and status)'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "unfavorite" -d 'Remove the favorite star from an agent'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "note" -d 'Attach a free-form note to an agent (shown in \'am info\'); \'am note <agent>\' without text prints the current note'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "tag" -d 'Add a personal tag to an agent'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "untag" -d 'Remove a personal tag from an agent'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "tags" -d 'List personal tags (with counts), optionally for one agent'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "profile" -d 'Manage environment profiles (dev, prod, ...)'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "man" -d 'Generate a man page for am (or for one command)'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "_agents" -d 'Internal: list agent names for shell completions (hidden)'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "alias" -d 'Manage command aliases (cc -> claude-code)'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "secret" -d 'Manage secrets in the OS keyring (never in plaintext config)'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "start" -d 'Start an agent (foreground by default, or detached with --background)'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "stop" -d 'Stop a background agent (SIGTERM, then SIGKILL after the timeout)'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "restart" -d 'Restart an agent: stop, then start with the same options'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "status" -d 'Show the state of one agent, or of every installed agent'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "sessions" -d 'List the sessions of every agent (and of the interactive shell)'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "stats" -d 'Show usage statistics computed from the event journal'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "top" -d 'Show the most used agents (top 10)'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "report" -d 'Write a markdown activity report'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "projects" -d 'Show which agent works on which project'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "timeline" -d 'One chronological view of every activity (journal + REPL history)'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "log" -d 'Read the event journal: everything am did'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "install" -d 'Install an agent and its dependencies'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "uninstall" -d 'Uninstall an agent and clean its files'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "uninstall" -d 'Uninstall an agent (managed or external) and clean its files'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "update" -d 'Update an installed agent to the latest available version'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "search" -d 'Search the catalog by keyword (name, description, category, tags)'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "history" -d 'Search the command history (am and shell commands)'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "info" -d 'Show detailed information about one agent'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "init" -d 'Generate a local agent-manager.yaml for the current directory'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "help" -d 'Display help: the overview, a command, the command list, or a search'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "version" -d 'Display version and build information'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "config" -d 'Manage the configuration file'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "doctor" -d 'Check the environment: tools, config validity, paths, permissions'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "run" -d 'Run the agent command directly with the given arguments (no process management)'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "completion" -d 'Generate a shell completion script'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "self-update" -d 'Update agent-manager itself from GitHub Releases'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "self-uninstall" -d 'Remove agent-manager and everything it created from this machine'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "export" -d 'Export the configuration and installation state (backup)'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "import" -d 'Import a previously exported configuration and state'
|
||||
complete -c am -n "__fish_am_needs_command" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
|
||||
complete -c am -n "__fish_am_using_subcommand list" -l category -d 'Only show agents of this category' -r
|
||||
complete -c am -n "__fish_am_using_subcommand list" -l sort -d 'Sort by name, version or status (default: name)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand list" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand list" -l installed-only -d 'Only show agents that are installed (managed or external)'
|
||||
complete -c am -n "__fish_am_using_subcommand list" -l all -d 'Include hidden agents as well'
|
||||
complete -c am -n "__fish_am_using_subcommand list" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand list" -l all -d 'Show every agent known to the catalog, not only the installed ones'
|
||||
complete -c am -n "__fish_am_using_subcommand list" -l running -d 'Only show running agents'
|
||||
complete -c am -n "__fish_am_using_subcommand list" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand list" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand list" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
@@ -62,9 +91,236 @@ complete -c am -n "__fish_am_using_subcommand list" -l dry-run -d 'Simulate the
|
||||
complete -c am -n "__fish_am_using_subcommand list" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand list" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand list" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand logs" -l lines -d 'Number of lines to show (default: 20)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand logs" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand logs" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand logs" -l follow -d 'Follow the log as it grows'
|
||||
complete -c am -n "__fish_am_using_subcommand logs" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand logs" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand logs" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand logs" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand logs" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand logs" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand logs" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand open" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand open" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand open" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand open" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand open" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand open" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand open" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand open" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand open" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand watch" -l interval -d 'Check interval in seconds (default: 5)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand watch" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand watch" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand watch" -l restart -d 'Restart the agent automatically when it dies (with backoff)'
|
||||
complete -c am -n "__fish_am_using_subcommand watch" -l notify -d 'Desktop notification on every restart'
|
||||
complete -c am -n "__fish_am_using_subcommand watch" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand watch" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand watch" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand watch" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand watch" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand watch" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand watch" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand dashboard" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand dashboard" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand dashboard" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand dashboard" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand dashboard" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand dashboard" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand dashboard" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand dashboard" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand dashboard" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand favorite" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand favorite" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand favorite" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand favorite" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand favorite" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand favorite" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand favorite" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand favorite" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand favorite" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand unfavorite" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand unfavorite" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand unfavorite" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand unfavorite" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand unfavorite" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand unfavorite" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand unfavorite" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand unfavorite" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand unfavorite" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand note" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand note" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand note" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand note" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand note" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand note" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand note" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand note" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand note" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand tag" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand tag" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand tag" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand tag" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand tag" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand tag" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand tag" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand tag" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand tag" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand untag" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand untag" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand untag" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand untag" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand untag" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand untag" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand untag" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand untag" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand untag" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand tags" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand tags" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand tags" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand tags" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand tags" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand tags" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand tags" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand tags" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand tags" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and not __fish_seen_subcommand_from list show" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and not __fish_seen_subcommand_from list show" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and not __fish_seen_subcommand_from list show" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and not __fish_seen_subcommand_from list show" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and not __fish_seen_subcommand_from list show" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and not __fish_seen_subcommand_from list show" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and not __fish_seen_subcommand_from list show" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and not __fish_seen_subcommand_from list show" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and not __fish_seen_subcommand_from list show" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and not __fish_seen_subcommand_from list show" -f -a "list" -d 'List every defined profile'
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and not __fish_seen_subcommand_from list show" -f -a "show" -d 'Show one profile in detail (agent, env, args)'
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and __fish_seen_subcommand_from list" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and __fish_seen_subcommand_from list" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and __fish_seen_subcommand_from list" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and __fish_seen_subcommand_from list" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and __fish_seen_subcommand_from list" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and __fish_seen_subcommand_from list" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and __fish_seen_subcommand_from list" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and __fish_seen_subcommand_from list" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and __fish_seen_subcommand_from list" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and __fish_seen_subcommand_from show" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and __fish_seen_subcommand_from show" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and __fish_seen_subcommand_from show" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and __fish_seen_subcommand_from show" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and __fish_seen_subcommand_from show" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and __fish_seen_subcommand_from show" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and __fish_seen_subcommand_from show" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and __fish_seen_subcommand_from show" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand profile; and __fish_seen_subcommand_from show" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand man" -l output -d 'Write the page(s) to this directory instead of stdout' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand man" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand man" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand man" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand man" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand man" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand man" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand man" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand man" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand man" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand _agents" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand _agents" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand _agents" -l installed -d 'Only installed agents (managed + external), aliases and groups'
|
||||
complete -c am -n "__fish_am_using_subcommand _agents" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand _agents" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand _agents" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand _agents" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand _agents" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand _agents" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand _agents" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and not __fish_seen_subcommand_from add remove list" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and not __fish_seen_subcommand_from add remove list" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and not __fish_seen_subcommand_from add remove list" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and not __fish_seen_subcommand_from add remove list" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and not __fish_seen_subcommand_from add remove list" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and not __fish_seen_subcommand_from add remove list" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and not __fish_seen_subcommand_from add remove list" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and not __fish_seen_subcommand_from add remove list" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and not __fish_seen_subcommand_from add remove list" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and not __fish_seen_subcommand_from add remove list" -f -a "add" -d 'Add an alias (am alias add cc claude-code)'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and not __fish_seen_subcommand_from add remove list" -f -a "remove" -d 'Remove an alias'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and not __fish_seen_subcommand_from add remove list" -f -a "list" -d 'List every alias'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and __fish_seen_subcommand_from add" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and __fish_seen_subcommand_from add" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and __fish_seen_subcommand_from add" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and __fish_seen_subcommand_from add" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and __fish_seen_subcommand_from add" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and __fish_seen_subcommand_from add" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and __fish_seen_subcommand_from add" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and __fish_seen_subcommand_from add" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and __fish_seen_subcommand_from add" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and __fish_seen_subcommand_from remove" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and __fish_seen_subcommand_from remove" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and __fish_seen_subcommand_from remove" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and __fish_seen_subcommand_from remove" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and __fish_seen_subcommand_from remove" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and __fish_seen_subcommand_from remove" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and __fish_seen_subcommand_from remove" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and __fish_seen_subcommand_from remove" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and __fish_seen_subcommand_from remove" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and __fish_seen_subcommand_from list" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and __fish_seen_subcommand_from list" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and __fish_seen_subcommand_from list" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and __fish_seen_subcommand_from list" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and __fish_seen_subcommand_from list" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and __fish_seen_subcommand_from list" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and __fish_seen_subcommand_from list" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and __fish_seen_subcommand_from list" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand alias; and __fish_seen_subcommand_from list" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and not __fish_seen_subcommand_from set unset list" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and not __fish_seen_subcommand_from set unset list" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and not __fish_seen_subcommand_from set unset list" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and not __fish_seen_subcommand_from set unset list" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and not __fish_seen_subcommand_from set unset list" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and not __fish_seen_subcommand_from set unset list" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and not __fish_seen_subcommand_from set unset list" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and not __fish_seen_subcommand_from set unset list" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and not __fish_seen_subcommand_from set unset list" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and not __fish_seen_subcommand_from set unset list" -f -a "set" -d 'Store a secret for an agent'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and not __fish_seen_subcommand_from set unset list" -f -a "unset" -d 'Remove a secret'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and not __fish_seen_subcommand_from set unset list" -f -a "list" -d 'List stored secret names (values are never shown)'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from set" -l agent -d 'Agent it belongs to' -r
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from set" -l value -d 'Secret value (prefer --value over shell history; never logged)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from set" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from set" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from set" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from set" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from set" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from set" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from set" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from set" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from set" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from unset" -l agent -d 'Agent it belongs to' -r
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from unset" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from unset" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from unset" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from unset" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from unset" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from unset" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from unset" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from unset" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from unset" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from list" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from list" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from list" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from list" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from list" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from list" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from list" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from list" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand secret; and __fish_seen_subcommand_from list" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand start" -l args -d 'Extra arguments passed to the agent (repeatable; quoted strings are split on spaces)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand start" -l env -d 'Set an environment variable for the agent (repeatable): --env KEY=VALUE' -r
|
||||
complete -c am -n "__fish_am_using_subcommand start" -l profile -d 'Apply an environment profile (env + args, defined in the config)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand start" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand start" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand start" -s b -l background -d 'Run detached in the background; output goes to the agent log file'
|
||||
complete -c am -n "__fish_am_using_subcommand start" -s f -l foreground -d 'Run in the foreground, attached to this terminal (the default)'
|
||||
complete -c am -n "__fish_am_using_subcommand start" -l notify -d 'Send a desktop notification once the agent has started'
|
||||
@@ -77,6 +333,7 @@ complete -c am -n "__fish_am_using_subcommand start" -l no-color -d 'Disable ANS
|
||||
complete -c am -n "__fish_am_using_subcommand start" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand stop" -l timeout -d 'Grace period in seconds before killing (default: from config, 5s)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand stop" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand stop" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand stop" -l force -d 'Kill immediately instead of terminating gracefully'
|
||||
complete -c am -n "__fish_am_using_subcommand stop" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand stop" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
@@ -87,8 +344,10 @@ complete -c am -n "__fish_am_using_subcommand stop" -l no-color -d 'Disable ANSI
|
||||
complete -c am -n "__fish_am_using_subcommand stop" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand restart" -l args -d 'Extra arguments passed to the agent (repeatable; quoted strings are split on spaces)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand restart" -l env -d 'Set an environment variable for the agent (repeatable): --env KEY=VALUE' -r
|
||||
complete -c am -n "__fish_am_using_subcommand restart" -l profile -d 'Apply an environment profile (env + args, defined in the config)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand restart" -l timeout -d 'Grace period in seconds before killing (default: from config, 5s)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand restart" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand restart" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand restart" -s b -l background -d 'Run detached in the background; output goes to the agent log file'
|
||||
complete -c am -n "__fish_am_using_subcommand restart" -s f -l foreground -d 'Run in the foreground, attached to this terminal (the default)'
|
||||
complete -c am -n "__fish_am_using_subcommand restart" -l notify -d 'Send a desktop notification once the agent has started'
|
||||
@@ -101,6 +360,7 @@ complete -c am -n "__fish_am_using_subcommand restart" -l json -d 'Emit machine-
|
||||
complete -c am -n "__fish_am_using_subcommand restart" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand restart" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand status" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand status" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand status" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand status" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand status" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
@@ -108,8 +368,88 @@ complete -c am -n "__fish_am_using_subcommand status" -l dry-run -d 'Simulate th
|
||||
complete -c am -n "__fish_am_using_subcommand status" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand status" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand status" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand sessions" -l project -d 'Only sessions of this project' -r
|
||||
complete -c am -n "__fish_am_using_subcommand sessions" -l status -d 'Only sessions with this status (running, stopped, failed, interrupted)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand sessions" -l show -d 'Show one session in detail (summary + log excerpt)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand sessions" -l resume -d 'Resume a finished session: relaunch the agent with its recorded arguments' -r
|
||||
complete -c am -n "__fish_am_using_subcommand sessions" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand sessions" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand sessions" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand sessions" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand sessions" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand sessions" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand sessions" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand sessions" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand sessions" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand stats" -l period -d 'Only events of the last period (7d, 30d, 90d, all)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand stats" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand stats" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand stats" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand stats" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand stats" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand stats" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand stats" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand stats" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand stats" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand top" -l period -d 'Only events of the last period (7d, 30d, 90d, all)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand top" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand top" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand top" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand top" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand top" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand top" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand top" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand top" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand top" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand report" -l output -d 'Output file (default: report-YYYYMMDD.md in the state directory)' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand report" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand report" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand report" -l last-week -d 'Cover the last 7 days'
|
||||
complete -c am -n "__fish_am_using_subcommand report" -l last-month -d 'Cover the last 30 days'
|
||||
complete -c am -n "__fish_am_using_subcommand report" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand report" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand report" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand report" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand report" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand report" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand report" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand projects" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand projects" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand projects" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand projects" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand projects" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand projects" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand projects" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand projects" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand projects" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand timeline" -l project -d 'Only activity of this project' -r
|
||||
complete -c am -n "__fish_am_using_subcommand timeline" -l since -d 'Only activity at or after this date (YYYY-MM-DD or RFC 3339)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand timeline" -l limit -d 'Maximum number of entries (default: 50)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand timeline" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand timeline" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand timeline" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand timeline" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand timeline" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand timeline" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand timeline" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand timeline" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand timeline" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand log" -l kind -d 'Only these event kinds (comma separated: start,stop,run,install,...)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand log" -l since -d 'Only events at or after this date (YYYY-MM-DD or RFC 3339)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand log" -l limit -d 'Maximum number of events (default: 50)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand log" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand log" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand log" -l follow -d 'Follow the journal as new events arrive'
|
||||
complete -c am -n "__fish_am_using_subcommand log" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand log" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand log" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand log" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand log" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand log" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand log" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand install" -l method -d 'Select the install method (index, or type: npm, pip, uv, cargo, go, bun, curl, binary, git)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand install" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand install" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand install" -l force -d 'Reinstall even if already installed'
|
||||
complete -c am -n "__fish_am_using_subcommand install" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand install" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
@@ -119,6 +459,7 @@ complete -c am -n "__fish_am_using_subcommand install" -l json -d 'Emit machine-
|
||||
complete -c am -n "__fish_am_using_subcommand install" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand install" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand uninstall" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand uninstall" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand uninstall" -l purge -d 'Also remove logs and the agent entry from the user config file'
|
||||
complete -c am -n "__fish_am_using_subcommand uninstall" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand uninstall" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
@@ -128,6 +469,7 @@ complete -c am -n "__fish_am_using_subcommand uninstall" -l json -d 'Emit machin
|
||||
complete -c am -n "__fish_am_using_subcommand uninstall" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand uninstall" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand update" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand update" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand update" -l all -d 'Update every installed managed agent'
|
||||
complete -c am -n "__fish_am_using_subcommand update" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand update" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
@@ -137,7 +479,9 @@ complete -c am -n "__fish_am_using_subcommand update" -l json -d 'Emit machine-r
|
||||
complete -c am -n "__fish_am_using_subcommand update" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand update" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand search" -l category -d 'Restrict to this category' -r
|
||||
complete -c am -n "__fish_am_using_subcommand search" -l tag -d 'Only agents carrying this personal tag' -r
|
||||
complete -c am -n "__fish_am_using_subcommand search" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand search" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand search" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand search" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand search" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
@@ -145,7 +489,24 @@ complete -c am -n "__fish_am_using_subcommand search" -l dry-run -d 'Simulate th
|
||||
complete -c am -n "__fish_am_using_subcommand search" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand search" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand search" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand history" -l kind -d 'Only commands of this kind (am or shell)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand history" -l cwd -d 'Only commands run in this directory' -r
|
||||
complete -c am -n "__fish_am_using_subcommand history" -l search -d 'Full-text search in the command line' -r
|
||||
complete -c am -n "__fish_am_using_subcommand history" -l session -d 'Only commands of this session' -r
|
||||
complete -c am -n "__fish_am_using_subcommand history" -l limit -d 'Maximum number of entries (default: 100)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand history" -l rerun -d 'Re-run the Nth most recent entry (with confirmation)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand history" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand history" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand history" -l failed -d 'Only failed commands'
|
||||
complete -c am -n "__fish_am_using_subcommand history" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand history" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand history" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand history" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand history" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand history" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand history" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand info" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand info" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand info" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand info" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand info" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
@@ -153,21 +514,52 @@ complete -c am -n "__fish_am_using_subcommand info" -l dry-run -d 'Simulate the
|
||||
complete -c am -n "__fish_am_using_subcommand info" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand info" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand info" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add help" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add help" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add help" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add help" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add help" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add help" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add help" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add help" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add help" -f -a "show" -d 'Print the effective (merged) configuration as YAML'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add help" -f -a "path" -d 'Print the location of the configuration file(s)'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add help" -f -a "edit" -d 'Open the user configuration file in your editor'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add help" -f -a "validate" -d 'Validate the configuration file(s)'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add help" -f -a "add" -d 'Add another agent definition file to the user configuration'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
|
||||
complete -c am -n "__fish_am_using_subcommand init" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand init" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand init" -l force -d 'Overwrite an existing agent-manager.yaml'
|
||||
complete -c am -n "__fish_am_using_subcommand init" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand init" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand init" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand init" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand init" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand init" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand init" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand help" -l find -d 'Search through all help commands table' -r
|
||||
complete -c am -n "__fish_am_using_subcommand help" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand help" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand help" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand help" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand help" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand help" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand help" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand help" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand help" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand version" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand version" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand version" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand version" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand version" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand version" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand version" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand version" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand version" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add set" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add set" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add set" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add set" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add set" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add set" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add set" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add set" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add set" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add set" -f -a "show" -d 'Print the effective (merged) configuration as YAML'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add set" -f -a "path" -d 'Print the location of the configuration file(s)'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add set" -f -a "edit" -d 'Open the user configuration file in your editor'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add set" -f -a "validate" -d 'Validate the configuration file(s)'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add set" -f -a "add" -d 'Add another agent definition file to the user configuration'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and not __fish_seen_subcommand_from show path edit validate add set" -f -a "set" -d 'Set one configuration key without an editor (config set settings.default_shell pwsh)'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from show" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from show" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from show" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from show" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from show" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
@@ -176,6 +568,7 @@ complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from show" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from show" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from path" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from path" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from path" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from path" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from path" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
@@ -184,6 +577,7 @@ complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from path" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from path" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from edit" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from edit" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from edit" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from edit" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from edit" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
@@ -192,6 +586,7 @@ complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from edit" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from edit" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from validate" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from validate" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from validate" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from validate" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from validate" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
@@ -200,6 +595,7 @@ complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from validate" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from validate" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from add" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from add" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from add" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from add" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from add" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
@@ -207,13 +603,17 @@ complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from add" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from add" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from add" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from help" -f -a "show" -d 'Print the effective (merged) configuration as YAML'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from help" -f -a "path" -d 'Print the location of the configuration file(s)'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from help" -f -a "edit" -d 'Open the user configuration file in your editor'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from help" -f -a "validate" -d 'Validate the configuration file(s)'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from help" -f -a "add" -d 'Add another agent definition file to the user configuration'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from set" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from set" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from set" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from set" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from set" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from set" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from set" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from set" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand config; and __fish_seen_subcommand_from set" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand doctor" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand doctor" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand doctor" -l fix -d 'Attempt to repair problems (create directories, fix the state file)'
|
||||
complete -c am -n "__fish_am_using_subcommand doctor" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand doctor" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
@@ -223,6 +623,7 @@ complete -c am -n "__fish_am_using_subcommand doctor" -l json -d 'Emit machine-r
|
||||
complete -c am -n "__fish_am_using_subcommand doctor" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand doctor" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand run" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand run" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand run" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand run" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand run" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
@@ -231,6 +632,8 @@ complete -c am -n "__fish_am_using_subcommand run" -l json -d 'Emit machine-read
|
||||
complete -c am -n "__fish_am_using_subcommand run" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand run" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand completion" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand completion" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand completion" -l installed -d 'Add dynamic completion of the installed agents, aliases and groups (queried from \'am _agents\' at Tab time)'
|
||||
complete -c am -n "__fish_am_using_subcommand completion" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand completion" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand completion" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
@@ -240,6 +643,7 @@ complete -c am -n "__fish_am_using_subcommand completion" -l no-color -d 'Disabl
|
||||
complete -c am -n "__fish_am_using_subcommand completion" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand self-update" -l to -d 'Download the new binary to this path instead of replacing the current one' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand self-update" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand self-update" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand self-update" -l check -d 'Only check whether a newer version exists'
|
||||
complete -c am -n "__fish_am_using_subcommand self-update" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand self-update" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
@@ -248,8 +652,18 @@ complete -c am -n "__fish_am_using_subcommand self-update" -l dry-run -d 'Simula
|
||||
complete -c am -n "__fish_am_using_subcommand self-update" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand self-update" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand self-update" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand self-uninstall" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand self-uninstall" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand self-uninstall" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand self-uninstall" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand self-uninstall" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
complete -c am -n "__fish_am_using_subcommand self-uninstall" -l dry-run -d 'Simulate the action without changing anything'
|
||||
complete -c am -n "__fish_am_using_subcommand self-uninstall" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand self-uninstall" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand self-uninstall" -s h -l help -d 'Print help (see more with \'--help\')'
|
||||
complete -c am -n "__fish_am_using_subcommand export" -l output -d 'Output file (default: am-export.json)' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand export" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand export" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand export" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand export" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand export" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
@@ -258,6 +672,7 @@ complete -c am -n "__fish_am_using_subcommand export" -l json -d 'Emit machine-r
|
||||
complete -c am -n "__fish_am_using_subcommand export" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand export" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand import" -s c -l config -d 'Use an alternate configuration file' -r -F
|
||||
complete -c am -n "__fish_am_using_subcommand import" -l theme -d 'Color theme for the output (see \'am help theme\' for the list)' -r
|
||||
complete -c am -n "__fish_am_using_subcommand import" -s v -l verbose -d 'Verbose output: show every command executed and its details'
|
||||
complete -c am -n "__fish_am_using_subcommand import" -s q -l quiet -d 'Quiet mode: only errors are printed'
|
||||
complete -c am -n "__fish_am_using_subcommand import" -s y -l yes -d 'Answer yes to every confirmation prompt'
|
||||
@@ -265,26 +680,3 @@ complete -c am -n "__fish_am_using_subcommand import" -l dry-run -d 'Simulate th
|
||||
complete -c am -n "__fish_am_using_subcommand import" -l json -d 'Emit machine-readable JSON on stdout (for scripts)'
|
||||
complete -c am -n "__fish_am_using_subcommand import" -l no-color -d 'Disable ANSI colors'
|
||||
complete -c am -n "__fish_am_using_subcommand import" -s h -l help -d 'Print help'
|
||||
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from list start stop restart status install uninstall update search info config doctor run completion self-update export import help" -f -a "list" -d 'List agents: installed ones, or every agent known to the catalog'
|
||||
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from list start stop restart status install uninstall update search info config doctor run completion self-update export import help" -f -a "start" -d 'Start an agent (foreground by default, or detached with --background)'
|
||||
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from list start stop restart status install uninstall update search info config doctor run completion self-update export import help" -f -a "stop" -d 'Stop a background agent (SIGTERM, then SIGKILL after the timeout)'
|
||||
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from list start stop restart status install uninstall update search info config doctor run completion self-update export import help" -f -a "restart" -d 'Restart an agent: stop, then start with the same options'
|
||||
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from list start stop restart status install uninstall update search info config doctor run completion self-update export import help" -f -a "status" -d 'Show the state of one agent, or of every installed agent'
|
||||
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from list start stop restart status install uninstall update search info config doctor run completion self-update export import help" -f -a "install" -d 'Install an agent and its dependencies'
|
||||
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from list start stop restart status install uninstall update search info config doctor run completion self-update export import help" -f -a "uninstall" -d 'Uninstall an agent and clean its files'
|
||||
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from list start stop restart status install uninstall update search info config doctor run completion self-update export import help" -f -a "update" -d 'Update an installed agent to the latest available version'
|
||||
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from list start stop restart status install uninstall update search info config doctor run completion self-update export import help" -f -a "search" -d 'Search the catalog by keyword (name, description, category, tags)'
|
||||
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from list start stop restart status install uninstall update search info config doctor run completion self-update export import help" -f -a "info" -d 'Show detailed information about one agent'
|
||||
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from list start stop restart status install uninstall update search info config doctor run completion self-update export import help" -f -a "config" -d 'Manage the configuration file'
|
||||
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from list start stop restart status install uninstall update search info config doctor run completion self-update export import help" -f -a "doctor" -d 'Check the environment: tools, config validity, paths, permissions'
|
||||
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from list start stop restart status install uninstall update search info config doctor run completion self-update export import help" -f -a "run" -d 'Run the agent command directly with the given arguments (no process management)'
|
||||
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from list start stop restart status install uninstall update search info config doctor run completion self-update export import help" -f -a "completion" -d 'Generate a shell completion script'
|
||||
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from list start stop restart status install uninstall update search info config doctor run completion self-update export import help" -f -a "self-update" -d 'Update agent-manager itself from GitHub Releases'
|
||||
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from list start stop restart status install uninstall update search info config doctor run completion self-update export import help" -f -a "export" -d 'Export the configuration and installation state (backup)'
|
||||
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from list start stop restart status install uninstall update search info config doctor run completion self-update export import help" -f -a "import" -d 'Import a previously exported configuration and state'
|
||||
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from list start stop restart status install uninstall update search info config doctor run completion self-update export import help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
|
||||
complete -c am -n "__fish_am_using_subcommand help; and __fish_seen_subcommand_from config" -f -a "show" -d 'Print the effective (merged) configuration as YAML'
|
||||
complete -c am -n "__fish_am_using_subcommand help; and __fish_seen_subcommand_from config" -f -a "path" -d 'Print the location of the configuration file(s)'
|
||||
complete -c am -n "__fish_am_using_subcommand help; and __fish_seen_subcommand_from config" -f -a "edit" -d 'Open the user configuration file in your editor'
|
||||
complete -c am -n "__fish_am_using_subcommand help; and __fish_seen_subcommand_from config" -f -a "validate" -d 'Validate the configuration file(s)'
|
||||
complete -c am -n "__fish_am_using_subcommand help; and __fish_seen_subcommand_from config" -f -a "add" -d 'Add another agent definition file to the user configuration'
|
||||
|
||||
+2
-1
@@ -18,7 +18,8 @@ settings:
|
||||
auto_install_deps: true # offer to install missing dependencies
|
||||
confirm_before_run: true # confirm before running install scripts
|
||||
stop_timeout_secs: 5 # SIGTERM grace period before SIGKILL
|
||||
self_update_repo: null # e.g. "you/agent-manager" for am self-update
|
||||
self_update_repo: Projets/agent-manager # repo used by am self-update (release assets)
|
||||
self_update_base_url: https://git.dracodev.net/api/v1 # serveur de release (Gitea ici; GitHub: https://api.github.com)
|
||||
|
||||
# --- Command aliases ----------------------------------------------------------
|
||||
aliases:
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-alias 1 "alias "
|
||||
.SH NAME
|
||||
alias \- Manage command aliases (cc \-> claude\-code)
|
||||
.SH SYNOPSIS
|
||||
\fBalias\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIsubcommands\fR>
|
||||
.SH DESCRIPTION
|
||||
Manage command aliases (cc \-> claude\-code)
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.SH SUBCOMMANDS
|
||||
.TP
|
||||
alias\-add(1)
|
||||
Add an alias (am alias add cc claude\-code)
|
||||
.TP
|
||||
alias\-remove(1)
|
||||
Remove an alias
|
||||
.TP
|
||||
alias\-list(1)
|
||||
List every alias
|
||||
.TP
|
||||
alias\-help(1)
|
||||
Print this message or the help of the given subcommand(s)
|
||||
@@ -0,0 +1,35 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-completion 1 "completion "
|
||||
.SH NAME
|
||||
completion \- Generate a shell completion script
|
||||
.SH SYNOPSIS
|
||||
\fBcompletion\fR [\fB\-\-installed\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fISHELL\fR>
|
||||
.SH DESCRIPTION
|
||||
Generate a shell completion script
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-\-installed\fR
|
||||
Add dynamic completion of the installed agents, aliases and groups (queried from \*(Aqam _agents\*(Aq at Tab time)
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.TP
|
||||
<\fISHELL\fR>
|
||||
Shell to generate completions for
|
||||
.br
|
||||
|
||||
.br
|
||||
\fIPossible values:\fR
|
||||
.RS 14
|
||||
.IP \(bu 2
|
||||
bash
|
||||
.IP \(bu 2
|
||||
elvish
|
||||
.IP \(bu 2
|
||||
fish
|
||||
.IP \(bu 2
|
||||
powershell
|
||||
.IP \(bu 2
|
||||
zsh
|
||||
.RE
|
||||
@@ -0,0 +1,35 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-config 1 "config "
|
||||
.SH NAME
|
||||
config \- Manage the configuration file
|
||||
.SH SYNOPSIS
|
||||
\fBconfig\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIsubcommands\fR>
|
||||
.SH DESCRIPTION
|
||||
Manage the configuration file
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.SH SUBCOMMANDS
|
||||
.TP
|
||||
config\-show(1)
|
||||
Print the effective (merged) configuration as YAML
|
||||
.TP
|
||||
config\-path(1)
|
||||
Print the location of the configuration file(s)
|
||||
.TP
|
||||
config\-edit(1)
|
||||
Open the user configuration file in your editor
|
||||
.TP
|
||||
config\-validate(1)
|
||||
Validate the configuration file(s)
|
||||
.TP
|
||||
config\-add(1)
|
||||
Add another agent definition file to the user configuration
|
||||
.TP
|
||||
config\-set(1)
|
||||
Set one configuration key without an editor (config set settings.default_shell pwsh)
|
||||
.TP
|
||||
config\-help(1)
|
||||
Print this message or the help of the given subcommand(s)
|
||||
@@ -0,0 +1,13 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-dashboard 1 "dashboard "
|
||||
.SH NAME
|
||||
dashboard \- Live TUI dashboard: overview, activity, stats, sessions, projects
|
||||
.SH SYNOPSIS
|
||||
\fBdashboard\fR [\fB\-h\fR|\fB\-\-help\fR]
|
||||
.SH DESCRIPTION
|
||||
Live TUI dashboard: overview, activity, stats, sessions, projects
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
@@ -0,0 +1,16 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-doctor 1 "doctor "
|
||||
.SH NAME
|
||||
doctor \- Check the environment: tools, config validity, paths, permissions
|
||||
.SH SYNOPSIS
|
||||
\fBdoctor\fR [\fB\-\-fix\fR] [\fB\-h\fR|\fB\-\-help\fR]
|
||||
.SH DESCRIPTION
|
||||
Check the environment: tools, config validity, paths, permissions
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-\-fix\fR
|
||||
Attempt to repair problems (create directories, fix the state file)
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
@@ -0,0 +1,16 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-export 1 "export "
|
||||
.SH NAME
|
||||
export \- Export the configuration and installation state (backup)
|
||||
.SH SYNOPSIS
|
||||
\fBexport\fR [\fB\-\-output\fR] [\fB\-h\fR|\fB\-\-help\fR]
|
||||
.SH DESCRIPTION
|
||||
Export the configuration and installation state (backup)
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-\-output\fR \fI<FILE>\fR [default: am\-export.json]
|
||||
Output file (default: am\-export.json)
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
@@ -0,0 +1,16 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-favorite 1 "favorite "
|
||||
.SH NAME
|
||||
favorite \- Mark an agent as a favorite (star in list and status)
|
||||
.SH SYNOPSIS
|
||||
\fBfavorite\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIAGENT\fR>
|
||||
.SH DESCRIPTION
|
||||
Mark an agent as a favorite (star in list and status)
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.TP
|
||||
<\fIAGENT\fR>
|
||||
Agent name or alias
|
||||
@@ -0,0 +1,19 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-help 1 "help "
|
||||
.SH NAME
|
||||
help \- Display help: the overview, a command, the command list, or a search
|
||||
.SH SYNOPSIS
|
||||
\fBhelp\fR [\fB\-\-find\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fICOMMAND\fR]
|
||||
.SH DESCRIPTION
|
||||
Display help: the overview, a command, the command list, or a search
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-\-find\fR \fI<TEXT>\fR
|
||||
Search through all help commands table
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.TP
|
||||
[\fICOMMAND\fR]
|
||||
Command name (also accepts an agent name or alias); "commands" lists every command
|
||||
@@ -0,0 +1,34 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-history 1 "history "
|
||||
.SH NAME
|
||||
history \- Search the command history (am and shell commands)
|
||||
.SH SYNOPSIS
|
||||
\fBhistory\fR [\fB\-\-kind\fR] [\fB\-\-cwd\fR] [\fB\-\-search\fR] [\fB\-\-failed\fR] [\fB\-\-session\fR] [\fB\-\-limit\fR] [\fB\-\-rerun\fR] [\fB\-h\fR|\fB\-\-help\fR]
|
||||
.SH DESCRIPTION
|
||||
Search the command history (am and shell commands)
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-\-kind\fR \fI<KIND>\fR
|
||||
Only commands of this kind (am or shell)
|
||||
.TP
|
||||
\fB\-\-cwd\fR \fI<DIR>\fR
|
||||
Only commands run in this directory
|
||||
.TP
|
||||
\fB\-\-search\fR \fI<TEXT>\fR
|
||||
Full\-text search in the command line
|
||||
.TP
|
||||
\fB\-\-failed\fR
|
||||
Only failed commands
|
||||
.TP
|
||||
\fB\-\-session\fR \fI<ID>\fR
|
||||
Only commands of this session
|
||||
.TP
|
||||
\fB\-\-limit\fR \fI<N>\fR [default: 100]
|
||||
Maximum number of entries (default: 100)
|
||||
.TP
|
||||
\fB\-\-rerun\fR \fI<N>\fR
|
||||
Re\-run the Nth most recent entry (with confirmation)
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
@@ -0,0 +1,16 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-import 1 "import "
|
||||
.SH NAME
|
||||
import \- Import a previously exported configuration and state
|
||||
.SH SYNOPSIS
|
||||
\fBimport\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIFILE\fR>
|
||||
.SH DESCRIPTION
|
||||
Import a previously exported configuration and state
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.TP
|
||||
<\fIFILE\fR>
|
||||
File exported by the export command
|
||||
@@ -0,0 +1,16 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-info 1 "info "
|
||||
.SH NAME
|
||||
info \- Show detailed information about one agent
|
||||
.SH SYNOPSIS
|
||||
\fBinfo\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIAGENT\fR>
|
||||
.SH DESCRIPTION
|
||||
Show detailed information about one agent
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.TP
|
||||
<\fIAGENT\fR>
|
||||
Agent name or alias
|
||||
@@ -0,0 +1,16 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-init 1 "init "
|
||||
.SH NAME
|
||||
init \- Generate a local agent\-manager.yaml for the current directory
|
||||
.SH SYNOPSIS
|
||||
\fBinit\fR [\fB\-\-force\fR] [\fB\-h\fR|\fB\-\-help\fR]
|
||||
.SH DESCRIPTION
|
||||
Generate a local agent\-manager.yaml for the current directory
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-\-force\fR
|
||||
Overwrite an existing agent\-manager.yaml
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
@@ -0,0 +1,22 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-install 1 "install "
|
||||
.SH NAME
|
||||
install \- Install an agent and its dependencies
|
||||
.SH SYNOPSIS
|
||||
\fBinstall\fR [\fB\-\-method\fR] [\fB\-\-force\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIAGENT\fR>
|
||||
.SH DESCRIPTION
|
||||
Install an agent and its dependencies
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-\-method\fR \fI<METHOD>\fR
|
||||
Select the install method (index, or type: npm, pip, uv, cargo, go, bun, curl, binary, git)
|
||||
.TP
|
||||
\fB\-\-force\fR
|
||||
Reinstall even if already installed
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.TP
|
||||
<\fIAGENT\fR>
|
||||
Agent name or alias
|
||||
@@ -0,0 +1,25 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-list 1 "list "
|
||||
.SH NAME
|
||||
list \- List installed agents (default); use \-\-all for the whole catalog
|
||||
.SH SYNOPSIS
|
||||
\fBlist\fR [\fB\-\-all\fR] [\fB\-\-category\fR] [\fB\-\-running\fR] [\fB\-\-sort\fR] [\fB\-h\fR|\fB\-\-help\fR]
|
||||
.SH DESCRIPTION
|
||||
List installed agents (default); use \-\-all for the whole catalog
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-\-all\fR
|
||||
Show every agent known to the catalog, not only the installed ones
|
||||
.TP
|
||||
\fB\-\-category\fR \fI<CATEGORY>\fR
|
||||
Only show agents of this category
|
||||
.TP
|
||||
\fB\-\-running\fR
|
||||
Only show running agents
|
||||
.TP
|
||||
\fB\-\-sort\fR \fI<KEY>\fR
|
||||
Sort by name, version or status (default: name)
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
@@ -0,0 +1,28 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-log 1 "log "
|
||||
.SH NAME
|
||||
log \- Read the event journal: everything am did
|
||||
.SH SYNOPSIS
|
||||
\fBlog\fR [\fB\-\-kind\fR] [\fB\-\-since\fR] [\fB\-\-limit\fR] [\fB\-\-follow\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIAGENT\fR]
|
||||
.SH DESCRIPTION
|
||||
Read the event journal: everything am did
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-\-kind\fR \fI<KINDS>\fR
|
||||
Only these event kinds (comma separated: start,stop,run,install,...)
|
||||
.TP
|
||||
\fB\-\-since\fR \fI<DATE>\fR
|
||||
Only events at or after this date (YYYY\-MM\-DD or RFC 3339)
|
||||
.TP
|
||||
\fB\-\-limit\fR \fI<N>\fR [default: 50]
|
||||
Maximum number of events (default: 50)
|
||||
.TP
|
||||
\fB\-\-follow\fR
|
||||
Follow the journal as new events arrive
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.TP
|
||||
[\fIAGENT\fR]
|
||||
Only events of this agent
|
||||
@@ -0,0 +1,22 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-logs 1 "logs "
|
||||
.SH NAME
|
||||
logs \- Tail the log file of an agent (\-\-follow for a live view)
|
||||
.SH SYNOPSIS
|
||||
\fBlogs\fR [\fB\-\-lines\fR] [\fB\-\-follow\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIAGENT\fR>
|
||||
.SH DESCRIPTION
|
||||
Tail the log file of an agent (\-\-follow for a live view)
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-\-lines\fR \fI<N>\fR [default: 20]
|
||||
Number of lines to show (default: 20)
|
||||
.TP
|
||||
\fB\-\-follow\fR
|
||||
Follow the log as it grows
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.TP
|
||||
<\fIAGENT\fR>
|
||||
Agent name or alias
|
||||
@@ -0,0 +1,19 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-man 1 "man "
|
||||
.SH NAME
|
||||
man \- Generate a man page for am (or for one command)
|
||||
.SH SYNOPSIS
|
||||
\fBman\fR [\fB\-\-output\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fICOMMAND\fR]
|
||||
.SH DESCRIPTION
|
||||
Generate a man page for am (or for one command)
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-\-output\fR \fI<DIR>\fR
|
||||
Write the page(s) to this directory instead of stdout
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.TP
|
||||
[\fICOMMAND\fR]
|
||||
Command name (omit for the whole CLI)
|
||||
@@ -0,0 +1,19 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-note 1 "note "
|
||||
.SH NAME
|
||||
note \- Attach a free\-form note to an agent (shown in \*(Aqam info\*(Aq); \*(Aqam note <agent>\*(Aq without text prints the current note
|
||||
.SH SYNOPSIS
|
||||
\fBnote\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIAGENT\fR> [\fITEXT...\fR]
|
||||
.SH DESCRIPTION
|
||||
Attach a free\-form note to an agent (shown in \*(Aqam info\*(Aq); \*(Aqam note <agent>\*(Aq without text prints the current note
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.TP
|
||||
<\fIAGENT\fR>
|
||||
Agent name or alias
|
||||
.TP
|
||||
[\fITEXT...\fR]
|
||||
Note text (several words are joined); empty prints the note
|
||||
@@ -0,0 +1,16 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-open 1 "open "
|
||||
.SH NAME
|
||||
open \- Open an agent\*(Aqs installation directory in the file manager
|
||||
.SH SYNOPSIS
|
||||
\fBopen\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIAGENT\fR>
|
||||
.SH DESCRIPTION
|
||||
Open an agent\*(Aqs installation directory in the file manager
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.TP
|
||||
<\fIAGENT\fR>
|
||||
Agent name or alias
|
||||
@@ -0,0 +1,23 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-profile 1 "profile "
|
||||
.SH NAME
|
||||
profile \- Manage environment profiles (dev, prod, ...)
|
||||
.SH SYNOPSIS
|
||||
\fBprofile\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIsubcommands\fR>
|
||||
.SH DESCRIPTION
|
||||
Manage environment profiles (dev, prod, ...)
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.SH SUBCOMMANDS
|
||||
.TP
|
||||
profile\-list(1)
|
||||
List every defined profile
|
||||
.TP
|
||||
profile\-show(1)
|
||||
Show one profile in detail (agent, env, args)
|
||||
.TP
|
||||
profile\-help(1)
|
||||
Print this message or the help of the given subcommand(s)
|
||||
@@ -0,0 +1,16 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-projects 1 "projects "
|
||||
.SH NAME
|
||||
projects \- Show which agent works on which project
|
||||
.SH SYNOPSIS
|
||||
\fBprojects\fR [\fB\-h\fR|\fB\-\-help\fR] [\fINAME\fR]
|
||||
.SH DESCRIPTION
|
||||
Show which agent works on which project
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.TP
|
||||
[\fINAME\fR]
|
||||
Project name (omit to list every project)
|
||||
@@ -0,0 +1,22 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-report 1 "report "
|
||||
.SH NAME
|
||||
report \- Write a markdown activity report
|
||||
.SH SYNOPSIS
|
||||
\fBreport\fR [\fB\-\-last\-week\fR] [\fB\-\-last\-month\fR] [\fB\-\-output\fR] [\fB\-h\fR|\fB\-\-help\fR]
|
||||
.SH DESCRIPTION
|
||||
Write a markdown activity report
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-\-last\-week\fR
|
||||
Cover the last 7 days
|
||||
.TP
|
||||
\fB\-\-last\-month\fR
|
||||
Cover the last 30 days
|
||||
.TP
|
||||
\fB\-\-output\fR \fI<FILE>\fR
|
||||
Output file (default: report\-YYYYMMDD.md in the state directory)
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
@@ -0,0 +1,40 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-restart 1 "restart "
|
||||
.SH NAME
|
||||
restart \- Restart an agent: stop, then start with the same options
|
||||
.SH SYNOPSIS
|
||||
\fBrestart\fR [\fB\-b\fR|\fB\-\-background\fR] [\fB\-f\fR|\fB\-\-foreground\fR] [\fB\-\-args\fR] [\fB\-\-env\fR] [\fB\-\-notify\fR] [\fB\-\-profile\fR] [\fB\-\-force\fR] [\fB\-\-timeout\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIAGENT\fR]
|
||||
.SH DESCRIPTION
|
||||
Restart an agent: stop, then start with the same options
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-b\fR, \fB\-\-background\fR
|
||||
Run detached in the background; output goes to the agent log file
|
||||
.TP
|
||||
\fB\-f\fR, \fB\-\-foreground\fR
|
||||
Run in the foreground, attached to this terminal (the default)
|
||||
.TP
|
||||
\fB\-\-args\fR [\fI<ARGS>...\fR]
|
||||
Extra arguments passed to the agent (repeatable; quoted strings are split on spaces)
|
||||
.TP
|
||||
\fB\-\-env\fR \fI<KEY=VALUE>\fR
|
||||
Set an environment variable for the agent (repeatable): \-\-env KEY=VALUE
|
||||
.TP
|
||||
\fB\-\-notify\fR
|
||||
Send a desktop notification once the agent has started
|
||||
.TP
|
||||
\fB\-\-profile\fR \fI<NAME>\fR
|
||||
Apply an environment profile (env + args, defined in the config)
|
||||
.TP
|
||||
\fB\-\-force\fR
|
||||
Kill immediately instead of terminating gracefully
|
||||
.TP
|
||||
\fB\-\-timeout\fR \fI<SECS>\fR
|
||||
Grace period in seconds before killing (default: from config, 5s)
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.TP
|
||||
[\fIAGENT\fR]
|
||||
Agent name, alias, or group:<name> (defaults to the project\*(Aqs default agent)
|
||||
@@ -0,0 +1,19 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-run 1 "run "
|
||||
.SH NAME
|
||||
run \- Run the agent command directly with the given arguments (no process management)
|
||||
.SH SYNOPSIS
|
||||
\fBrun\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIAGENT\fR> [\fIARGS...\fR]
|
||||
.SH DESCRIPTION
|
||||
Run the agent command directly with the given arguments (no process management)
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.TP
|
||||
<\fIAGENT\fR>
|
||||
Agent name or alias
|
||||
.TP
|
||||
[\fIARGS...\fR]
|
||||
Arguments passed through to the agent command
|
||||
@@ -0,0 +1,22 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-search 1 "search "
|
||||
.SH NAME
|
||||
search \- Search the catalog by keyword (name, description, category, tags)
|
||||
.SH SYNOPSIS
|
||||
\fBsearch\fR [\fB\-\-category\fR] [\fB\-\-tag\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIKEYWORD\fR]
|
||||
.SH DESCRIPTION
|
||||
Search the catalog by keyword (name, description, category, tags)
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-\-category\fR \fI<CATEGORY>\fR
|
||||
Restrict to this category
|
||||
.TP
|
||||
\fB\-\-tag\fR \fI<TAG>\fR
|
||||
Only agents carrying this personal tag
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.TP
|
||||
[\fIKEYWORD\fR]
|
||||
Keyword to search for (case\-insensitive substring)
|
||||
@@ -0,0 +1,26 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-secret 1 "secret "
|
||||
.SH NAME
|
||||
secret \- Manage secrets in the OS keyring (never in plaintext config)
|
||||
.SH SYNOPSIS
|
||||
\fBsecret\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIsubcommands\fR>
|
||||
.SH DESCRIPTION
|
||||
Manage secrets in the OS keyring (never in plaintext config)
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.SH SUBCOMMANDS
|
||||
.TP
|
||||
secret\-set(1)
|
||||
Store a secret for an agent
|
||||
.TP
|
||||
secret\-unset(1)
|
||||
Remove a secret
|
||||
.TP
|
||||
secret\-list(1)
|
||||
List stored secret names (values are never shown)
|
||||
.TP
|
||||
secret\-help(1)
|
||||
Print this message or the help of the given subcommand(s)
|
||||
@@ -0,0 +1,15 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-self-uninstall 1 "self-uninstall "
|
||||
.SH NAME
|
||||
self\-uninstall \- Remove agent\-manager and everything it created from this machine
|
||||
.SH SYNOPSIS
|
||||
\fBself\-uninstall\fR [\fB\-h\fR|\fB\-\-help\fR]
|
||||
.SH DESCRIPTION
|
||||
Remove agent\-manager and everything it created from this machine
|
||||
.PP
|
||||
Stops every managed background agent, then deletes the data, state and configuration directories, and finally the executable itself. Combine with \-\-yes for a fully automated one\-liner.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help (see a summary with \*(Aq\-h\*(Aq)
|
||||
@@ -0,0 +1,19 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-self-update 1 "self-update "
|
||||
.SH NAME
|
||||
self\-update \- Update agent\-manager itself from GitHub Releases
|
||||
.SH SYNOPSIS
|
||||
\fBself\-update\fR [\fB\-\-check\fR] [\fB\-\-to\fR] [\fB\-h\fR|\fB\-\-help\fR]
|
||||
.SH DESCRIPTION
|
||||
Update agent\-manager itself from GitHub Releases
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-\-check\fR
|
||||
Only check whether a newer version exists
|
||||
.TP
|
||||
\fB\-\-to\fR \fI<FILE>\fR
|
||||
Download the new binary to this path instead of replacing the current one
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
@@ -0,0 +1,28 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-sessions 1 "sessions "
|
||||
.SH NAME
|
||||
sessions \- List the sessions of every agent (and of the interactive shell)
|
||||
.SH SYNOPSIS
|
||||
\fBsessions\fR [\fB\-\-project\fR] [\fB\-\-status\fR] [\fB\-\-show\fR] [\fB\-\-resume\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIAGENT\fR]
|
||||
.SH DESCRIPTION
|
||||
List the sessions of every agent (and of the interactive shell)
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-\-project\fR \fI<PROJECT>\fR
|
||||
Only sessions of this project
|
||||
.TP
|
||||
\fB\-\-status\fR \fI<STATUS>\fR
|
||||
Only sessions with this status (running, stopped, failed, interrupted)
|
||||
.TP
|
||||
\fB\-\-show\fR \fI<ID>\fR
|
||||
Show one session in detail (summary + log excerpt)
|
||||
.TP
|
||||
\fB\-\-resume\fR \fI<ID>\fR
|
||||
Resume a finished session: relaunch the agent with its recorded arguments
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.TP
|
||||
[\fIAGENT\fR]
|
||||
Only sessions of this agent
|
||||
@@ -0,0 +1,34 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-start 1 "start "
|
||||
.SH NAME
|
||||
start \- Start an agent (foreground by default, or detached with \-\-background)
|
||||
.SH SYNOPSIS
|
||||
\fBstart\fR [\fB\-b\fR|\fB\-\-background\fR] [\fB\-f\fR|\fB\-\-foreground\fR] [\fB\-\-args\fR] [\fB\-\-env\fR] [\fB\-\-notify\fR] [\fB\-\-profile\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIAGENT\fR]
|
||||
.SH DESCRIPTION
|
||||
Start an agent (foreground by default, or detached with \-\-background)
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-b\fR, \fB\-\-background\fR
|
||||
Run detached in the background; output goes to the agent log file
|
||||
.TP
|
||||
\fB\-f\fR, \fB\-\-foreground\fR
|
||||
Run in the foreground, attached to this terminal (the default)
|
||||
.TP
|
||||
\fB\-\-args\fR [\fI<ARGS>...\fR]
|
||||
Extra arguments passed to the agent (repeatable; quoted strings are split on spaces)
|
||||
.TP
|
||||
\fB\-\-env\fR \fI<KEY=VALUE>\fR
|
||||
Set an environment variable for the agent (repeatable): \-\-env KEY=VALUE
|
||||
.TP
|
||||
\fB\-\-notify\fR
|
||||
Send a desktop notification once the agent has started
|
||||
.TP
|
||||
\fB\-\-profile\fR \fI<NAME>\fR
|
||||
Apply an environment profile (env + args, defined in the config)
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.TP
|
||||
[\fIAGENT\fR]
|
||||
Agent name, alias, or group:<name> (defaults to the project\*(Aqs default agent)
|
||||
@@ -0,0 +1,19 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-stats 1 "stats "
|
||||
.SH NAME
|
||||
stats \- Show usage statistics computed from the event journal
|
||||
.SH SYNOPSIS
|
||||
\fBstats\fR [\fB\-\-period\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIAGENT\fR]
|
||||
.SH DESCRIPTION
|
||||
Show usage statistics computed from the event journal
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-\-period\fR \fI<PERIOD>\fR
|
||||
Only events of the last period (7d, 30d, 90d, all)
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.TP
|
||||
[\fIAGENT\fR]
|
||||
Agent name or alias (omit for the global view)
|
||||
@@ -0,0 +1,16 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-status 1 "status "
|
||||
.SH NAME
|
||||
status \- Show the state of one agent, or of every installed agent
|
||||
.SH SYNOPSIS
|
||||
\fBstatus\fR [\fB\-h\fR|\fB\-\-help\fR] [\fIAGENT\fR]
|
||||
.SH DESCRIPTION
|
||||
Show the state of one agent, or of every installed agent
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.TP
|
||||
[\fIAGENT\fR]
|
||||
Agent name or alias (omit to show all installed agents)
|
||||
@@ -0,0 +1,22 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-stop 1 "stop "
|
||||
.SH NAME
|
||||
stop \- Stop a background agent (SIGTERM, then SIGKILL after the timeout)
|
||||
.SH SYNOPSIS
|
||||
\fBstop\fR [\fB\-\-force\fR] [\fB\-\-timeout\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIAGENT\fR>
|
||||
.SH DESCRIPTION
|
||||
Stop a background agent (SIGTERM, then SIGKILL after the timeout)
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-\-force\fR
|
||||
Kill immediately instead of terminating gracefully
|
||||
.TP
|
||||
\fB\-\-timeout\fR \fI<SECS>\fR
|
||||
Grace period in seconds before killing (default: from config, 5s)
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.TP
|
||||
<\fIAGENT\fR>
|
||||
Agent name, alias, or group:<name>
|
||||
@@ -0,0 +1,19 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-tag 1 "tag "
|
||||
.SH NAME
|
||||
tag \- Add a personal tag to an agent
|
||||
.SH SYNOPSIS
|
||||
\fBtag\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIAGENT\fR> <\fITAG\fR>
|
||||
.SH DESCRIPTION
|
||||
Add a personal tag to an agent
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.TP
|
||||
<\fIAGENT\fR>
|
||||
Agent name or alias
|
||||
.TP
|
||||
<\fITAG\fR>
|
||||
One or more tags to add
|
||||
@@ -0,0 +1,16 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-tags 1 "tags "
|
||||
.SH NAME
|
||||
tags \- List personal tags (with counts), optionally for one agent
|
||||
.SH SYNOPSIS
|
||||
\fBtags\fR [\fB\-h\fR|\fB\-\-help\fR] [\fIAGENT\fR]
|
||||
.SH DESCRIPTION
|
||||
List personal tags (with counts), optionally for one agent
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.TP
|
||||
[\fIAGENT\fR]
|
||||
Only show the tags of this agent
|
||||
@@ -0,0 +1,25 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-timeline 1 "timeline "
|
||||
.SH NAME
|
||||
timeline \- One chronological view of every activity (journal + REPL history)
|
||||
.SH SYNOPSIS
|
||||
\fBtimeline\fR [\fB\-\-project\fR] [\fB\-\-since\fR] [\fB\-\-limit\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIAGENT\fR]
|
||||
.SH DESCRIPTION
|
||||
One chronological view of every activity (journal + REPL history)
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-\-project\fR \fI<PROJECT>\fR
|
||||
Only activity of this project
|
||||
.TP
|
||||
\fB\-\-since\fR \fI<DATE>\fR
|
||||
Only activity at or after this date (YYYY\-MM\-DD or RFC 3339)
|
||||
.TP
|
||||
\fB\-\-limit\fR \fI<N>\fR [default: 50]
|
||||
Maximum number of entries (default: 50)
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.TP
|
||||
[\fIAGENT\fR]
|
||||
Only activity of this agent
|
||||
@@ -0,0 +1,16 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-top 1 "top "
|
||||
.SH NAME
|
||||
top \- Show the most used agents (top 10)
|
||||
.SH SYNOPSIS
|
||||
\fBtop\fR [\fB\-\-period\fR] [\fB\-h\fR|\fB\-\-help\fR]
|
||||
.SH DESCRIPTION
|
||||
Show the most used agents (top 10)
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-\-period\fR \fI<PERIOD>\fR
|
||||
Only events of the last period (7d, 30d, 90d, all)
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
@@ -0,0 +1,16 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-unfavorite 1 "unfavorite "
|
||||
.SH NAME
|
||||
unfavorite \- Remove the favorite star from an agent
|
||||
.SH SYNOPSIS
|
||||
\fBunfavorite\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIAGENT\fR>
|
||||
.SH DESCRIPTION
|
||||
Remove the favorite star from an agent
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.TP
|
||||
<\fIAGENT\fR>
|
||||
Agent name or alias
|
||||
@@ -0,0 +1,19 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-uninstall 1 "uninstall "
|
||||
.SH NAME
|
||||
uninstall \- Uninstall an agent (managed or external) and clean its files
|
||||
.SH SYNOPSIS
|
||||
\fBuninstall\fR [\fB\-\-purge\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIAGENT\fR>
|
||||
.SH DESCRIPTION
|
||||
Uninstall an agent (managed or external) and clean its files
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-\-purge\fR
|
||||
Also remove logs and the agent entry from the user config file
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.TP
|
||||
<\fIAGENT\fR>
|
||||
Agent name or alias
|
||||
@@ -0,0 +1,19 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-untag 1 "untag "
|
||||
.SH NAME
|
||||
untag \- Remove a personal tag from an agent
|
||||
.SH SYNOPSIS
|
||||
\fBuntag\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIAGENT\fR> <\fITAG\fR>
|
||||
.SH DESCRIPTION
|
||||
Remove a personal tag from an agent
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.TP
|
||||
<\fIAGENT\fR>
|
||||
Agent name or alias
|
||||
.TP
|
||||
<\fITAG\fR>
|
||||
Tag to remove
|
||||
@@ -0,0 +1,19 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-update 1 "update "
|
||||
.SH NAME
|
||||
update \- Update an installed agent to the latest available version
|
||||
.SH SYNOPSIS
|
||||
\fBupdate\fR [\fB\-\-all\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIAGENT\fR]
|
||||
.SH DESCRIPTION
|
||||
Update an installed agent to the latest available version
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-\-all\fR
|
||||
Update every installed managed agent
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.TP
|
||||
[\fIAGENT\fR]
|
||||
Agent name or alias (required unless \-\-all)
|
||||
@@ -0,0 +1,13 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-version 1 "version "
|
||||
.SH NAME
|
||||
version \- Display version and build information
|
||||
.SH SYNOPSIS
|
||||
\fBversion\fR [\fB\-h\fR|\fB\-\-help\fR]
|
||||
.SH DESCRIPTION
|
||||
Display version and build information
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
@@ -0,0 +1,25 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am-watch 1 "watch "
|
||||
.SH NAME
|
||||
watch \- Supervise an agent and optionally restart it on crash
|
||||
.SH SYNOPSIS
|
||||
\fBwatch\fR [\fB\-\-restart\fR] [\fB\-\-notify\fR] [\fB\-\-interval\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIAGENT\fR>
|
||||
.SH DESCRIPTION
|
||||
Supervise an agent and optionally restart it on crash
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-\-restart\fR
|
||||
Restart the agent automatically when it dies (with backoff)
|
||||
.TP
|
||||
\fB\-\-notify\fR
|
||||
Desktop notification on every restart
|
||||
.TP
|
||||
\fB\-\-interval\fR \fI<SECS>\fR [default: 5]
|
||||
Check interval in seconds (default: 5)
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help
|
||||
.TP
|
||||
<\fIAGENT\fR>
|
||||
Agent name or alias
|
||||
@@ -0,0 +1,177 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH am 1 "am 0.4.1"
|
||||
.SH NAME
|
||||
am \- agent\-manager (am) — manage local AI coding agents
|
||||
.SH SYNOPSIS
|
||||
\fBam\fR [\fB\-c\fR|\fB\-\-config\fR] [\fB\-v\fR|\fB\-\-verbose\fR] [\fB\-q\fR|\fB\-\-quiet\fR] [\fB\-y\fR|\fB\-\-yes\fR] [\fB\-\-dry\-run\fR] [\fB\-\-json\fR] [\fB\-\-no\-color\fR] [\fB\-\-theme\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fB\-V\fR|\fB\-\-version\fR] [\fIsubcommands\fR]
|
||||
.SH DESCRIPTION
|
||||
agent\-manager (am) — a CLI to manage local AI coding agents.
|
||||
.PP
|
||||
Install, uninstall, start, stop, restart and update AI agents from a YAML
|
||||
catalog. Handles dependencies (Node, Python, Go, Rust, Bun), binaries from
|
||||
GitHub Releases, install scripts, and git repositories. All state lives under
|
||||
your user directories; nothing pollutes the system.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-c\fR, \fB\-\-config\fR \fI<FILE>\fR
|
||||
Use an alternate configuration file
|
||||
.TP
|
||||
\fB\-v\fR, \fB\-\-verbose\fR
|
||||
Verbose output: show every command executed and its details
|
||||
.TP
|
||||
\fB\-q\fR, \fB\-\-quiet\fR
|
||||
Quiet mode: only errors are printed
|
||||
.TP
|
||||
\fB\-y\fR, \fB\-\-yes\fR
|
||||
Answer yes to every confirmation prompt
|
||||
.TP
|
||||
\fB\-\-dry\-run\fR
|
||||
Simulate the action without changing anything
|
||||
.TP
|
||||
\fB\-\-json\fR
|
||||
Emit machine\-readable JSON on stdout (for scripts)
|
||||
.TP
|
||||
\fB\-\-no\-color\fR
|
||||
Disable ANSI colors
|
||||
.TP
|
||||
\fB\-\-theme\fR \fI<THEME>\fR
|
||||
Color theme for the output (see \*(Aqam help theme\*(Aq for the list)
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help (see a summary with \*(Aq\-h\*(Aq)
|
||||
.TP
|
||||
\fB\-V\fR, \fB\-\-version\fR
|
||||
Print version
|
||||
.SH SUBCOMMANDS
|
||||
.TP
|
||||
am\-list(1)
|
||||
List installed agents (default); use \-\-all for the whole catalog
|
||||
.TP
|
||||
am\-logs(1)
|
||||
Tail the log file of an agent (\-\-follow for a live view)
|
||||
.TP
|
||||
am\-open(1)
|
||||
Open an agent\*(Aqs installation directory in the file manager
|
||||
.TP
|
||||
am\-watch(1)
|
||||
Supervise an agent and optionally restart it on crash
|
||||
.TP
|
||||
am\-dashboard(1)
|
||||
Live TUI dashboard: overview, activity, stats, sessions, projects
|
||||
.TP
|
||||
am\-favorite(1)
|
||||
Mark an agent as a favorite (star in list and status)
|
||||
.TP
|
||||
am\-unfavorite(1)
|
||||
Remove the favorite star from an agent
|
||||
.TP
|
||||
am\-note(1)
|
||||
Attach a free\-form note to an agent (shown in \*(Aqam info\*(Aq); \*(Aqam note <agent>\*(Aq without text prints the current note
|
||||
.TP
|
||||
am\-tag(1)
|
||||
Add a personal tag to an agent
|
||||
.TP
|
||||
am\-untag(1)
|
||||
Remove a personal tag from an agent
|
||||
.TP
|
||||
am\-tags(1)
|
||||
List personal tags (with counts), optionally for one agent
|
||||
.TP
|
||||
am\-profile(1)
|
||||
Manage environment profiles (dev, prod, ...)
|
||||
.TP
|
||||
am\-man(1)
|
||||
Generate a man page for am (or for one command)
|
||||
.TP
|
||||
am\-alias(1)
|
||||
Manage command aliases (cc \-> claude\-code)
|
||||
.TP
|
||||
am\-secret(1)
|
||||
Manage secrets in the OS keyring (never in plaintext config)
|
||||
.TP
|
||||
am\-start(1)
|
||||
Start an agent (foreground by default, or detached with \-\-background)
|
||||
.TP
|
||||
am\-stop(1)
|
||||
Stop a background agent (SIGTERM, then SIGKILL after the timeout)
|
||||
.TP
|
||||
am\-restart(1)
|
||||
Restart an agent: stop, then start with the same options
|
||||
.TP
|
||||
am\-status(1)
|
||||
Show the state of one agent, or of every installed agent
|
||||
.TP
|
||||
am\-sessions(1)
|
||||
List the sessions of every agent (and of the interactive shell)
|
||||
.TP
|
||||
am\-stats(1)
|
||||
Show usage statistics computed from the event journal
|
||||
.TP
|
||||
am\-top(1)
|
||||
Show the most used agents (top 10)
|
||||
.TP
|
||||
am\-report(1)
|
||||
Write a markdown activity report
|
||||
.TP
|
||||
am\-projects(1)
|
||||
Show which agent works on which project
|
||||
.TP
|
||||
am\-timeline(1)
|
||||
One chronological view of every activity (journal + REPL history)
|
||||
.TP
|
||||
am\-log(1)
|
||||
Read the event journal: everything am did
|
||||
.TP
|
||||
am\-install(1)
|
||||
Install an agent and its dependencies
|
||||
.TP
|
||||
am\-uninstall(1)
|
||||
Uninstall an agent (managed or external) and clean its files
|
||||
.TP
|
||||
am\-update(1)
|
||||
Update an installed agent to the latest available version
|
||||
.TP
|
||||
am\-search(1)
|
||||
Search the catalog by keyword (name, description, category, tags)
|
||||
.TP
|
||||
am\-history(1)
|
||||
Search the command history (am and shell commands)
|
||||
.TP
|
||||
am\-info(1)
|
||||
Show detailed information about one agent
|
||||
.TP
|
||||
am\-init(1)
|
||||
Generate a local agent\-manager.yaml for the current directory
|
||||
.TP
|
||||
am\-help(1)
|
||||
Display help: the overview, a command, the command list, or a search
|
||||
.TP
|
||||
am\-version(1)
|
||||
Display version and build information
|
||||
.TP
|
||||
am\-config(1)
|
||||
Manage the configuration file
|
||||
.TP
|
||||
am\-doctor(1)
|
||||
Check the environment: tools, config validity, paths, permissions
|
||||
.TP
|
||||
am\-run(1)
|
||||
Run the agent command directly with the given arguments (no process management)
|
||||
.TP
|
||||
am\-completion(1)
|
||||
Generate a shell completion script
|
||||
.TP
|
||||
am\-self\-update(1)
|
||||
Update agent\-manager itself from GitHub Releases
|
||||
.TP
|
||||
am\-self\-uninstall(1)
|
||||
Remove agent\-manager and everything it created from this machine
|
||||
.TP
|
||||
am\-export(1)
|
||||
Export the configuration and installation state (backup)
|
||||
.TP
|
||||
am\-import(1)
|
||||
Import a previously exported configuration and state
|
||||
.SH VERSION
|
||||
v0.4.1
|
||||
@@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
# Builds an am_<version>_amd64.deb from dist/am-linux-x86_64.
|
||||
# Usage: packaging/deb/make-deb.sh <version> [arch]
|
||||
set -e
|
||||
VERSION="$1"
|
||||
ARCH="${2:-amd64}"
|
||||
ROOT="$(mktemp -d)"
|
||||
PKG="am_${VERSION}_${ARCH}"
|
||||
|
||||
mkdir -p "$ROOT/$PKG/usr/bin" "$ROOT/$PKG/usr/share/doc/am" "$ROOT/$PKG/DEBIAN"
|
||||
cp dist/am-linux-x86_64 "$ROOT/$PKG/usr/bin/am"
|
||||
chmod 755 "$ROOT/$PKG/usr/bin/am"
|
||||
|
||||
cat > "$ROOT/$PKG/DEBIAN/control" <<EOF
|
||||
Package: am
|
||||
Version: $VERSION
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Architecture: $ARCH
|
||||
Maintainer: bruno <[email protected]>
|
||||
Description: Manage local AI coding agents
|
||||
List, install, start, stop and update local AI coding agents with
|
||||
automatic dependency handling and a YAML-driven catalog.
|
||||
EOF
|
||||
|
||||
cat > "$ROOT/$PKG/usr/share/doc/am/copyright" <<EOF
|
||||
Copyright (c) 2026 bruno
|
||||
License: MIT
|
||||
EOF
|
||||
|
||||
dpkg-deb --build --root-owner-group "$ROOT/$PKG" "dist/$PKG.deb"
|
||||
rm -rf "$ROOT"
|
||||
echo "built dist/$PKG.deb"
|
||||
@@ -0,0 +1,36 @@
|
||||
# Homebrew formula - pour un tap local, ou a soumettre a homebrew/core.
|
||||
# Rendu : scripts/render-manifests.ps1 (remplace {{VERSION}} et les sha256).
|
||||
class Am < Formula
|
||||
desc "Manage local AI coding agents: list, install, start, stop, update"
|
||||
homepage "https://git.dracodev.net/Projets/agent-manager"
|
||||
license "MIT"
|
||||
version "{{VERSION}}"
|
||||
|
||||
on_macos do
|
||||
if Hardware::CPU.arm?
|
||||
url "https://git.dracodev.net/Projets/agent-manager/releases/download/v{{VERSION}}/am-macos-aarch64.tar.gz"
|
||||
sha256 "{{SHA256_MACOS_AARCH64}}"
|
||||
else
|
||||
url "https://git.dracodev.net/Projets/agent-manager/releases/download/v{{VERSION}}/am-macos-x86_64.tar.gz"
|
||||
sha256 "{{SHA256_MACOS_X86_64}}"
|
||||
end
|
||||
end
|
||||
|
||||
on_linux do
|
||||
if Hardware::CPU.arm?
|
||||
url "https://git.dracodev.net/Projets/agent-manager/releases/download/v{{VERSION}}/am-linux-aarch64.tar.gz"
|
||||
sha256 "{{SHA256_LINUX_AARCH64}}"
|
||||
else
|
||||
url "https://git.dracodev.net/Projets/agent-manager/releases/download/v{{VERSION}}/am-linux-x86_64.tar.gz"
|
||||
sha256 "{{SHA256_LINUX_X86_64}}"
|
||||
end
|
||||
end
|
||||
|
||||
def install
|
||||
bin.install "am"
|
||||
end
|
||||
|
||||
test do
|
||||
system bin/"am", "version"
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,26 @@
|
||||
# RPM spec - build avec: rpmbuild -bb packaging/rpm/am.spec
|
||||
# (rendu par scripts/render-manifests.ps1: %%{VERSION} -> version)
|
||||
Name: am
|
||||
Version: {{VERSION}}
|
||||
Release: 1%{?dist}
|
||||
Summary: Manage local AI coding agents
|
||||
License: MIT
|
||||
URL: https://git.dracodev.net/Projets/agent-manager
|
||||
Source0: am-linux-x86_64.tar.gz
|
||||
|
||||
%description
|
||||
am lists, installs, starts, stops and updates local AI coding agents
|
||||
(Claude Code, Codex, Aider, ...) with automatic dependency handling and a
|
||||
YAML-driven catalog.
|
||||
|
||||
%prep
|
||||
%setup -c -T
|
||||
tar -xzf %{SOURCE0}
|
||||
|
||||
%install
|
||||
install -Dm755 am %{buildroot}%{_bindir}/am
|
||||
|
||||
%files
|
||||
%{_bindir}/am
|
||||
|
||||
%changelog
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"version": "{{VERSION}}",
|
||||
"description": "Manage local AI coding agents: list, install, start, stop, update - with automatic dependency handling and a YAML-driven catalog.",
|
||||
"homepage": "https://git.dracodev.net/Projets/agent-manager",
|
||||
"license": "MIT",
|
||||
"architecture": {
|
||||
"64bit": {
|
||||
"url": "https://git.dracodev.net/Projets/agent-manager/releases/download/v{{VERSION}}/am-windows-x86_64.zip",
|
||||
"hash": "{{SHA256_WINDOWS}}"
|
||||
}
|
||||
},
|
||||
"bin": "am.exe",
|
||||
"checkver": {
|
||||
"url": "https://git.dracodev.net/api/v1/repos/Projets/agent-manager/releases/latest",
|
||||
"regex": "tag_name\":\s*\"v([\d.]+)\""
|
||||
},
|
||||
"autoupdate": {
|
||||
"architecture": {
|
||||
"64bit": {
|
||||
"url": "https://git.dracodev.net/Projets/agent-manager/releases/download/v$version/am-windows-x86_64.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
# Winget manifest (version 1.6) - submit to microsoft/winget-pkgs
|
||||
# Rendering: scripts/render-manifests.ps1
|
||||
PackageIdentifier: BrunoDracodev.AgentManager
|
||||
PackageVersion: {{VERSION}}
|
||||
MinimumOSVersion: 10.0.0.0
|
||||
InstallerType: zip
|
||||
Installers:
|
||||
- Architecture: x64
|
||||
InstallerUrl: https://git.dracodev.net/Projets/agent-manager/releases/download/v{{VERSION}}/am-windows-x86_64.zip
|
||||
InstallerSha256: {{SHA256_WINDOWS}}
|
||||
NestedInstallerType: portable
|
||||
NestedInstallerFiles:
|
||||
- RelativeFilePath: am.exe
|
||||
PortableCommandAlias: am
|
||||
ManifestType: installer
|
||||
ManifestVersion: 1.6.0
|
||||
@@ -0,0 +1,18 @@
|
||||
# Winget locale manifest - submit to microsoft/winget-pkgs
|
||||
PackageIdentifier: BrunoDracodev.AgentManager
|
||||
PackageVersion: {{VERSION}}
|
||||
PackageLocale: en-US
|
||||
Publisher: bruno (dracodev)
|
||||
PackageName: agent-manager (am)
|
||||
PackageUrl: https://git.dracodev.net/Projets/agent-manager
|
||||
License: MIT
|
||||
ShortDescription: Manage local AI coding agents - list, install, start, stop, update - with automatic dependency handling.
|
||||
Moniker: am
|
||||
Tags:
|
||||
- agent
|
||||
- claude
|
||||
- cli
|
||||
- coding
|
||||
- llm
|
||||
ManifestType: defaultLocale
|
||||
ManifestVersion: 1.6.0
|
||||
@@ -0,0 +1,6 @@
|
||||
# Winget version manifest - submit to microsoft/winget-pkgs
|
||||
PackageIdentifier: BrunoDracodev.AgentManager
|
||||
PackageVersion: {{VERSION}}
|
||||
DefaultLocale: en-US
|
||||
ManifestType: version
|
||||
ManifestVersion: 1.6.0
|
||||
@@ -0,0 +1,20 @@
|
||||
# Builds the release artefacts for the current platform (Windows):
|
||||
# target/release/am.exe -> dist/am-windows-x86_64.zip
|
||||
# Also prints the sha256 of every archive (for the packaging manifests).
|
||||
param([switch]$NoTest)
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
cargo build --release --locked
|
||||
if (-not $NoTest) { cargo test --release --locked }
|
||||
|
||||
New-Item -ItemType Directory -Force dist | Out-Null
|
||||
$zip = "dist/am-windows-x86_64.zip"
|
||||
Remove-Item $zip -ErrorAction SilentlyContinue
|
||||
Compress-Archive -Path target/release/am.exe -DestinationPath $zip
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "Artefacts:"
|
||||
Get-ChildItem dist | ForEach-Object {
|
||||
$hash = (Get-FileHash $_.FullName -Algorithm SHA256).Hash.ToLower()
|
||||
Write-Host (" {0,-32} {1} sha256:{2}" -f $_.Name, $_.Length, $hash)
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
# Renders the packaging templates (scoop, winget, homebrew, rpm) with the
|
||||
# version and the sha256 of every release archive.
|
||||
# Usage: scripts/render-manifests.ps1 -Version 0.4.1 [-DistDir dist]
|
||||
param(
|
||||
[Parameter(Mandatory = $true)][string]$Version,
|
||||
[string]$DistDir = "dist"
|
||||
)
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
function Get-Sha([string]$file) {
|
||||
$p = Join-Path $DistDir $file
|
||||
if (-not (Test-Path $p)) {
|
||||
Write-Warning "missing $p - placeholder 0000... (build it or wait for the CI runner)"
|
||||
return "0000000000000000000000000000000000000000000000000000000000000000"
|
||||
}
|
||||
(Get-FileHash $p -Algorithm SHA256).Hash.ToLower()
|
||||
}
|
||||
|
||||
$vars = [ordered]@{
|
||||
"{{VERSION}}" = $Version
|
||||
"{{SHA256_WINDOWS}}" = Get-Sha "am-windows-x86_64.zip"
|
||||
"{{SHA256_LINUX_X86_64}}" = Get-Sha "am-linux-x86_64.tar.gz"
|
||||
"{{SHA256_LINUX_AARCH64}}" = Get-Sha "am-linux-aarch64.tar.gz"
|
||||
"{{SHA256_MACOS_X86_64}}" = Get-Sha "am-macos-x86_64.tar.gz"
|
||||
"{{SHA256_MACOS_AARCH64}}" = Get-Sha "am-macos-aarch64.tar.gz"
|
||||
}
|
||||
|
||||
$targets = @(
|
||||
@{ Src = "packaging/scoop/am.json"; Dst = "dist/scoop/am.json" },
|
||||
@{ Src = "packaging/winget/agent-manager.installer.yaml"; Dst = "dist/winget/agent-manager.installer.yaml" },
|
||||
@{ Src = "packaging/winget/agent-manager.locale.en-US.yaml"; Dst = "dist/winget/agent-manager.locale.en-US.yaml" },
|
||||
@{ Src = "packaging/winget/agent-manager.yaml"; Dst = "dist/winget/agent-manager.yaml" },
|
||||
@{ Src = "packaging/homebrew/am.rb"; Dst = "dist/homebrew/am.rb" },
|
||||
@{ Src = "packaging/rpm/am.spec"; Dst = "dist/rpm/am.spec" }
|
||||
)
|
||||
|
||||
foreach ($t in $targets) {
|
||||
$text = Get-Content $t.Src -Raw
|
||||
foreach ($k in $vars.Keys) { $text = $text.Replace($k, $vars[$k]) }
|
||||
New-Item -ItemType Directory -Force (Split-Path $t.Dst) | Out-Null
|
||||
Set-Content -Path $t.Dst -Value $text -NoNewline -Encoding utf8
|
||||
Write-Host "rendered $($t.Dst)"
|
||||
}
|
||||
Write-Host ""
|
||||
Write-Host "Manifests rendus dans dist/. Puis :"
|
||||
Write-Host " - scoop : scoop install dist/scoop/am.json (ou ajoutez-le a votre bucket)"
|
||||
Write-Host " - winget : soumettez dist/winget/*.yaml a microsoft/winget-pkgs"
|
||||
Write-Host " - homebrew : servez dist/homebrew/am.rb via un tap, ou soumettez a homebrew/core"
|
||||
Write-Host " - rpm : copiez dist/rpm/am.spec + dist/am-linux-x86_64.tar.gz dans ~/rpmbuild/{SPECS,SOURCES} puis rpmbuild -bb"
|
||||
Write-Host " - deb : packaging/deb/make-deb.sh $Version"
|
||||
+84
-2
@@ -105,6 +105,65 @@ pub enum Command {
|
||||
#[arg(long, value_name = "SECS", default_value = "5")]
|
||||
interval: u64,
|
||||
},
|
||||
/// Live TUI dashboard: overview, activity, stats, sessions, projects
|
||||
Dashboard,
|
||||
/// Mark an agent as a favorite (star in list and status)
|
||||
Favorite {
|
||||
/// Agent name or alias
|
||||
agent: String,
|
||||
},
|
||||
/// Remove the favorite star from an agent
|
||||
Unfavorite {
|
||||
/// Agent name or alias
|
||||
agent: String,
|
||||
},
|
||||
/// Attach a free-form note to an agent (shown in 'am info');
|
||||
/// 'am note <agent>' without text prints the current note
|
||||
Note {
|
||||
/// Agent name or alias
|
||||
agent: String,
|
||||
/// Note text (several words are joined); empty prints the note
|
||||
#[arg(value_name = "TEXT...", num_args = 0..)]
|
||||
text: Vec<String>,
|
||||
},
|
||||
/// Add a personal tag to an agent
|
||||
Tag {
|
||||
/// Agent name or alias
|
||||
agent: String,
|
||||
/// One or more tags to add
|
||||
#[arg(value_name = "TAG", num_args = 1.., required = true)]
|
||||
words: Vec<String>,
|
||||
},
|
||||
/// Remove a personal tag from an agent
|
||||
Untag {
|
||||
/// Agent name or alias
|
||||
agent: String,
|
||||
/// Tag to remove
|
||||
tag: String,
|
||||
},
|
||||
/// List personal tags (with counts), optionally for one agent
|
||||
Tags {
|
||||
/// Only show the tags of this agent
|
||||
agent: Option<String>,
|
||||
},
|
||||
/// Manage environment profiles (dev, prod, ...)
|
||||
#[command(subcommand)]
|
||||
Profile(ProfileCmd),
|
||||
/// Generate a man page for am (or for one command)
|
||||
Man {
|
||||
/// Command name (omit for the whole CLI)
|
||||
command: Option<String>,
|
||||
/// Write the page(s) to this directory instead of stdout
|
||||
#[arg(long, value_name = "DIR")]
|
||||
output: Option<PathBuf>,
|
||||
},
|
||||
/// Internal: list agent names for shell completions (hidden)
|
||||
#[command(name = "_agents", hide = true)]
|
||||
Agents {
|
||||
/// Only installed agents (managed + external), aliases and groups
|
||||
#[arg(long)]
|
||||
installed: bool,
|
||||
},
|
||||
/// Manage command aliases (cc -> claude-code)
|
||||
#[command(subcommand)]
|
||||
Alias(AliasCmd),
|
||||
@@ -249,10 +308,14 @@ pub enum Command {
|
||||
/// Search the catalog by keyword (name, description, category, tags)
|
||||
Search {
|
||||
/// Keyword to search for (case-insensitive substring)
|
||||
keyword: String,
|
||||
#[arg(value_name = "KEYWORD", required_unless_present = "tag")]
|
||||
keyword: Option<String>,
|
||||
/// Restrict to this category
|
||||
#[arg(long, value_name = "CATEGORY")]
|
||||
category: Option<String>,
|
||||
/// Only agents carrying this personal tag
|
||||
#[arg(long, value_name = "TAG")]
|
||||
tag: Option<String>,
|
||||
},
|
||||
/// Search the command history (am and shell commands)
|
||||
History {
|
||||
@@ -321,8 +384,12 @@ pub enum Command {
|
||||
/// Shell to generate completions for
|
||||
#[arg(value_enum, value_name = "SHELL")]
|
||||
shell: Shell,
|
||||
/// Add dynamic completion of the installed agents, aliases and
|
||||
/// groups (queried from 'am _agents' at Tab time)
|
||||
#[arg(long)]
|
||||
installed: bool,
|
||||
},
|
||||
/// Update agent-manager itself from GitHub Releases
|
||||
/// Update agent-manager itself from the latest release
|
||||
SelfUpdate {
|
||||
/// Only check whether a newer version exists
|
||||
#[arg(long)]
|
||||
@@ -370,6 +437,21 @@ pub struct StartArgs {
|
||||
/// Send a desktop notification once the agent has started
|
||||
#[arg(long, action = ArgAction::SetTrue)]
|
||||
pub notify: bool,
|
||||
/// Apply an environment profile (env + args, defined in the config)
|
||||
#[arg(long, value_name = "NAME")]
|
||||
pub profile: Option<String>,
|
||||
}
|
||||
|
||||
/// Environment profile subcommands (issue #40).
|
||||
#[derive(Subcommand, Debug, Clone)]
|
||||
pub enum ProfileCmd {
|
||||
/// List every defined profile
|
||||
List,
|
||||
/// Show one profile in detail (agent, env, args)
|
||||
Show {
|
||||
/// Profile name
|
||||
name: String,
|
||||
},
|
||||
}
|
||||
|
||||
/// Secret management subcommands.
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
//! _agents (hidden): list agent names for shell completions (issue #41).
|
||||
//! Prints one name per line; --installed restricts to what can actually be
|
||||
//! launched: installed agents (managed + external), aliases and groups.
|
||||
|
||||
use super::*;
|
||||
|
||||
/// The completion pool: installed agents (managed + external), aliases and
|
||||
/// groups when installed is true, the whole catalog otherwise.
|
||||
pub fn agent_names(app: &App, installed: bool) -> Vec<String> {
|
||||
let mut names: Vec<String> = Vec::new();
|
||||
if installed {
|
||||
let probe = crate::probe::detect_externals(app);
|
||||
for a in app.catalog.agents() {
|
||||
if app.state.get(&a.name).ok().flatten().is_some()
|
||||
|| probe.path_of(&a.name).is_some()
|
||||
{
|
||||
names.push(a.name.clone());
|
||||
}
|
||||
}
|
||||
names.extend(app.config.aliases.keys().cloned());
|
||||
for g in app.config.groups.keys() {
|
||||
names.push(format!("group:{g}"));
|
||||
}
|
||||
} else {
|
||||
names.extend(app.catalog.agents().iter().map(|a| a.name.clone()));
|
||||
}
|
||||
names.sort();
|
||||
names.dedup();
|
||||
names
|
||||
}
|
||||
|
||||
pub fn run(app: &App, installed: bool) -> Result<i32> {
|
||||
for n in agent_names(app, installed) {
|
||||
println!("{n}");
|
||||
}
|
||||
Ok(0)
|
||||
}
|
||||
@@ -0,0 +1,209 @@
|
||||
//! favorite / unfavorite / note / tag / untag / tags: personal
|
||||
//! annotations attached to agents (issue #39). Persisted in state.json
|
||||
//! (additive since state v3) and traced in the event journal.
|
||||
|
||||
use super::*;
|
||||
use crate::events::{Event, EventKind};
|
||||
use crate::output::{boxed_table, print_json};
|
||||
use crate::state::Annotation;
|
||||
use anyhow::bail;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Serialize)]
|
||||
struct AnnotationJson {
|
||||
agent: String,
|
||||
favorite: bool,
|
||||
note: Option<String>,
|
||||
tags: Vec<String>,
|
||||
}
|
||||
|
||||
/// Save the annotation block, emitting a journal event.
|
||||
fn save_annotation(app: &App, def: &AgentDef, ann: &Annotation, detail: &str) -> Result<()> {
|
||||
app.state.set_annotation(&def.name, ann)?;
|
||||
app.emit(
|
||||
&Event::now(EventKind::Annotate)
|
||||
.with_agent(&def.name)
|
||||
.with_reason(detail),
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn run_favorite(app: &App, agent: &str) -> Result<i32> {
|
||||
let def = require_agent(app, agent)?;
|
||||
let mut ann = app.state.annotation(&def.name)?;
|
||||
if ann.favorite {
|
||||
app.log.info(&format!("'{}' is already a favorite", def.name));
|
||||
return Ok(0);
|
||||
}
|
||||
ann.favorite = true;
|
||||
save_annotation(app, def, &ann, "favorite")?;
|
||||
app.log.success(&format!("⭐ {} added to favorites", def.name));
|
||||
Ok(0)
|
||||
}
|
||||
|
||||
pub fn run_unfavorite(app: &App, agent: &str) -> Result<i32> {
|
||||
let def = require_agent(app, agent)?;
|
||||
let mut ann = app.state.annotation(&def.name)?;
|
||||
if !ann.favorite {
|
||||
app.log.info(&format!("'{}' is not a favorite", def.name));
|
||||
return Ok(0);
|
||||
}
|
||||
ann.favorite = false;
|
||||
save_annotation(app, def, &ann, "unfavorite")?;
|
||||
app.log.success(&format!("★ {} removed from favorites", def.name));
|
||||
Ok(0)
|
||||
}
|
||||
|
||||
pub fn run_note(app: &App, agent: &str, text: &[String]) -> Result<i32> {
|
||||
let def = require_agent(app, agent)?;
|
||||
let mut ann = app.state.annotation(&def.name)?;
|
||||
if text.is_empty() {
|
||||
match &ann.note {
|
||||
Some(n) => {
|
||||
println!("{}", n);
|
||||
Ok(0)
|
||||
}
|
||||
None => {
|
||||
app.log.info(&format!("no note for '{}' — 'am note {} <text>' to set one", def.name, def.name));
|
||||
Ok(0)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let note = text.join(" ");
|
||||
ann.note = Some(note.clone());
|
||||
save_annotation(app, def, &ann, "note")?;
|
||||
app.log.success(&format!("note saved for '{}'", def.name));
|
||||
Ok(0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn run_tag(app: &App, agent: &str, words: &[String]) -> Result<i32> {
|
||||
if words.is_empty() {
|
||||
bail!("usage: am tag <agent> <tag>... — at least one tag is required");
|
||||
}
|
||||
let def = require_agent(app, agent)?;
|
||||
let mut ann = app.state.annotation(&def.name)?;
|
||||
let mut added = Vec::new();
|
||||
for w in words {
|
||||
let tag = w.trim().trim_start_matches('#').to_lowercase();
|
||||
if tag.is_empty() {
|
||||
continue;
|
||||
}
|
||||
if !ann.tags.contains(&tag) {
|
||||
ann.tags.push(tag.clone());
|
||||
added.push(tag);
|
||||
}
|
||||
}
|
||||
if added.is_empty() {
|
||||
app.log.info(&format!("'{}' already carries those tags", def.name));
|
||||
return Ok(0);
|
||||
}
|
||||
ann.tags.sort();
|
||||
save_annotation(app, def, &ann, &format!("tags +{}", added.join(",")))?;
|
||||
app.log.success(&format!(
|
||||
"tagged '{}' with {}",
|
||||
def.name,
|
||||
added.join(", ")
|
||||
));
|
||||
Ok(0)
|
||||
}
|
||||
|
||||
pub fn run_untag(app: &App, agent: &str, tag: &str) -> Result<i32> {
|
||||
let def = require_agent(app, agent)?;
|
||||
let mut ann = app.state.annotation(&def.name)?;
|
||||
let needle = tag.trim().trim_start_matches('#').to_lowercase();
|
||||
let before = ann.tags.len();
|
||||
ann.tags.retain(|t| t != &needle);
|
||||
if ann.tags.len() == before {
|
||||
app.log.info(&format!("'{}' has no tag '{needle}'", def.name));
|
||||
return Ok(0);
|
||||
}
|
||||
save_annotation(app, def, &ann, &format!("tags -{needle}"))?;
|
||||
app.log.success(&format!("removed tag '{needle}' from '{}'", def.name));
|
||||
Ok(0)
|
||||
}
|
||||
|
||||
pub fn run_tags(app: &App, agent: Option<&str>) -> Result<i32> {
|
||||
let all = app.state.annotations()?;
|
||||
if let Some(name_or_alias) = agent {
|
||||
let def = require_agent(app, name_or_alias)?;
|
||||
let ann = app.state.annotation(&def.name)?;
|
||||
if app.json() {
|
||||
print_json(&AnnotationJson {
|
||||
agent: def.name.clone(),
|
||||
favorite: ann.favorite,
|
||||
note: ann.note.clone(),
|
||||
tags: ann.tags.clone(),
|
||||
});
|
||||
return Ok(0);
|
||||
}
|
||||
if ann.tags.is_empty() {
|
||||
app.log.info(&format!("no personal tags for '{}'", def.name));
|
||||
} else {
|
||||
println!("{}", ann.tags.join(" · "));
|
||||
}
|
||||
return Ok(0);
|
||||
}
|
||||
// Global view: tag -> agents (sorted by tag).
|
||||
let mut by_tag: BTreeMap<String, Vec<String>> = BTreeMap::new();
|
||||
for (name, ann) in &all {
|
||||
for t in &ann.tags {
|
||||
by_tag.entry(t.clone()).or_default().push(name.clone());
|
||||
}
|
||||
}
|
||||
if app.json() {
|
||||
let rows: Vec<serde_json::Value> = by_tag
|
||||
.iter()
|
||||
.map(|(tag, agents)| {
|
||||
serde_json::json!({ "tag": tag, "count": agents.len(), "agents": agents })
|
||||
})
|
||||
.collect();
|
||||
print_json(&rows);
|
||||
return Ok(0);
|
||||
}
|
||||
if by_tag.is_empty() {
|
||||
app.log.info("no personal tags yet — 'am tag <agent> <word>' to add one");
|
||||
return Ok(0);
|
||||
}
|
||||
let mut table_rows = Vec::new();
|
||||
for (tag, agents) in &by_tag {
|
||||
table_rows.push(vec![
|
||||
format!("#{tag}"),
|
||||
agents.len().to_string(),
|
||||
agents.join(", "),
|
||||
]);
|
||||
}
|
||||
print!(
|
||||
"{}",
|
||||
boxed_table(
|
||||
vec!["TAG", "COUNT", "AGENTS"],
|
||||
table_rows,
|
||||
app.theme(),
|
||||
app.color(),
|
||||
)
|
||||
);
|
||||
Ok(0)
|
||||
}
|
||||
|
||||
/// Is 'agent' a favorite? (used by list/status to print the star)
|
||||
pub fn is_favorite(app: &App, agent: &str) -> bool {
|
||||
app.state.annotation(agent).map(|a| a.favorite).unwrap_or(false)
|
||||
}
|
||||
|
||||
/// Personal tags of 'agent' (used by search --tag and info).
|
||||
pub fn tags_of(app: &App, agent: &str) -> Vec<String> {
|
||||
app.state.annotation(agent).map(|a| a.tags).unwrap_or_default()
|
||||
}
|
||||
|
||||
/// Agent names whose annotations match a personal tag (issue #39).
|
||||
pub fn agents_with_tag(app: &App, tag: &str) -> Vec<String> {
|
||||
let needle = tag.trim().trim_start_matches('#').to_lowercase();
|
||||
app.state
|
||||
.annotations()
|
||||
.unwrap_or_default()
|
||||
.into_iter()
|
||||
.filter(|(_, a)| a.tags.iter().any(|t| t == &needle))
|
||||
.map(|(name, _)| name)
|
||||
.collect()
|
||||
}
|
||||
|
||||
@@ -1,13 +1,152 @@
|
||||
//! completion: generate shell completion scripts (bash, zsh, fish,
|
||||
//! powershell, elvish) via clap_complete.
|
||||
//! powershell, elvish) via clap_complete. With --installed, a dynamic
|
||||
//! layer is appended: Tab then queries 'am _agents --installed' at runtime,
|
||||
//! so only installed agents, aliases and groups are proposed (issue #41).
|
||||
|
||||
use crate::cli::Cli;
|
||||
use anyhow::Result;
|
||||
use clap::CommandFactory;
|
||||
use clap_complete::{generate, Shell};
|
||||
use std::io::Write;
|
||||
|
||||
pub fn run(shell: Shell) -> Result<i32> {
|
||||
pub fn run(shell: Shell, installed: bool) -> Result<i32> {
|
||||
let mut cmd = Cli::command();
|
||||
generate(shell, &mut cmd, "am", &mut std::io::stdout());
|
||||
let mut buf: Vec<u8> = Vec::new();
|
||||
generate(shell, &mut cmd, "am", &mut buf);
|
||||
if installed {
|
||||
let mut text = String::from_utf8_lossy(&buf).to_string();
|
||||
match shell {
|
||||
Shell::PowerShell => {
|
||||
// Re-bind the base completer to a variable so the wrapper
|
||||
// can delegate to it.
|
||||
let marker = "Register-ArgumentCompleter -Native -CommandName 'am' -ScriptBlock {";
|
||||
if let Some(pos) = text.find(marker) {
|
||||
text.replace_range(pos..pos + marker.len(), "$amBase = {");
|
||||
text.push('\n');
|
||||
text.push_str(powershell_snippet());
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
text.push('\n');
|
||||
text.push_str(snippet(shell));
|
||||
}
|
||||
}
|
||||
std::io::stdout().write_all(text.as_bytes())?;
|
||||
} else {
|
||||
std::io::stdout().write_all(&buf)?;
|
||||
}
|
||||
Ok(0)
|
||||
}
|
||||
|
||||
pub fn snippet(shell: Shell) -> &'static str {
|
||||
match shell {
|
||||
Shell::Bash => bash_snippet(),
|
||||
Shell::Zsh => zsh_snippet(),
|
||||
Shell::Fish => fish_snippet(),
|
||||
Shell::Elvish => elvish_snippet(),
|
||||
Shell::PowerShell => powershell_snippet(),
|
||||
_ => "",
|
||||
}
|
||||
}
|
||||
|
||||
pub fn bash_snippet() -> &'static str {
|
||||
r#"# --- dynamic completion of installed agents, aliases and groups (--installed) ---
|
||||
_am_installed() {
|
||||
local cur cmd
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
cmd="${COMP_WORDS[1]}"
|
||||
case "${cmd}" in
|
||||
start|stop|restart|run|info|logs|open|install|uninstall|update|watch|favorite|unfavorite|note|tag|untag|status|sessions|stats|log)
|
||||
if [[ ${COMP_CWORD} -eq 2 ]]; then
|
||||
COMPREPLY=( $(compgen -W "$(am _agents --installed 2>/dev/null)" -- "${cur}") )
|
||||
return 0
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
_am "$@"
|
||||
}
|
||||
complete -F _am_installed -o nosort -o bashdefault -o default am
|
||||
"#
|
||||
}
|
||||
|
||||
pub fn zsh_snippet() -> &'static str {
|
||||
r#"# --- dynamic completion of installed agents, aliases and groups (--installed) ---
|
||||
_am_installed() {
|
||||
local -a agents
|
||||
if [[ ${CURRENT} -eq 3 ]] && [[ ${words[2]} =~ ^(start|stop|restart|run|info|logs|open|install|uninstall|update|watch|favorite|unfavorite|note|tag|untag|status|sessions|stats|log)$ ]]; then
|
||||
agents=("${(@f)$(am _agents --installed 2>/dev/null)}")
|
||||
_describe -t agents 'agent' agents
|
||||
return
|
||||
fi
|
||||
_am "$@"
|
||||
}
|
||||
compdef _am_installed am
|
||||
"#
|
||||
}
|
||||
|
||||
pub fn fish_snippet() -> &'static str {
|
||||
r#"# --- dynamic completion of installed agents, aliases and groups (--installed) ---
|
||||
complete -c am -n "__fish_seen_subcommand_from start stop restart run info logs open install uninstall update watch favorite unfavorite note tag untag status sessions stats log" -f -a "(am _agents --installed 2>/dev/null)"
|
||||
"#
|
||||
}
|
||||
|
||||
pub fn elvish_snippet() -> &'static str {
|
||||
r#"# --- dynamic completion of installed agents, aliases and groups (--installed) ---
|
||||
var am-base = $edit:completion:arg-completer[am]
|
||||
set edit:completion:arg-completer[am] = {|@words|
|
||||
if (and (>= (count $words) 2) (<= (count $words) 3) (has-value [start stop restart run info logs open install uninstall update watch favorite unfavorite note tag untag status sessions stats log] $words[1])) {
|
||||
put $@(am _agents --installed)
|
||||
} else {
|
||||
$am-base $@words
|
||||
}
|
||||
}
|
||||
"#
|
||||
}
|
||||
|
||||
pub fn powershell_snippet() -> &'static str {
|
||||
r#"
|
||||
# --- dynamic completion of installed agents, aliases and groups (--installed) ---
|
||||
Register-ArgumentCompleter -Native -CommandName 'am' -ScriptBlock {
|
||||
param($wordToComplete, $commandAst, $cursorPosition)
|
||||
$tokens = $commandAst.CommandElements | ForEach-Object { $_.Extent.Text }
|
||||
$agentCommands = @('start','stop','restart','run','info','logs','open','install','uninstall','update','watch','favorite','unfavorite','note','tag','untag','status','sessions','stats','log')
|
||||
if ($tokens.Count -ge 2 -and $agentCommands -contains $tokens[1]) {
|
||||
(am _agents --installed 2>$null) | Where-Object { $_ -like "$wordToComplete*" } | ForEach-Object {
|
||||
[System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
|
||||
}
|
||||
return
|
||||
}
|
||||
& $amBase $wordToComplete $commandAst $cursorPosition
|
||||
}
|
||||
"#
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn dynamic_snippets_are_produced_for_every_shell() {
|
||||
for shell in [
|
||||
Shell::Bash,
|
||||
Shell::Zsh,
|
||||
Shell::Fish,
|
||||
Shell::Elvish,
|
||||
Shell::PowerShell,
|
||||
] {
|
||||
let text = snippet(shell);
|
||||
assert!(text.contains("_agents --installed"), "{shell:?}");
|
||||
assert!(text.contains("favorite"), "{shell:?}");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn base_script_has_no_dynamic_layer() {
|
||||
let mut cmd = Cli::command();
|
||||
let mut buf: Vec<u8> = Vec::new();
|
||||
generate(Shell::Bash, &mut cmd, "am", &mut buf);
|
||||
let base = String::from_utf8(buf).unwrap();
|
||||
assert!(!base.contains("_am_installed"));
|
||||
assert!(base.contains("complete -F _am "));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,379 @@
|
||||
//! dashboard: live TUI over the whole fleet (issue #33) — five tabs
|
||||
//! (overview, activity, stats, sessions, projects), 1 s refresh, keyboard
|
||||
//! navigation, clean exit. When stdout is not a terminal (or --json), a
|
||||
//! plain snapshot is printed instead of entering the TUI.
|
||||
|
||||
use super::*;
|
||||
use crate::dashboard::{collect, ActivityRow, DashData, OverviewRow, SessionRow, StatsRow};
|
||||
use crate::projects::ProjectSummary;
|
||||
use crate::output::print_json;
|
||||
use crossterm::event::{self, Event, KeyCode, KeyEventKind};
|
||||
use ratatui::layout::{Alignment, Constraint, Layout, Rect};
|
||||
use ratatui::style::{Color, Modifier, Style};
|
||||
use ratatui::text::{Line, Span};
|
||||
use ratatui::widgets::{Block, Borders, Paragraph, Tabs};
|
||||
use ratatui::{DefaultTerminal, Frame};
|
||||
use std::io::IsTerminal;
|
||||
use std::time::Duration;
|
||||
|
||||
pub const TABS: [&str; 5] = ["1 overview", "2 activity", "3 stats", "4 sessions", "5 projects"];
|
||||
|
||||
struct Ui {
|
||||
tab: usize,
|
||||
scroll: [usize; 5],
|
||||
}
|
||||
|
||||
pub fn run(app: &App) -> Result<i32> {
|
||||
if app.json() {
|
||||
print_json(&collect(app));
|
||||
return Ok(0);
|
||||
}
|
||||
if !std::io::stdout().is_terminal() {
|
||||
print_snapshot(app)?;
|
||||
return Ok(0);
|
||||
}
|
||||
let mut terminal = ratatui::init();
|
||||
let result = run_loop(app, &mut terminal);
|
||||
ratatui::restore();
|
||||
// Leave the prompt on a fresh line when launched from the REPL.
|
||||
println!();
|
||||
result
|
||||
}
|
||||
|
||||
fn run_loop(app: &App, terminal: &mut DefaultTerminal) -> Result<i32> {
|
||||
let mut ui = Ui { tab: 0, scroll: [0; 5] };
|
||||
let mut data = collect(app);
|
||||
loop {
|
||||
terminal.draw(|f| draw(f, &data, &ui))?;
|
||||
if !event::poll(Duration::from_secs(1))? {
|
||||
// 1 s refresh: repaint with fresh data.
|
||||
data = collect(app);
|
||||
continue;
|
||||
}
|
||||
match event::read()? {
|
||||
Event::Key(key) if key.kind == KeyEventKind::Press => match key.code {
|
||||
KeyCode::Char('q') | KeyCode::Esc => return Ok(0),
|
||||
KeyCode::Char('h') | KeyCode::Left => ui.tab = ui.tab.saturating_sub(1),
|
||||
KeyCode::Char('l') | KeyCode::Right | KeyCode::Tab => {
|
||||
ui.tab = (ui.tab + 1) % TABS.len()
|
||||
}
|
||||
KeyCode::Char(c) if c.is_ascii_digit() && c != '0' => {
|
||||
ui.tab = (c as usize - '1' as usize).min(TABS.len() - 1);
|
||||
}
|
||||
KeyCode::Char('k') | KeyCode::Up => {
|
||||
ui.scroll[ui.tab] = ui.scroll[ui.tab].saturating_sub(1)
|
||||
}
|
||||
KeyCode::Char('j') | KeyCode::Down => ui.scroll[ui.tab] += 1,
|
||||
KeyCode::PageUp => ui.scroll[ui.tab] = ui.scroll[ui.tab].saturating_sub(10),
|
||||
KeyCode::PageDown => ui.scroll[ui.tab] += 10,
|
||||
KeyCode::Home => ui.scroll[ui.tab] = 0,
|
||||
KeyCode::Char('r') => data = collect(app),
|
||||
_ => {}
|
||||
},
|
||||
Event::Resize(_, _) => data = collect(app),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn draw(f: &mut Frame, data: &DashData, ui: &Ui) {
|
||||
let [header, body] =
|
||||
Layout::vertical([Constraint::Length(3), Constraint::Min(0)]).areas(f.area());
|
||||
let counts = &data.counts;
|
||||
let title = Line::from(vec![
|
||||
Span::styled(
|
||||
" agent-manager ",
|
||||
Style::default()
|
||||
.fg(Color::Black)
|
||||
.bg(Color::Cyan)
|
||||
.add_modifier(Modifier::BOLD),
|
||||
),
|
||||
Span::raw(format!(
|
||||
" {} installed · {} running · {} sessions{}",
|
||||
counts.installed,
|
||||
counts.running,
|
||||
counts.sessions_count,
|
||||
counts
|
||||
.last_used
|
||||
.as_deref()
|
||||
.map(|t| format!(" · last used {t}"))
|
||||
.unwrap_or_default(),
|
||||
)),
|
||||
]);
|
||||
let tabs = Tabs::new(TABS)
|
||||
.block(
|
||||
Block::default()
|
||||
.borders(Borders::ALL)
|
||||
.title(title)
|
||||
.title_alignment(Alignment::Left),
|
||||
)
|
||||
.select(ui.tab)
|
||||
.highlight_style(
|
||||
Style::default()
|
||||
.fg(Color::Black)
|
||||
.bg(Color::Cyan)
|
||||
.add_modifier(Modifier::BOLD),
|
||||
);
|
||||
f.render_widget(tabs, header);
|
||||
match ui.tab {
|
||||
0 => draw_overview(f, data, ui, body),
|
||||
1 => draw_activity(f, data, ui, body),
|
||||
2 => draw_stats(f, data, ui, body),
|
||||
3 => draw_sessions(f, data, ui, body),
|
||||
_ => draw_projects(f, data, ui, body),
|
||||
}
|
||||
}
|
||||
|
||||
fn status_style(status: &str) -> Style {
|
||||
match status {
|
||||
"running" => Style::default().fg(Color::Green).add_modifier(Modifier::BOLD),
|
||||
"installed" | "external" => Style::default().fg(Color::Cyan),
|
||||
"failed" | "interrupted" => Style::default().fg(Color::Red),
|
||||
"not-installed" | "not-installable" => Style::default().fg(Color::DarkGray),
|
||||
_ => Style::default().fg(Color::Yellow),
|
||||
}
|
||||
}
|
||||
|
||||
fn block<'a>(title: &str, hint: &str, scroll: usize) -> Block<'a> {
|
||||
Block::default()
|
||||
.borders(Borders::ALL)
|
||||
.title(format!(" {title} "))
|
||||
.title_bottom(format!(" {hint} · scroll {scroll} "))
|
||||
.title_alignment(Alignment::Left)
|
||||
}
|
||||
|
||||
fn fmt_duration(secs: u64) -> String {
|
||||
if secs < 60 {
|
||||
format!("{secs}s")
|
||||
} else if secs < 3600 {
|
||||
format!("{}m{:02}s", secs / 60, secs % 60)
|
||||
} else if secs < 86400 {
|
||||
format!("{}h{:02}m", secs / 3600, (secs % 3600) / 60)
|
||||
} else {
|
||||
format!("{}d{:02}h", secs / 86400, (secs % 86400) / 3600)
|
||||
}
|
||||
}
|
||||
|
||||
fn overview_line(r: &OverviewRow) -> Line<'static> {
|
||||
let star = if r.favorite { "★ " } else { " " };
|
||||
let status = r.status.as_str();
|
||||
let version = r.version.as_deref().unwrap_or("—");
|
||||
let uptime = r
|
||||
.uptime_s
|
||||
.map(|s| format!("up {}", fmt_duration(s)))
|
||||
.unwrap_or_default();
|
||||
let pid = r
|
||||
.pid
|
||||
.map(|p| format!("pid {p}"))
|
||||
.unwrap_or_default();
|
||||
Line::from(vec![
|
||||
Span::styled(format!("{star}{:<22}", r.name), Style::default().add_modifier(Modifier::BOLD)),
|
||||
Span::styled(format!("{:<16}", status), status_style(status)),
|
||||
Span::raw(format!("{:<12} ", version)),
|
||||
Span::raw(format!("{pid:<10} {uptime}")),
|
||||
])
|
||||
}
|
||||
|
||||
fn draw_overview(f: &mut Frame, data: &DashData, ui: &Ui, area: Rect) {
|
||||
let mut lines: Vec<Line> = data
|
||||
.overview
|
||||
.iter()
|
||||
.map(overview_line)
|
||||
.collect();
|
||||
if lines.is_empty() {
|
||||
lines.push(Line::from("no agents in the catalog"));
|
||||
}
|
||||
let p = Paragraph::new(lines)
|
||||
.block(block("overview", "j/k scroll · q quit", ui.scroll[0]))
|
||||
.scroll((ui.scroll[0] as u16, 0));
|
||||
f.render_widget(p, area);
|
||||
}
|
||||
|
||||
fn activity_line(r: &ActivityRow) -> Line<'static> {
|
||||
Line::from(vec![
|
||||
Span::styled(format!("{:<21} ", r.ts), Style::default().fg(Color::DarkGray)),
|
||||
Span::styled(
|
||||
format!("{:<10} ", r.kind),
|
||||
Style::default().fg(Color::Cyan).add_modifier(Modifier::BOLD),
|
||||
),
|
||||
Span::styled(format!("{:<22} ", r.agent.as_deref().unwrap_or("-")), Style::default().fg(Color::Yellow)),
|
||||
Span::raw(r.detail.clone()),
|
||||
])
|
||||
}
|
||||
|
||||
fn draw_activity(f: &mut Frame, data: &DashData, ui: &Ui, area: Rect) {
|
||||
let lines: Vec<Line> = data.activity.iter().map(activity_line).collect();
|
||||
let p = Paragraph::new(if lines.is_empty() {
|
||||
vec![Line::from("the event journal is empty — every am action will appear here")]
|
||||
} else {
|
||||
lines
|
||||
})
|
||||
.block(block("activity — event journal", "j/k scroll · q quit", ui.scroll[1]))
|
||||
.scroll((ui.scroll[1] as u16, 0));
|
||||
f.render_widget(p, area);
|
||||
}
|
||||
|
||||
fn stats_line(r: &StatsRow) -> Line<'static> {
|
||||
let rate = if r.launches > 0 {
|
||||
format!("{:>6.0}% ok", 100.0 * (r.launches.saturating_sub(r.failures)) as f64 / r.launches as f64)
|
||||
} else {
|
||||
" —".to_string()
|
||||
};
|
||||
Line::from(vec![
|
||||
Span::styled(format!("{:<22}", r.agent), Style::default().add_modifier(Modifier::BOLD)),
|
||||
Span::raw(format!("{:>8} launches ", r.launches)),
|
||||
Span::raw(format!("{:>8} failures ", r.failures)),
|
||||
Span::raw(format!("{:>10} ", fmt_duration(r.total_duration_s))),
|
||||
Span::styled(rate, status_style(if r.failures > 0 { "failed" } else { "running" })),
|
||||
])
|
||||
}
|
||||
|
||||
fn draw_stats(f: &mut Frame, data: &DashData, ui: &Ui, area: Rect) {
|
||||
let lines: Vec<Line> = data.stats.iter().map(stats_line).collect();
|
||||
let p = Paragraph::new(if lines.is_empty() {
|
||||
vec![Line::from("no usage data yet — start an agent to fill the journal")]
|
||||
} else {
|
||||
lines
|
||||
})
|
||||
.block(block("stats — per agent", "j/k scroll · q quit", ui.scroll[2]))
|
||||
.scroll((ui.scroll[2] as u16, 0));
|
||||
f.render_widget(p, area);
|
||||
}
|
||||
|
||||
fn session_line(r: &SessionRow) -> Line<'static> {
|
||||
let dur = r
|
||||
.duration_s
|
||||
.map(fmt_duration)
|
||||
.unwrap_or_else(|| "running…".to_string());
|
||||
Line::from(vec![
|
||||
Span::styled(format!("{:<18} ", r.id), Style::default().fg(Color::Yellow)),
|
||||
Span::styled(format!("{:<11} ", r.status), status_style(&r.status)),
|
||||
Span::styled(
|
||||
format!("{:<22} ", r.agent.as_deref().unwrap_or("repl")),
|
||||
Style::default().add_modifier(Modifier::BOLD),
|
||||
),
|
||||
Span::raw(format!(
|
||||
"{:<26} ",
|
||||
r.project.as_deref().unwrap_or("-")
|
||||
)),
|
||||
Span::styled(format!("{:<10} ", r.started_at), Style::default().fg(Color::DarkGray)),
|
||||
Span::raw(dur),
|
||||
])
|
||||
}
|
||||
|
||||
fn draw_sessions(f: &mut Frame, data: &DashData, ui: &Ui, area: Rect) {
|
||||
let lines: Vec<Line> = data.sessions.iter().map(session_line).collect();
|
||||
let p = Paragraph::new(if lines.is_empty() {
|
||||
vec![Line::from("no sessions recorded yet")]
|
||||
} else {
|
||||
lines
|
||||
})
|
||||
.block(block("sessions", "j/k scroll · q quit", ui.scroll[3]))
|
||||
.scroll((ui.scroll[3] as u16, 0));
|
||||
f.render_widget(p, area);
|
||||
}
|
||||
|
||||
fn project_line(r: &ProjectSummary) -> Line<'static> {
|
||||
let mut spans: Vec<Span<'static>> = Vec::new();
|
||||
spans.push(Span::styled(
|
||||
format!("{:<28} ", r.root),
|
||||
Style::default().add_modifier(Modifier::BOLD),
|
||||
));
|
||||
spans.push(Span::styled(
|
||||
format!("{:<22} ", r.dominant.as_deref().unwrap_or("-")),
|
||||
Style::default().fg(Color::Cyan),
|
||||
));
|
||||
spans.push(Span::raw(format!(
|
||||
"{:>4} sessions {:>5} launches {:>10} ",
|
||||
r.sessions, r.launches, fmt_duration(r.total_duration_s)
|
||||
)));
|
||||
spans.push(Span::styled(
|
||||
r.last_activity.as_deref().unwrap_or("-").to_string(),
|
||||
Style::default().fg(Color::DarkGray),
|
||||
));
|
||||
Line::from(spans)
|
||||
}
|
||||
|
||||
fn draw_projects(f: &mut Frame, data: &DashData, ui: &Ui, area: Rect) {
|
||||
let lines: Vec<Line> = data.projects.iter().map(project_line).collect();
|
||||
let p = Paragraph::new(if lines.is_empty() {
|
||||
vec![Line::from("no project activity recorded yet")]
|
||||
} else {
|
||||
lines
|
||||
})
|
||||
.block(block("projects", "j/k scroll · q quit", ui.scroll[4]))
|
||||
.scroll((ui.scroll[4] as u16, 0));
|
||||
f.render_widget(p, area);
|
||||
}
|
||||
|
||||
/// Plain-text snapshot (piped stdout): same data, no TUI.
|
||||
fn print_snapshot(app: &App) -> Result<i32> {
|
||||
let data = collect(app);
|
||||
let c = &data.counts;
|
||||
println!(
|
||||
"agent-manager dashboard — {} installed · {} running · {} sessions",
|
||||
c.installed, c.running, c.sessions_count
|
||||
);
|
||||
println!();
|
||||
println!("overview");
|
||||
for r in &data.overview {
|
||||
let star = if r.favorite { "★ " } else { " " };
|
||||
let uptime = r
|
||||
.uptime_s
|
||||
.map(|s| format!(" (up {})", fmt_duration(s)))
|
||||
.unwrap_or_default();
|
||||
println!(
|
||||
" {star}{:<22} {:<16} {:<12} {}{}",
|
||||
r.name,
|
||||
r.status,
|
||||
r.version.as_deref().unwrap_or("—"),
|
||||
r.pid.map(|p| format!("pid {p}")).unwrap_or_default(),
|
||||
uptime,
|
||||
);
|
||||
}
|
||||
println!();
|
||||
println!("activity (last {})", data.activity.len());
|
||||
for r in data.activity.iter().take(20) {
|
||||
println!(
|
||||
" {:<21} {:<10} {:<22} {}",
|
||||
r.ts,
|
||||
r.kind,
|
||||
r.agent.as_deref().unwrap_or("-"),
|
||||
r.detail
|
||||
);
|
||||
}
|
||||
println!();
|
||||
println!("stats");
|
||||
for r in &data.stats {
|
||||
println!(
|
||||
" {:<22} {:>8} launches {:>8} failures {:>10}",
|
||||
r.agent,
|
||||
r.launches,
|
||||
r.failures,
|
||||
fmt_duration(r.total_duration_s),
|
||||
);
|
||||
}
|
||||
println!();
|
||||
println!("sessions");
|
||||
for r in data.sessions.iter().take(20) {
|
||||
println!(
|
||||
" {:<18} {:<11} {:<22} {}",
|
||||
r.id,
|
||||
r.status,
|
||||
r.agent.as_deref().unwrap_or("repl"),
|
||||
r.duration_s.map(fmt_duration).unwrap_or_else(|| "running…".to_string()),
|
||||
);
|
||||
}
|
||||
println!();
|
||||
println!("projects");
|
||||
for r in &data.projects {
|
||||
println!(
|
||||
" {:<28} {:<22} {} sessions {} launches",
|
||||
r.root,
|
||||
r.dominant.as_deref().unwrap_or("-"),
|
||||
r.sessions,
|
||||
r.launches,
|
||||
);
|
||||
}
|
||||
Ok(0)
|
||||
}
|
||||
@@ -78,6 +78,7 @@ pub fn import_cmd(app: &App, file: &Path) -> Result<i32> {
|
||||
include: vec![],
|
||||
agents: export.config.agents.clone(),
|
||||
projects: Default::default(),
|
||||
profiles: export.config.profiles.clone(),
|
||||
};
|
||||
std::fs::write(&dest, serde_yaml::to_string(&cfg)?)
|
||||
.with_context(|| format!("cannot write {}", dest.display()))?;
|
||||
|
||||
@@ -20,6 +20,12 @@ struct InfoJson {
|
||||
pid: Option<u32>,
|
||||
installable: bool,
|
||||
note: Option<String>,
|
||||
/// Personal note (issue #39).
|
||||
personal_note: Option<String>,
|
||||
/// Personal tags (issue #39).
|
||||
personal_tags: Vec<String>,
|
||||
/// Favorite (issue #39).
|
||||
favorite: bool,
|
||||
platforms: Vec<String>,
|
||||
run: Option<String>,
|
||||
args: Vec<String>,
|
||||
@@ -83,6 +89,9 @@ pub fn run(app: &App, name: &str) -> Result<i32> {
|
||||
pid: if running { entry.as_ref().and_then(|e| e.pid) } else { None },
|
||||
installable: agent.installable,
|
||||
note: agent.note.clone(),
|
||||
personal_note: annotations_note(app, &agent.name),
|
||||
personal_tags: annotations_tags(app, &agent.name),
|
||||
favorite: annotations_favorite(app, &agent.name),
|
||||
platforms: agent.platforms.clone(),
|
||||
run: agent.run.clone(),
|
||||
args: agent.args.clone(),
|
||||
@@ -274,9 +283,48 @@ pub fn run(app: &App, name: &str) -> Result<i32> {
|
||||
println!();
|
||||
println!(" {}", dim(&format!("note {n}")));
|
||||
}
|
||||
// --- Personal annotations (issue #39) -------------------------------------
|
||||
let p_note = annotations_note(app, &agent.name);
|
||||
let p_tags = annotations_tags(app, &agent.name);
|
||||
let p_fav = annotations_favorite(app, &agent.name);
|
||||
if p_fav || p_tags.iter().any(|t| !agent.tags.contains(t)) || p_note.is_some() {
|
||||
println!();
|
||||
println!(" {}", bold("personal"));
|
||||
if p_fav {
|
||||
println!(" {} {}", dim("● favorite"), "★");
|
||||
}
|
||||
if !p_tags.is_empty() {
|
||||
println!(
|
||||
" {} {}",
|
||||
dim("● tags"),
|
||||
p_tags
|
||||
.iter()
|
||||
.map(|t| format!("#{t}"))
|
||||
.collect::<Vec<_>>()
|
||||
.join(" ")
|
||||
);
|
||||
}
|
||||
if let Some(n) = &p_note {
|
||||
println!(" {} {}", dim("● note"), n);
|
||||
}
|
||||
}
|
||||
Ok(0)
|
||||
}
|
||||
|
||||
// Personal annotations helpers (issue #39) — never fail.
|
||||
fn annotations_note(app: &App, name: &str) -> Option<String> {
|
||||
app.state.annotation(name).ok().and_then(|a| a.note)
|
||||
}
|
||||
fn annotations_tags(app: &App, name: &str) -> Vec<String> {
|
||||
app.state.annotation(name).map(|a| a.tags).unwrap_or_default()
|
||||
}
|
||||
fn annotations_favorite(app: &App, name: &str) -> bool {
|
||||
app.state
|
||||
.annotation(name)
|
||||
.map(|a| a.favorite)
|
||||
.unwrap_or(false)
|
||||
}
|
||||
|
||||
fn external_path(agent: &AgentDef) -> Option<std::path::PathBuf> {
|
||||
let first = agent.first_token()?;
|
||||
which::which(first).ok()
|
||||
|
||||
@@ -22,6 +22,8 @@ struct AgentRow {
|
||||
pid: Option<u32>,
|
||||
installable: bool,
|
||||
note: Option<String>,
|
||||
/// Personal favorite (issue #39).
|
||||
favorite: bool,
|
||||
}
|
||||
|
||||
/// run: installed agents only, unless all is set (whole catalog).
|
||||
@@ -44,7 +46,7 @@ pub fn run(
|
||||
continue;
|
||||
}
|
||||
}
|
||||
rows.push(row_for(agent, entries.get(&agent.name), &probe));
|
||||
rows.push(row_for(app, agent, entries.get(&agent.name), &probe));
|
||||
}
|
||||
if !all {
|
||||
rows.retain(|r| r.status == "running" || r.status == "installed" || r.status == "external");
|
||||
@@ -67,8 +69,10 @@ pub fn run(
|
||||
let theme = app.theme();
|
||||
let mut table_rows = Vec::new();
|
||||
for r in &rows {
|
||||
// Favorite star (issue #39).
|
||||
let star = if r.favorite { "★ " } else { "" };
|
||||
table_rows.push(vec![
|
||||
r.display_name.clone(),
|
||||
format!("{star}{}", r.display_name),
|
||||
r.name.clone(),
|
||||
r.version.clone().unwrap_or_else(|| "—".to_string()),
|
||||
status_style(&r.status, theme, color),
|
||||
@@ -95,7 +99,7 @@ pub fn run(
|
||||
Ok(0)
|
||||
}
|
||||
|
||||
fn row_for(agent: &AgentDef, entry: Option<&InstalledEntry>, probe: &ExternalInfo) -> AgentRow {
|
||||
fn row_for(app: &App, agent: &AgentDef, entry: Option<&InstalledEntry>, probe: &ExternalInfo) -> AgentRow {
|
||||
let (status, source, path, version, running, pid, method) = if let Some(e) = entry {
|
||||
let running = e.pid.map(crate::process::is_running).unwrap_or(false);
|
||||
let status = if running { "running" } else { "installed" };
|
||||
@@ -171,5 +175,6 @@ fn row_for(agent: &AgentDef, entry: Option<&InstalledEntry>, probe: &ExternalInf
|
||||
pid,
|
||||
installable: agent.installable,
|
||||
note: agent.note.clone(),
|
||||
favorite: crate::commands::annotations_cmd::is_favorite(app, &agent.name),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
//! man: generate roff man pages from the clap definition (issue #41).
|
||||
//! 'am man' prints am.1 for the whole CLI; 'am man <command>' prints one
|
||||
//! page; '--output DIR' writes am.1 plus one am-<command>.1 per command.
|
||||
|
||||
use super::*;
|
||||
use anyhow::Context;
|
||||
use clap::CommandFactory;
|
||||
use std::io::Write;
|
||||
use std::path::Path;
|
||||
|
||||
pub fn run(app: &App, command: Option<&str>, output: Option<&Path>) -> Result<i32> {
|
||||
let mut cmd = crate::cli::Cli::command();
|
||||
if app.dry_run() {
|
||||
app.log.dry("would generate man pages");
|
||||
return Ok(0);
|
||||
}
|
||||
match command {
|
||||
Some(name) => {
|
||||
let sub = cmd.find_subcommand_mut(name).ok_or_else(|| {
|
||||
anyhow!(
|
||||
"unknown command '{name}' — 'am help commands' lists every command"
|
||||
)
|
||||
})?;
|
||||
let man = clap_mangen::Man::new(sub.clone()).title(format!("am-{name}"));
|
||||
match output {
|
||||
Some(dir) => {
|
||||
write_page(dir, &format!("am-{name}"), &man)?;
|
||||
app.log.success(&format!(
|
||||
"man page written to {}",
|
||||
dir.join(format!("am-{name}.1")).display()
|
||||
));
|
||||
}
|
||||
None => man.render(&mut std::io::stdout())?,
|
||||
}
|
||||
}
|
||||
None => match output {
|
||||
Some(dir) => {
|
||||
let main = clap_mangen::Man::new(cmd.clone());
|
||||
write_page(dir, "am", &main)?;
|
||||
for sub in cmd.get_subcommands() {
|
||||
if sub.is_hide_set() {
|
||||
continue;
|
||||
}
|
||||
let name = format!("am-{}", sub.get_name());
|
||||
let m = clap_mangen::Man::new(sub.clone()).title(name.clone());
|
||||
write_page(dir, &name, &m)?;
|
||||
}
|
||||
app.log.success(&format!(
|
||||
"man pages written to {} (am.1 + {} pages)",
|
||||
dir.display(),
|
||||
cmd.get_subcommands().count()
|
||||
));
|
||||
}
|
||||
None => clap_mangen::Man::new(cmd).render(&mut std::io::stdout())?,
|
||||
},
|
||||
}
|
||||
Ok(0)
|
||||
}
|
||||
|
||||
fn write_page(dir: &Path, name: &str, man: &clap_mangen::Man) -> Result<()> {
|
||||
std::fs::create_dir_all(dir)
|
||||
.with_context(|| format!("cannot create {}", dir.display()))?;
|
||||
let path = dir.join(format!("{name}.1"));
|
||||
let mut file = std::fs::File::create(&path)
|
||||
.with_context(|| format!("cannot create {}", path.display()))?;
|
||||
man.render(&mut file)
|
||||
.with_context(|| format!("cannot render {}", path.display()))?;
|
||||
file.flush().ok();
|
||||
Ok(())
|
||||
}
|
||||
+19
-2
@@ -1,8 +1,11 @@
|
||||
//! Command implementations and dispatch.
|
||||
|
||||
pub mod agents_cmd;
|
||||
pub mod alias_cmd;
|
||||
pub mod annotations_cmd;
|
||||
pub mod completion_cmd;
|
||||
pub mod config_cmd;
|
||||
pub mod dashboard_cmd;
|
||||
pub mod doctor_cmd;
|
||||
pub mod export_import;
|
||||
pub mod help_cmd;
|
||||
@@ -13,7 +16,9 @@ pub mod install_cmd;
|
||||
pub mod list_cmd;
|
||||
pub mod log_cmd;
|
||||
pub mod logs_cmd;
|
||||
pub mod man_cmd;
|
||||
pub mod open_cmd;
|
||||
pub mod profile_cmd;
|
||||
pub mod projects_cmd;
|
||||
pub mod run_cmd;
|
||||
pub mod search_cmd;
|
||||
@@ -65,6 +70,16 @@ pub fn execute_command(app: &App, cmd: &Command) -> Result<i32> {
|
||||
notify,
|
||||
interval,
|
||||
} => watch_cmd::run(app, agent, *restart, *notify, *interval),
|
||||
Command::Dashboard => dashboard_cmd::run(app),
|
||||
Command::Favorite { agent } => annotations_cmd::run_favorite(app, agent),
|
||||
Command::Unfavorite { agent } => annotations_cmd::run_unfavorite(app, agent),
|
||||
Command::Note { agent, text } => annotations_cmd::run_note(app, agent, text),
|
||||
Command::Tag { agent, words } => annotations_cmd::run_tag(app, agent, words),
|
||||
Command::Untag { agent, tag } => annotations_cmd::run_untag(app, agent, tag),
|
||||
Command::Tags { agent } => annotations_cmd::run_tags(app, agent.as_deref()),
|
||||
Command::Profile(sub) => profile_cmd::run(app, sub),
|
||||
Command::Man { command, output } => man_cmd::run(app, command.as_deref(), output.as_deref()),
|
||||
Command::Agents { installed } => agents_cmd::run(app, *installed),
|
||||
Command::Alias(sub) => alias_cmd::run(app, sub),
|
||||
Command::Secret(sub) => secret_cmd::run(app, sub),
|
||||
Command::Start(a) => run_cmd::start(app, a),
|
||||
@@ -121,7 +136,9 @@ pub fn execute_command(app: &App, cmd: &Command) -> Result<i32> {
|
||||
} => install_cmd::run(app, agent, method.as_deref(), *force),
|
||||
Command::Uninstall { agent, purge } => uninstall_cmd::run(app, agent, *purge),
|
||||
Command::Update { agent, all } => update_cmd::run(app, agent.as_deref(), *all),
|
||||
Command::Search { keyword, category } => search_cmd::run(app, keyword, category.as_deref()),
|
||||
Command::Search { keyword, category, tag } => {
|
||||
search_cmd::run(app, keyword.as_deref(), category.as_deref(), tag.as_deref())
|
||||
}
|
||||
Command::History {
|
||||
kind,
|
||||
cwd,
|
||||
@@ -147,7 +164,7 @@ pub fn execute_command(app: &App, cmd: &Command) -> Result<i32> {
|
||||
Command::Config(sub) => config_cmd::run(app, sub),
|
||||
Command::Doctor { fix } => doctor_cmd::run(app, *fix),
|
||||
Command::Run { agent, args } => run_cmd::run(app, agent, args),
|
||||
Command::Completion { shell } => completion_cmd::run(*shell),
|
||||
Command::Completion { shell, installed } => completion_cmd::run(*shell, *installed),
|
||||
Command::SelfUpdate { check, to } => self_update::run(app, *check, to.as_deref()),
|
||||
Command::SelfUninstall => self_uninstall::run(app),
|
||||
Command::Export { output } => export_import::export_cmd(app, output),
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
//! profile: environment profiles (issue #40) — a named set of
|
||||
//! agent + env + args, defined in the config, applied with
|
||||
//! 'am start <agent> --profile dev'.
|
||||
|
||||
use super::*;
|
||||
use crate::cli::ProfileCmd;
|
||||
use crate::config::Profile;
|
||||
use crate::output::{boxed_table, print_json};
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Serialize)]
|
||||
struct ProfileJson {
|
||||
name: String,
|
||||
agent: Option<String>,
|
||||
env: BTreeMap<String, String>,
|
||||
args: Vec<String>,
|
||||
}
|
||||
|
||||
pub fn run(app: &App, cmd: &ProfileCmd) -> Result<i32> {
|
||||
match cmd {
|
||||
ProfileCmd::List => run_list(app),
|
||||
ProfileCmd::Show { name } => run_show(app, name),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn run_list(app: &App) -> Result<i32> {
|
||||
if app.config.profiles.is_empty() {
|
||||
app.log.info(
|
||||
"no profiles defined — add a 'profiles:' section to your config, e.g.:\n\
|
||||
profiles:\n\
|
||||
\x20 dev:\n\
|
||||
\x20 agent: claude-code\n\
|
||||
\x20 env: {DEBUG: \"1\"}\n\
|
||||
\x20 args: [--model, sonnet]",
|
||||
);
|
||||
return Ok(0);
|
||||
}
|
||||
let rows: Vec<ProfileJson> = app
|
||||
.config
|
||||
.profiles
|
||||
.iter()
|
||||
.map(|(name, p)| ProfileJson {
|
||||
name: name.clone(),
|
||||
agent: p.agent.clone(),
|
||||
env: p.env.clone(),
|
||||
args: p.args.clone(),
|
||||
})
|
||||
.collect();
|
||||
if app.json() {
|
||||
print_json(&rows);
|
||||
return Ok(0);
|
||||
}
|
||||
let mut table_rows = Vec::new();
|
||||
for r in &rows {
|
||||
table_rows.push(vec![
|
||||
r.name.clone(),
|
||||
r.agent.clone().unwrap_or_else(|| "—".to_string()),
|
||||
if r.env.is_empty() {
|
||||
"—".to_string()
|
||||
} else {
|
||||
r.env
|
||||
.iter()
|
||||
.map(|(k, v)| format!("{k}={v}"))
|
||||
.collect::<Vec<_>>()
|
||||
.join(" ")
|
||||
},
|
||||
if r.args.is_empty() {
|
||||
"—".to_string()
|
||||
} else {
|
||||
r.args.join(" ")
|
||||
},
|
||||
]);
|
||||
}
|
||||
print!(
|
||||
"{}",
|
||||
boxed_table(
|
||||
vec!["PROFILE", "AGENT", "ENV", "ARGS"],
|
||||
table_rows,
|
||||
app.theme(),
|
||||
app.color(),
|
||||
)
|
||||
);
|
||||
Ok(0)
|
||||
}
|
||||
|
||||
pub fn run_show(app: &App, name: &str) -> Result<i32> {
|
||||
let profile = resolve(app, name)?;
|
||||
if app.json() {
|
||||
print_json(&ProfileJson {
|
||||
name: name.to_string(),
|
||||
agent: profile.agent.clone(),
|
||||
env: profile.env.clone(),
|
||||
args: profile.args.clone(),
|
||||
});
|
||||
return Ok(0);
|
||||
}
|
||||
println!("{}", name);
|
||||
if let Some(a) = &profile.agent {
|
||||
println!(" agent {a}");
|
||||
}
|
||||
if profile.env.is_empty() {
|
||||
println!(" env —");
|
||||
} else {
|
||||
for (k, v) in &profile.env {
|
||||
println!(" env {k}={v}");
|
||||
}
|
||||
}
|
||||
if profile.args.is_empty() {
|
||||
println!(" args —");
|
||||
} else {
|
||||
println!(" args {}", profile.args.join(" "));
|
||||
}
|
||||
Ok(0)
|
||||
}
|
||||
|
||||
/// Resolve a profile by name; unknown names fail with the list of profiles.
|
||||
pub fn resolve<'a>(app: &'a App, name: &str) -> Result<&'a Profile> {
|
||||
app.config.profiles.get(name).ok_or_else(|| {
|
||||
let available = if app.config.profiles.is_empty() {
|
||||
"no profile is defined in the config".to_string()
|
||||
} else {
|
||||
format!(
|
||||
"available profiles: {}",
|
||||
app.config.profiles.keys().cloned().collect::<Vec<_>>().join(", ")
|
||||
)
|
||||
};
|
||||
anyhow!("unknown profile '{name}' — {available}")
|
||||
})
|
||||
}
|
||||
|
||||
/// Apply a profile to launch parameters: its args are appended and its env
|
||||
/// entries override the base ones (the profile wins — it is the most
|
||||
/// specific input at launch time).
|
||||
pub fn apply(
|
||||
app: &App,
|
||||
name: Option<&str>,
|
||||
base_args: &[String],
|
||||
base_env: &BTreeMap<String, String>,
|
||||
) -> Result<(Vec<String>, BTreeMap<String, String>)> {
|
||||
let Some(name) = name else {
|
||||
return Ok((base_args.to_vec(), base_env.clone()));
|
||||
};
|
||||
let profile = resolve(app, name)?;
|
||||
let mut args = base_args.to_vec();
|
||||
args.extend(profile.args.iter().cloned());
|
||||
let mut env = base_env.clone();
|
||||
env.extend(profile.env.clone());
|
||||
Ok((args, env))
|
||||
}
|
||||
|
||||
/// The default agent declared by a profile, if any.
|
||||
pub fn default_agent<'a>(app: &'a App, name: Option<&str>) -> Result<Option<&'a str>> {
|
||||
match name {
|
||||
None => Ok(None),
|
||||
Some(n) => Ok(resolve(app, n)?.agent.as_deref()),
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use clap::Parser;
|
||||
|
||||
fn cfg_with_profiles() -> App {
|
||||
// The TempDir guard would delete the directory when this helper
|
||||
// returns; leak it on purpose so the App keeps a live state dir.
|
||||
let guard = tempfile::tempdir().unwrap();
|
||||
let dir = guard.path().to_path_buf();
|
||||
std::mem::forget(guard);
|
||||
let cfg = dir.join("config.yaml");
|
||||
std::fs::write(
|
||||
&cfg,
|
||||
"version: \"1.0\"\nsettings:\n auto_install_deps: false\n confirm_before_run: false\nprofiles:\n dev:\n agent: claude-code\n env:\n DEBUG: \"1\"\n LOG_LEVEL: debug\n args: [--model, sonnet]\n prod:\n env:\n LOG_LEVEL: info\nagents: []\n",
|
||||
)
|
||||
.unwrap();
|
||||
let cli = crate::cli::Cli::parse_from(["am", "--config", cfg.to_str().unwrap()]);
|
||||
let mut app = App::from_cli(cli).unwrap();
|
||||
let mut p = app.paths.clone();
|
||||
p.install_dir = dir.join("agents");
|
||||
p.bin_dir = dir.join("agents").join("bin");
|
||||
p.log_dir = dir.join("logs");
|
||||
p.state_file = dir.join("state.json");
|
||||
p.probe_cache_file = dir.join("probe-cache.json");
|
||||
p.config_dir = Some(dir.join("config"));
|
||||
app.paths = p;
|
||||
app
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn apply_merges_args_and_env() {
|
||||
let app = cfg_with_profiles();
|
||||
let (args, env) = apply(&app, Some("dev"), &["--base".to_string()], &BTreeMap::from([("KEEP".into(), "1".into())]))
|
||||
.unwrap();
|
||||
assert_eq!(args, vec!["--base", "--model", "sonnet"]);
|
||||
assert_eq!(env.get("DEBUG").map(String::as_str), Some("1"));
|
||||
assert_eq!(env.get("KEEP").map(String::as_str), Some("1"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn unknown_profile_lists_available() {
|
||||
let app = cfg_with_profiles();
|
||||
let err = resolve(&app, "staging").unwrap_err().to_string();
|
||||
assert!(err.contains("unknown profile 'staging'"), "{err}");
|
||||
assert!(err.contains("dev") && err.contains("prod"), "{err}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn none_profile_is_noop() {
|
||||
let app = cfg_with_profiles();
|
||||
let (args, env) = apply(&app, None, &["x".to_string()], &BTreeMap::new()).unwrap();
|
||||
assert_eq!(args, vec!["x"]);
|
||||
assert!(env.is_empty());
|
||||
}
|
||||
}
|
||||
+53
-6
@@ -28,12 +28,47 @@ pub fn start(app: &App, opts: &StartArgs) -> Result<i32> {
|
||||
start_with_cwd(app, opts, None)
|
||||
}
|
||||
|
||||
/// Apply the environment profile (issue #40): the explicit --profile wins;
|
||||
/// otherwise the current project's default profile applies when launching
|
||||
/// the project's default agent.
|
||||
fn apply_profile(
|
||||
app: &App,
|
||||
explicit: Option<&str>,
|
||||
project_default_agent: bool,
|
||||
extra_args: &[String],
|
||||
extra_env: &BTreeMap<String, String>,
|
||||
) -> Result<(Vec<String>, BTreeMap<String, String>)> {
|
||||
let mut profile = explicit;
|
||||
if profile.is_none() && project_default_agent {
|
||||
let current = std::env::current_dir().unwrap_or_default();
|
||||
if let Some((_, pp)) = crate::projects::profile_for(app, ¤t) {
|
||||
profile = pp.profile.as_deref();
|
||||
}
|
||||
}
|
||||
crate::commands::profile_cmd::apply(app, profile, extra_args, extra_env)
|
||||
}
|
||||
|
||||
/// Start with an explicit working directory (used by sessions resume).
|
||||
pub fn start_with_cwd(app: &App, opts: &StartArgs, cwd: Option<&std::path::Path>) -> Result<i32> {
|
||||
let current = std::env::current_dir().unwrap_or_default();
|
||||
let target = resolve_start_target(app, ¤t, opts.agent.as_deref())?;
|
||||
let explicit = opts.agent.as_deref().filter(|s| !s.is_empty());
|
||||
// A profile may declare its own default agent (issue #40).
|
||||
let profile_default = profile_cmd::default_agent(app, opts.profile.as_deref())?;
|
||||
let target = match (explicit, profile_default) {
|
||||
(Some(a), _) => a.to_string(),
|
||||
(None, Some(a)) => a.to_string(),
|
||||
(None, None) => resolve_start_target(app, ¤t, None)?,
|
||||
};
|
||||
let extra_env = parse_env_list(&opts.env)?;
|
||||
let extra_args = parse_extra_args(&opts.args);
|
||||
let project_default_agent = explicit.is_none() && profile_default.is_none();
|
||||
let (extra_args, extra_env) = apply_profile(
|
||||
app,
|
||||
opts.profile.as_deref(),
|
||||
project_default_agent,
|
||||
&extra_args,
|
||||
&extra_env,
|
||||
)?;
|
||||
if let Some(group) = crate::catalog::Catalog::parse_group_selector(&target) {
|
||||
let members = app.catalog.group_members(group);
|
||||
if members.is_empty() {
|
||||
@@ -228,7 +263,23 @@ fn stop_one(app: &App, agent: &AgentDef, force: bool, timeout: u64) -> Result<i3
|
||||
pub fn restart(app: &App, opts: &StartArgs, force: bool, timeout: Option<u64>) -> Result<i32> {
|
||||
let timeout = timeout.unwrap_or_else(|| app.config.settings.stop_timeout());
|
||||
let cwd = std::env::current_dir().unwrap_or_default();
|
||||
let target = resolve_start_target(app, &cwd, opts.agent.as_deref())?;
|
||||
let explicit = opts.agent.as_deref().filter(|s| !s.is_empty());
|
||||
let profile_default = profile_cmd::default_agent(app, opts.profile.as_deref())?;
|
||||
let target = match (explicit, profile_default) {
|
||||
(Some(a), _) => a.to_string(),
|
||||
(None, Some(a)) => a.to_string(),
|
||||
(None, None) => resolve_start_target(app, &cwd, None)?,
|
||||
};
|
||||
let extra_env = parse_env_list(&opts.env)?;
|
||||
let extra_args = parse_extra_args(&opts.args);
|
||||
let project_default_agent = explicit.is_none() && profile_default.is_none();
|
||||
let (extra_args, extra_env) = apply_profile(
|
||||
app,
|
||||
opts.profile.as_deref(),
|
||||
project_default_agent,
|
||||
&extra_args,
|
||||
&extra_env,
|
||||
)?;
|
||||
if let Some(group) = crate::catalog::Catalog::parse_group_selector(&target) {
|
||||
let members = app.catalog.group_members(group);
|
||||
if members.is_empty() {
|
||||
@@ -237,8 +288,6 @@ pub fn restart(app: &App, opts: &StartArgs, force: bool, timeout: Option<u64>) -
|
||||
for m in members.iter().rev() {
|
||||
stop_one(app, m, force, timeout)?;
|
||||
}
|
||||
let extra_env = parse_env_list(&opts.env)?;
|
||||
let extra_args = parse_extra_args(&opts.args);
|
||||
for m in members {
|
||||
start_one(app, m, &extra_args, &extra_env, opts.notify, true, None)?;
|
||||
}
|
||||
@@ -246,8 +295,6 @@ pub fn restart(app: &App, opts: &StartArgs, force: bool, timeout: Option<u64>) -
|
||||
}
|
||||
let agent = require_agent(app, &target)?;
|
||||
stop_one(app, agent, force, timeout)?;
|
||||
let extra_env = parse_env_list(&opts.env)?;
|
||||
let extra_args = parse_extra_args(&opts.args);
|
||||
start_one(app, agent, &extra_args, &extra_env, opts.notify, opts.background, None)
|
||||
}
|
||||
|
||||
|
||||
@@ -13,14 +13,48 @@ struct SearchRow {
|
||||
description: Option<String>,
|
||||
website: Option<String>,
|
||||
tags: Vec<String>,
|
||||
/// Personal tags (issue #39).
|
||||
personal_tags: Vec<String>,
|
||||
favorite: bool,
|
||||
}
|
||||
|
||||
pub fn run(app: &App, keyword: &str, category: Option<&str>) -> Result<i32> {
|
||||
let hits = app.catalog.search(keyword, category);
|
||||
pub fn run(app: &App, keyword: Option<&str>, category: Option<&str>, tag: Option<&str>) -> Result<i32> {
|
||||
let keyword = keyword.unwrap_or("");
|
||||
// An empty keyword (search --tag only) starts from the whole catalog.
|
||||
let mut hits: Vec<&AgentDef> = if keyword.is_empty() {
|
||||
app.catalog
|
||||
.agents()
|
||||
.iter()
|
||||
.filter(|a| !a.hidden)
|
||||
.filter(|a| category.map_or(true, |c| a.category.as_deref() == Some(c)))
|
||||
.collect()
|
||||
} else {
|
||||
app.catalog.search(keyword, category)
|
||||
};
|
||||
// Personal tag filter (issue #39): keep agents carrying this tag.
|
||||
if let Some(t) = tag {
|
||||
let tagged = crate::commands::annotations_cmd::agents_with_tag(app, t);
|
||||
if tagged.is_empty() {
|
||||
app.log.info(&format!(
|
||||
"no agent is tagged '{t}' — 'am tags' lists every personal tag"
|
||||
));
|
||||
return Ok(0);
|
||||
}
|
||||
hits.retain(|a| tagged.contains(&a.name));
|
||||
}
|
||||
if hits.is_empty() && tag.is_some() {
|
||||
app.log.info(&format!(
|
||||
"no agent matches the keyword and the tag '{}'",
|
||||
tag.unwrap_or("")
|
||||
));
|
||||
return Ok(0);
|
||||
}
|
||||
if app.json() {
|
||||
let rows: Vec<SearchRow> = hits
|
||||
.iter()
|
||||
.map(|a| SearchRow {
|
||||
.map(|a| {
|
||||
let personal = crate::commands::annotations_cmd::tags_of(app, &a.name);
|
||||
SearchRow {
|
||||
name: a.name.clone(),
|
||||
display_name: a.title().to_string(),
|
||||
category: a.category.clone(),
|
||||
@@ -28,16 +62,24 @@ pub fn run(app: &App, keyword: &str, category: Option<&str>) -> Result<i32> {
|
||||
description: a.description.clone(),
|
||||
website: a.website.clone(),
|
||||
tags: a.tags.clone(),
|
||||
personal_tags: personal,
|
||||
favorite: crate::commands::annotations_cmd::is_favorite(app, &a.name),
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
print_json(&rows);
|
||||
return Ok(0);
|
||||
}
|
||||
let mut table_rows = Vec::new();
|
||||
for a in hits {
|
||||
for a in &hits {
|
||||
let desc = truncate(a.description.as_deref().unwrap_or(""), 56);
|
||||
let star = if crate::commands::annotations_cmd::is_favorite(app, &a.name) {
|
||||
"★ "
|
||||
} else {
|
||||
""
|
||||
};
|
||||
table_rows.push(vec![
|
||||
a.title().to_string(),
|
||||
format!("{star}{}", a.title()),
|
||||
a.category.clone().unwrap_or_else(|| "—".to_string()),
|
||||
if a.installable { "yes" } else { "no" }.to_string(),
|
||||
desc,
|
||||
@@ -52,7 +94,7 @@ pub fn run(app: &App, keyword: &str, category: Option<&str>) -> Result<i32> {
|
||||
app.color(),
|
||||
)
|
||||
);
|
||||
if app.catalog.search(keyword, category).is_empty() {
|
||||
if hits.is_empty() && !keyword.is_empty() {
|
||||
let suggestions = app.catalog.suggest(keyword);
|
||||
if suggestions.is_empty() {
|
||||
app.log
|
||||
|
||||
@@ -13,7 +13,10 @@ pub fn run(app: &App, check: bool, to: Option<&Path>) -> Result<i32> {
|
||||
);
|
||||
};
|
||||
let current = env!("CARGO_PKG_VERSION");
|
||||
let release = download::latest_release(&repo)?;
|
||||
let release = download::latest_release_with_base(
|
||||
&repo,
|
||||
app.config.settings.self_update_base_url.as_deref(),
|
||||
)?;
|
||||
let tag = release.tag_name.trim_start_matches('v').to_string();
|
||||
|
||||
if check {
|
||||
|
||||
@@ -40,7 +40,13 @@ fn status_one(app: &App, name: &str, probe: &ExternalInfo) -> Result<i32> {
|
||||
}
|
||||
let color = app.color();
|
||||
let theme = app.theme();
|
||||
println!("{} ({})", agent.title(), agent.name);
|
||||
// Favorite star (issue #39).
|
||||
let star = if crate::commands::annotations_cmd::is_favorite(app, &agent.name) {
|
||||
"★ "
|
||||
} else {
|
||||
""
|
||||
};
|
||||
println!("{}{} ({})", star, agent.title(), agent.name);
|
||||
let status_line = status_style(&detail.status, theme, color);
|
||||
let mut rows: Vec<(String, String)> = vec![
|
||||
("agent".to_string(), agent.name.clone()),
|
||||
@@ -107,8 +113,13 @@ fn status_all(app: &App, probe: &ExternalInfo) -> Result<i32> {
|
||||
let theme = app.theme();
|
||||
let mut table_rows = Vec::new();
|
||||
for r in &rows {
|
||||
let star = if crate::commands::annotations_cmd::is_favorite(app, &r.name) {
|
||||
"★ "
|
||||
} else {
|
||||
""
|
||||
};
|
||||
table_rows.push(vec![
|
||||
r.display_name.clone(),
|
||||
format!("{star}{}", r.display_name),
|
||||
r.version.clone().unwrap_or_else(|| "—".to_string()),
|
||||
status_style(&r.status, theme, color),
|
||||
r.pid.map(|p| p.to_string()).unwrap_or_else(|| "—".to_string()),
|
||||
|
||||
+36
-1
@@ -38,6 +38,27 @@ pub struct Config {
|
||||
/// Per-project profiles: root, default agent, env and hooks.
|
||||
#[serde(default)]
|
||||
pub projects: BTreeMap<String, ProjectProfile>,
|
||||
/// Environment profiles: a reusable set of agent + env + args
|
||||
/// (issue #40) - 'am start <agent> --profile dev'.
|
||||
#[serde(default)]
|
||||
pub profiles: BTreeMap<String, Profile>,
|
||||
}
|
||||
|
||||
/// An environment profile: a named set of agent, env and args applied at
|
||||
/// launch time (issue #40).
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct Profile {
|
||||
/// Default agent for this profile (used by 'am start --profile dev'
|
||||
/// without an agent name).
|
||||
#[serde(default)]
|
||||
pub agent: Option<String>,
|
||||
/// Environment variables injected when launching with this profile.
|
||||
#[serde(default)]
|
||||
pub env: BTreeMap<String, String>,
|
||||
/// Extra arguments appended to the run command.
|
||||
#[serde(default)]
|
||||
pub args: Vec<String>,
|
||||
}
|
||||
|
||||
fn default_version() -> String {
|
||||
@@ -66,9 +87,13 @@ pub struct Settings {
|
||||
/// Grace period (seconds) between SIGTERM and SIGKILL; 0 = default (5).
|
||||
#[serde(default)]
|
||||
pub stop_timeout_secs: u64,
|
||||
/// GitHub repository (owner/repo) used by the self-update command.
|
||||
/// Repository (owner/repo) used by the self-update command.
|
||||
#[serde(default)]
|
||||
pub self_update_repo: Option<String>,
|
||||
/// API base URL of the release server (default: GitHub api.github.com;
|
||||
/// set to https://git.dracodev.net/api/v1 for a Gitea instance).
|
||||
#[serde(default)]
|
||||
pub self_update_base_url: Option<String>,
|
||||
/// Color theme for the output (see 'am help theme' for the list; the
|
||||
/// --theme flag overrides it).
|
||||
#[serde(default)]
|
||||
@@ -94,6 +119,10 @@ pub struct ProjectProfile {
|
||||
/// Hooks: on_start / on_stop / on_install / on_update command lines.
|
||||
#[serde(default)]
|
||||
pub hooks: BTreeMap<String, Vec<String>>,
|
||||
/// Default environment profile applied when launching the default
|
||||
/// agent (issue #40).
|
||||
#[serde(default)]
|
||||
pub profile: Option<String>,
|
||||
}
|
||||
|
||||
impl Settings {
|
||||
@@ -501,6 +530,9 @@ pub fn merge(base: &mut Config, overlay: Config) {
|
||||
if o.self_update_repo.is_some() {
|
||||
s.self_update_repo = o.self_update_repo;
|
||||
}
|
||||
if o.self_update_base_url.is_some() {
|
||||
s.self_update_base_url = o.self_update_base_url;
|
||||
}
|
||||
for (k, v) in o.hooks {
|
||||
s.hooks.insert(k, v);
|
||||
}
|
||||
@@ -520,6 +552,9 @@ pub fn merge(base: &mut Config, overlay: Config) {
|
||||
for (k, v) in overlay.projects {
|
||||
base.projects.insert(k, v);
|
||||
}
|
||||
for (k, v) in overlay.profiles {
|
||||
base.profiles.insert(k, v);
|
||||
}
|
||||
}
|
||||
|
||||
/// Validate a merged config. Returns a list of human-readable problems.
|
||||
|
||||
@@ -0,0 +1,286 @@
|
||||
//! Dashboard data: one snapshot of the whole fleet (issue #33), shared by
|
||||
//! the TUI ('am dashboard') and its tests. Pure reads — never blocks on an
|
||||
//! empty journal and never panics on missing files.
|
||||
|
||||
use crate::app::App;
|
||||
use crate::commands::stats_cmd;
|
||||
use crate::events;
|
||||
use crate::projects;
|
||||
use crate::projects::ProjectSummary;
|
||||
use crate::sessions;
|
||||
use crate::sessions::SessionRecord;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
pub struct OverviewRow {
|
||||
pub name: String,
|
||||
pub display_name: String,
|
||||
pub status: String,
|
||||
pub version: Option<String>,
|
||||
pub pid: Option<u32>,
|
||||
pub uptime_s: Option<u64>,
|
||||
pub favorite: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
pub struct ActivityRow {
|
||||
pub ts: String,
|
||||
pub kind: String,
|
||||
pub agent: Option<String>,
|
||||
pub detail: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
pub struct StatsRow {
|
||||
pub agent: String,
|
||||
pub launches: u64,
|
||||
pub failures: u64,
|
||||
pub total_duration_s: u64,
|
||||
pub last_used: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
pub struct SessionRow {
|
||||
pub id: String,
|
||||
pub kind: String,
|
||||
pub agent: Option<String>,
|
||||
pub project: Option<String>,
|
||||
pub started_at: String,
|
||||
pub status: String,
|
||||
pub duration_s: Option<u64>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Default, Serialize)]
|
||||
pub struct DashCounts {
|
||||
pub installed: usize,
|
||||
pub running: usize,
|
||||
pub sessions_count: u64,
|
||||
pub last_used: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Default, Serialize)]
|
||||
pub struct DashData {
|
||||
pub counts: DashCounts,
|
||||
pub overview: Vec<OverviewRow>,
|
||||
pub activity: Vec<ActivityRow>,
|
||||
pub stats: Vec<StatsRow>,
|
||||
pub sessions: Vec<SessionRow>,
|
||||
pub projects: Vec<ProjectSummary>,
|
||||
}
|
||||
|
||||
/// Read uptime from a running entry.
|
||||
pub fn uptime_s(entry: &crate::state::InstalledEntry) -> Option<u64> {
|
||||
let started = entry.started_at.as_deref()?;
|
||||
let ts = chrono::DateTime::parse_from_rfc3339(started).ok()?;
|
||||
let now = chrono::Utc::now();
|
||||
let dur = now.signed_duration_since(ts.with_timezone(&chrono::Utc));
|
||||
Some(dur.num_seconds().max(0) as u64)
|
||||
}
|
||||
|
||||
/// Build one snapshot of the fleet. Never fails: missing data degrades to
|
||||
/// empty sections (the TUI must not block on an empty journal).
|
||||
pub fn collect(app: &App) -> DashData {
|
||||
let entries = app.state.all().unwrap_or_default();
|
||||
let probe = crate::probe::detect_externals(app);
|
||||
let mut overview: Vec<OverviewRow> = Vec::new();
|
||||
let mut running = 0usize;
|
||||
for agent in app.catalog.agents() {
|
||||
if agent.hidden {
|
||||
continue;
|
||||
}
|
||||
let entry = entries.get(&agent.name);
|
||||
let (status, pid, uptime) = if let Some(e) = entry {
|
||||
if e.pid.map(crate::process::is_running).unwrap_or(false) {
|
||||
running += 1;
|
||||
( "running".to_string(), e.pid, uptime_s(e) )
|
||||
} else {
|
||||
("installed".to_string(), None, None)
|
||||
}
|
||||
} else if probe.path_of(&agent.name).is_some() {
|
||||
("external".to_string(), None, None)
|
||||
} else if !agent.installable {
|
||||
("not-installable".to_string(), None, None)
|
||||
} else {
|
||||
("not-installed".to_string(), None, None)
|
||||
};
|
||||
let version = entry
|
||||
.and_then(|e| e.version.clone())
|
||||
.or_else(|| agent.version.clone());
|
||||
overview.push(OverviewRow {
|
||||
name: agent.name.clone(),
|
||||
display_name: agent.title().to_string(),
|
||||
status,
|
||||
version,
|
||||
pid,
|
||||
uptime_s: uptime,
|
||||
favorite: crate::commands::annotations_cmd::is_favorite(app, &agent.name),
|
||||
});
|
||||
}
|
||||
|
||||
// Activity: newest first.
|
||||
let mut activity: Vec<ActivityRow> = events::read_events(&app.events_dir(), 200)
|
||||
.into_iter()
|
||||
.rev()
|
||||
.map(|ev| ActivityRow {
|
||||
ts: ev.ts.clone(),
|
||||
kind: ev.kind.as_str().to_string(),
|
||||
agent: ev.agent.clone(),
|
||||
detail: match ev.kind {
|
||||
events::EventKind::Start | events::EventKind::Run => {
|
||||
let mut d = ev.args.join(" ");
|
||||
if d.is_empty() {
|
||||
d = ev.reason.clone().unwrap_or_default();
|
||||
}
|
||||
d
|
||||
}
|
||||
events::EventKind::Install => "install".to_string(),
|
||||
events::EventKind::Update => "update".to_string(),
|
||||
events::EventKind::Stop => "stop".to_string(),
|
||||
events::EventKind::Uninstall => "uninstall".to_string(),
|
||||
events::EventKind::Annotate => ev.reason.clone().unwrap_or_default(),
|
||||
_ => ev.reason.clone().unwrap_or_default(),
|
||||
},
|
||||
})
|
||||
.collect();
|
||||
activity.truncate(200);
|
||||
|
||||
// Stats: by launch count, then by name.
|
||||
let mut stats: Vec<StatsRow> = stats_cmd::aggregate(app, None, None)
|
||||
.unwrap_or_default()
|
||||
.into_iter()
|
||||
.map(|s| StatsRow {
|
||||
agent: s.agent,
|
||||
launches: s.launches,
|
||||
failures: s.failures,
|
||||
total_duration_s: s.total_duration_s,
|
||||
last_used: s.last_used,
|
||||
})
|
||||
.collect();
|
||||
stats.sort_by(|a, b| b.launches.cmp(&a.launches).then(a.agent.cmp(&b.agent)));
|
||||
|
||||
// Sessions: newest first.
|
||||
let mut sessions: Vec<SessionRow> = sessions::load(app)
|
||||
.map(|sf| {
|
||||
sf.sessions
|
||||
.into_values()
|
||||
.map(|r: SessionRecord| {
|
||||
let dur = sessions::duration_s(&r);
|
||||
SessionRow {
|
||||
id: r.id,
|
||||
kind: r.kind,
|
||||
agent: r.agent,
|
||||
project: r.project,
|
||||
started_at: r.started_at,
|
||||
status: r.status,
|
||||
duration_s: dur,
|
||||
}
|
||||
})
|
||||
.collect()
|
||||
})
|
||||
.unwrap_or_default();
|
||||
sessions.sort_by(|a, b| b.started_at.cmp(&a.started_at));
|
||||
|
||||
let counts = DashCounts {
|
||||
installed: entries.len(),
|
||||
running,
|
||||
sessions_count: app
|
||||
.state
|
||||
.load()
|
||||
.map(|sf| sf.sessions_count)
|
||||
.unwrap_or(0),
|
||||
last_used: app.state.load().ok().and_then(|sf| sf.last_used),
|
||||
};
|
||||
|
||||
DashData {
|
||||
counts,
|
||||
overview,
|
||||
activity,
|
||||
stats,
|
||||
sessions,
|
||||
projects: projects::aggregate(app),
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use clap::Parser;
|
||||
|
||||
fn app_in(dir: &std::path::Path) -> App {
|
||||
let cfg = dir.join("config.yaml");
|
||||
std::fs::write(
|
||||
&cfg,
|
||||
"version: \"1.0\"\nsettings:\n auto_install_deps: false\nagents: []\n",
|
||||
)
|
||||
.unwrap();
|
||||
let cli = crate::cli::Cli::parse_from(["am", "--config", cfg.to_str().unwrap()]);
|
||||
let mut app = crate::app::App::from_cli(cli).unwrap();
|
||||
let mut p = app.paths.clone();
|
||||
p.install_dir = dir.join("agents");
|
||||
p.bin_dir = dir.join("agents").join("bin");
|
||||
p.log_dir = dir.join("logs");
|
||||
p.state_file = dir.join("state.json");
|
||||
p.probe_cache_file = dir.join("probe-cache.json");
|
||||
p.config_dir = Some(dir.join("config"));
|
||||
app.paths = p;
|
||||
app
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn empty_journal_produces_empty_sections_without_panicking() {
|
||||
let guard = tempfile::tempdir().unwrap();
|
||||
let dir = guard.path().to_path_buf();
|
||||
std::mem::forget(guard);
|
||||
let app = app_in(&dir);
|
||||
let data = collect(&app);
|
||||
assert_eq!(data.counts.installed, 0);
|
||||
assert_eq!(data.counts.running, 0);
|
||||
assert!(data.activity.is_empty());
|
||||
assert!(data.stats.is_empty());
|
||||
assert!(data.sessions.is_empty());
|
||||
// Catalog agents still show in the overview (not-installed).
|
||||
assert!(!data.overview.is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn journal_events_feed_activity_newest_first() {
|
||||
let guard = tempfile::tempdir().unwrap();
|
||||
let dir = guard.path().to_path_buf();
|
||||
std::mem::forget(guard);
|
||||
let month = chrono::Utc::now().format("%Y%m");
|
||||
std::fs::write(
|
||||
dir.join(format!("events-{month}.jsonl")),
|
||||
concat!(
|
||||
"{\"ts\":\"2026-08-01T10:00:00Z\",\"kind\":\"run\",\"agent\":\"a\",\"exit_code\":0}\n",
|
||||
"{\"ts\":\"2026-08-02T10:00:00Z\",\"kind\":\"install\",\"agent\":\"b\"}\n",
|
||||
),
|
||||
)
|
||||
.unwrap();
|
||||
let app = app_in(&dir);
|
||||
let data = collect(&app);
|
||||
assert_eq!(data.activity.len(), 2);
|
||||
assert_eq!(data.activity[0].agent.as_deref(), Some("b"));
|
||||
assert_eq!(data.activity[0].kind, "install");
|
||||
assert_eq!(data.stats.len(), 2);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn uptime_is_computed_from_started_at() {
|
||||
let entry = crate::state::InstalledEntry {
|
||||
name: "x".to_string(),
|
||||
version: None,
|
||||
method: "npm".to_string(),
|
||||
install_dir: "/tmp/x".to_string(),
|
||||
bins: vec![],
|
||||
run: "x".to_string(),
|
||||
installed_at: "2026-01-01T00:00:00Z".to_string(),
|
||||
updated_at: None,
|
||||
pid: None,
|
||||
started_at: Some(chrono::Utc::now().to_rfc3339()),
|
||||
};
|
||||
let s = uptime_s(&entry).unwrap();
|
||||
assert!(s < 60, "uptime should be seconds, got {s}");
|
||||
let old = crate::state::InstalledEntry { started_at: Some("2026-01-01T00:00:00Z".to_string()), ..entry };
|
||||
assert!(uptime_s(&old).unwrap() > 3600);
|
||||
}
|
||||
}
|
||||
+15
-6
@@ -150,19 +150,28 @@ fn github_auth_header() -> Option<String> {
|
||||
}
|
||||
|
||||
pub fn latest_release(repo: &str) -> Result<GhRelease> {
|
||||
match latest_release_api(repo) {
|
||||
latest_release_with_base(repo, None)
|
||||
}
|
||||
|
||||
/// Resolve the latest release, with an optional API base URL override
|
||||
/// (e.g. https://git.dracodev.net/api/v1 for a Gitea instance).
|
||||
pub fn latest_release_with_base(repo: &str, api_base: Option<&str>) -> Result<GhRelease> {
|
||||
let github = api_base.is_none() || api_base == Some("https://api.github.com");
|
||||
match latest_release_api(repo, api_base) {
|
||||
Ok(release) => Ok(release),
|
||||
Err(e) if format!("{e:#}").contains("rate limit") => {
|
||||
// The API is rate limited (60 unauthenticated requests/hour):
|
||||
// fall back to the GitHub web pages, which are not limited.
|
||||
Err(e) if github && format!("{e:#}").contains("rate limit") => {
|
||||
// The GitHub API is rate limited (60 unauthenticated
|
||||
// requests/hour): fall back to the GitHub web pages, which are
|
||||
// not limited. (Gitea has no equivalent web fallback.)
|
||||
latest_release_web(repo)
|
||||
}
|
||||
Err(e) => Err(e),
|
||||
}
|
||||
}
|
||||
|
||||
fn latest_release_api(repo: &str) -> Result<GhRelease> {
|
||||
let url = format!("https://api.github.com/repos/{repo}/releases/latest");
|
||||
fn latest_release_api(repo: &str, api_base: Option<&str>) -> Result<GhRelease> {
|
||||
let base = api_base.unwrap_or("https://api.github.com");
|
||||
let url = format!("{base}/repos/{repo}/releases/latest");
|
||||
let mut req = ureq::get(&url).set("User-Agent", USER_AGENT);
|
||||
if let Some(auth) = github_auth_header() {
|
||||
req = req.set("Authorization", &auth);
|
||||
|
||||
@@ -30,6 +30,8 @@ pub enum EventKind {
|
||||
Config,
|
||||
Repl,
|
||||
Shell,
|
||||
/// Personal annotations: favorite, note, tags (issue #39).
|
||||
Annotate,
|
||||
}
|
||||
|
||||
impl EventKind {
|
||||
@@ -46,6 +48,7 @@ impl EventKind {
|
||||
EventKind::Config => "config",
|
||||
EventKind::Repl => "repl",
|
||||
EventKind::Shell => "shell",
|
||||
EventKind::Annotate => "annotate",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+169
-6
@@ -429,10 +429,11 @@ pub static HELP_SPECS: &[HelpSpec] = &[
|
||||
name: "search",
|
||||
category: "Commands",
|
||||
usage: "search {flags} <keyword>",
|
||||
about: "Search the catalog by keyword (name, description, category, tags).",
|
||||
about: "Search the catalog by keyword (name, description, category, tags); --tag filters on personal tags.",
|
||||
search_terms: &["find", "catalog", "keyword"],
|
||||
flags: &[
|
||||
HelpFlag { short: "", long: "--category", value: "CATEGORY", desc: "Restrict to this category" },
|
||||
HelpFlag { short: "", long: "--tag", value: "TAG", desc: "Only agents carrying this personal tag" },
|
||||
],
|
||||
subcommands: &[],
|
||||
parameters: &[
|
||||
@@ -442,6 +443,7 @@ pub static HELP_SPECS: &[HelpSpec] = &[
|
||||
examples: &[
|
||||
HelpExample { desc: "Find agents related to rust.", code: "search rust" },
|
||||
HelpExample { desc: "Search within one category.", code: "search coding --category coding-agent" },
|
||||
HelpExample { desc: "Find agents tagged python.", code: "search --tag python" },
|
||||
],
|
||||
},
|
||||
HelpSpec {
|
||||
@@ -541,7 +543,7 @@ pub static HELP_SPECS: &[HelpSpec] = &[
|
||||
name: "start",
|
||||
category: "Commands",
|
||||
usage: "start {flags} <agent>",
|
||||
about: "Start an agent (foreground by default, or detached with --background).",
|
||||
about: "Start an agent (foreground by default, or detached with --background). --profile applies an environment profile (env + args).",
|
||||
search_terms: &["launch", "begin"],
|
||||
flags: START_FLAGS,
|
||||
subcommands: &[],
|
||||
@@ -553,6 +555,7 @@ pub static HELP_SPECS: &[HelpSpec] = &[
|
||||
HelpExample { desc: "Start an agent in the background.", code: "start claude-code --background" },
|
||||
HelpExample { desc: "Start with extra arguments.", code: "start claude-code --args \"--model sonnet\"" },
|
||||
HelpExample { desc: "Start every agent of a group.", code: "start group:dev --background" },
|
||||
HelpExample { desc: "Start with an environment profile.", code: "start claude-code --profile prod" },
|
||||
],
|
||||
},
|
||||
HelpSpec {
|
||||
@@ -661,9 +664,11 @@ pub static HELP_SPECS: &[HelpSpec] = &[
|
||||
name: "completion",
|
||||
category: "Commands",
|
||||
usage: "completion {flags} <shell>",
|
||||
about: "Generate a shell completion script (bash, zsh, fish, powershell, elvish).",
|
||||
about: "Generate a shell completion script (bash, zsh, fish, powershell, elvish). With --installed, Tab also completes the installed agents, aliases and groups.",
|
||||
search_terms: &["autocomplete", "shell"],
|
||||
flags: &[],
|
||||
flags: &[
|
||||
HelpFlag { short: "", long: "--installed", value: "", desc: "Add dynamic completion of installed agents, aliases and groups" },
|
||||
],
|
||||
subcommands: &[],
|
||||
parameters: &[
|
||||
HelpParam { name: "shell", typ: "oneof<bash, zsh, fish, powershell, elvish>", desc: "Shell to generate completions for" },
|
||||
@@ -671,14 +676,15 @@ pub static HELP_SPECS: &[HelpSpec] = &[
|
||||
io: None,
|
||||
examples: &[
|
||||
HelpExample { desc: "Generate PowerShell completions.", code: "completion powershell" },
|
||||
HelpExample { desc: "Generate bash completions with the installed agents.", code: "completion bash --installed" },
|
||||
],
|
||||
},
|
||||
HelpSpec {
|
||||
name: "self-update",
|
||||
category: "Commands",
|
||||
usage: "self-update {flags}",
|
||||
about: "Update agent-manager itself from GitHub Releases.",
|
||||
search_terms: &["upgrade", "release"],
|
||||
about: "Update agent-manager itself from the latest release (GitHub ou Gitea, selon settings.self_update_*).",
|
||||
search_terms: &["upgrade", "release", "gitea"],
|
||||
flags: &[
|
||||
HelpFlag { short: "", long: "--check", value: "", desc: "Only check whether a newer version exists" },
|
||||
HelpFlag { short: "", long: "--to", value: "FILE", desc: "Download the new binary to this path instead of replacing the current one" },
|
||||
@@ -738,6 +744,163 @@ pub static HELP_SPECS: &[HelpSpec] = &[
|
||||
HelpExample { desc: "Restore a backup.", code: "import am-export.json" },
|
||||
],
|
||||
},
|
||||
HelpSpec {
|
||||
name: "dashboard",
|
||||
category: "Commands",
|
||||
usage: "dashboard {flags}",
|
||||
about: "Live TUI dashboard: the whole fleet in one screen — overview, activity, stats, sessions and projects, refreshed every second.",
|
||||
search_terms: &["tui", "monitor", "overview", "cockpit"],
|
||||
flags: &[],
|
||||
subcommands: &[],
|
||||
parameters: &[],
|
||||
io: None,
|
||||
examples: &[
|
||||
HelpExample { desc: "Open the dashboard (Tab or arrows switch tabs, j/k scroll, q quits).", code: "dashboard" },
|
||||
],
|
||||
},
|
||||
HelpSpec {
|
||||
name: "favorite",
|
||||
category: "Commands",
|
||||
usage: "favorite {flags} <agent>",
|
||||
about: "Mark an agent as a favorite: a star appears in 'am list', 'am status' and 'am info'.",
|
||||
search_terms: &["star", "bookmark", "prefer"],
|
||||
flags: &[],
|
||||
subcommands: &[],
|
||||
parameters: &[
|
||||
HelpParam { name: "agent", typ: "string", desc: "Agent name or alias" },
|
||||
],
|
||||
io: None,
|
||||
examples: &[
|
||||
HelpExample { desc: "Mark claude-code as a favorite.", code: "favorite claude-code" },
|
||||
],
|
||||
},
|
||||
HelpSpec {
|
||||
name: "unfavorite",
|
||||
category: "Commands",
|
||||
usage: "unfavorite {flags} <agent>",
|
||||
about: "Remove the favorite star from an agent.",
|
||||
search_terms: &["star", "bookmark"],
|
||||
flags: &[],
|
||||
subcommands: &[],
|
||||
parameters: &[
|
||||
HelpParam { name: "agent", typ: "string", desc: "Agent name or alias" },
|
||||
],
|
||||
io: None,
|
||||
examples: &[
|
||||
HelpExample { desc: "Remove the star from claude-code.", code: "unfavorite claude-code" },
|
||||
],
|
||||
},
|
||||
HelpSpec {
|
||||
name: "note",
|
||||
category: "Commands",
|
||||
usage: "note {flags} <agent> [text...]",
|
||||
about: "Attach a free-form note to an agent, shown in 'am info'. Without text, prints the current note.",
|
||||
search_terms: &["comment", "remark", "memo"],
|
||||
flags: &[],
|
||||
subcommands: &[],
|
||||
parameters: &[
|
||||
HelpParam { name: "agent", typ: "string", desc: "Agent name or alias" },
|
||||
HelpParam { name: "text", typ: "string", desc: "Note text (several words are joined); empty prints the note" },
|
||||
],
|
||||
io: None,
|
||||
examples: &[
|
||||
HelpExample { desc: "Set a note.", code: "note claude-code use the sonnet model for this repo" },
|
||||
HelpExample { desc: "Show the note.", code: "note claude-code" },
|
||||
],
|
||||
},
|
||||
HelpSpec {
|
||||
name: "tag",
|
||||
category: "Commands",
|
||||
usage: "tag {flags} <agent> <tag>...",
|
||||
about: "Add personal tags to an agent; they are searchable with 'am search --tag' and listed in 'am info'.",
|
||||
search_terms: &["label", "keyword", "filter"],
|
||||
flags: &[],
|
||||
subcommands: &[],
|
||||
parameters: &[
|
||||
HelpParam { name: "agent", typ: "string", desc: "Agent name or alias" },
|
||||
HelpParam { name: "tag", typ: "string", desc: "One or more tags to add" },
|
||||
],
|
||||
io: None,
|
||||
examples: &[
|
||||
HelpExample { desc: "Tag claude-code for Python work.", code: "tag claude-code python frontend" },
|
||||
HelpExample { desc: "Find everything tagged python.", code: "search --tag python" },
|
||||
],
|
||||
},
|
||||
HelpSpec {
|
||||
name: "untag",
|
||||
category: "Commands",
|
||||
usage: "untag {flags} <agent> <tag>",
|
||||
about: "Remove a personal tag from an agent.",
|
||||
search_terms: &["label", "remove"],
|
||||
flags: &[],
|
||||
subcommands: &[],
|
||||
parameters: &[
|
||||
HelpParam { name: "agent", typ: "string", desc: "Agent name or alias" },
|
||||
HelpParam { name: "tag", typ: "string", desc: "Tag to remove" },
|
||||
],
|
||||
io: None,
|
||||
examples: &[
|
||||
HelpExample { desc: "Remove the python tag from claude-code.", code: "untag claude-code python" },
|
||||
],
|
||||
},
|
||||
HelpSpec {
|
||||
name: "tags",
|
||||
category: "Commands",
|
||||
usage: "tags {flags} [agent]",
|
||||
about: "List personal tags with the agents carrying them; with an agent, list only its tags.",
|
||||
search_terms: &["labels", "tag list"],
|
||||
flags: &[],
|
||||
subcommands: &[],
|
||||
parameters: &[
|
||||
HelpParam { name: "agent", typ: "string", desc: "Agent name or alias (optional)" },
|
||||
],
|
||||
io: None,
|
||||
examples: &[
|
||||
HelpExample { desc: "List every personal tag.", code: "tags" },
|
||||
HelpExample { desc: "List the tags of one agent.", code: "tags claude-code" },
|
||||
],
|
||||
},
|
||||
HelpSpec {
|
||||
name: "profile",
|
||||
category: "Commands",
|
||||
usage: "profile {flags} <list|show> [name]",
|
||||
about: "Environment profiles: a named set of agent, env and args defined in the config, applied with 'am start --profile dev'.",
|
||||
search_terms: &["environment", "context", "dev", "prod"],
|
||||
flags: &[],
|
||||
subcommands: &[
|
||||
("list", "List every defined profile"),
|
||||
("show", "Show one profile in detail"),
|
||||
],
|
||||
parameters: &[
|
||||
HelpParam { name: "name", typ: "string", desc: "Profile to show" },
|
||||
],
|
||||
io: None,
|
||||
examples: &[
|
||||
HelpExample { desc: "List the profiles.", code: "profile list" },
|
||||
HelpExample { desc: "Show the dev profile.", code: "profile show dev" },
|
||||
HelpExample { desc: "Start an agent with the prod profile.", code: "start claude-code --profile prod" },
|
||||
],
|
||||
},
|
||||
HelpSpec {
|
||||
name: "man",
|
||||
category: "Commands",
|
||||
usage: "man {flags} [command]",
|
||||
about: "Generate roff man pages from the command definitions: one page for the whole CLI, or one page per command with --output.",
|
||||
search_terms: &["documentation", "roff", "unix"],
|
||||
flags: &[
|
||||
HelpFlag { short: "", long: "--output", value: "DIR", desc: "Write am.1 plus one am-<command>.1 per command into this directory" },
|
||||
],
|
||||
subcommands: &[],
|
||||
parameters: &[
|
||||
HelpParam { name: "command", typ: "string", desc: "Command to document; omit for the whole CLI" },
|
||||
],
|
||||
io: None,
|
||||
examples: &[
|
||||
HelpExample { desc: "Print the man page of the whole CLI.", code: "man" },
|
||||
HelpExample { desc: "Print one command page.", code: "man install" },
|
||||
HelpExample { desc: "Write every page into man/ (for a package).", code: "man --output man/" },
|
||||
],
|
||||
},
|
||||
HelpSpec {
|
||||
name: "help",
|
||||
category: "Commands",
|
||||
|
||||
+17
@@ -17,6 +17,7 @@ pub mod cli;
|
||||
pub mod commands;
|
||||
pub mod config;
|
||||
pub mod context;
|
||||
pub mod dashboard;
|
||||
pub mod deps;
|
||||
pub mod doctor;
|
||||
pub mod download;
|
||||
@@ -45,7 +46,23 @@ pub mod version;
|
||||
use clap::Parser;
|
||||
|
||||
/// CLI entry point used by the am binary. Returns the process exit code.
|
||||
///
|
||||
/// The whole run happens on a dedicated thread with a large stack: clap's
|
||||
/// derive code for the full command tree (40+ subcommands) uses deep stack
|
||||
/// frames in debug builds, which overflows the Windows main-thread default
|
||||
/// (1 MB). An 8 MB thread keeps every build mode on every platform safe.
|
||||
pub fn main_entry() -> i32 {
|
||||
std::thread::Builder::new()
|
||||
.name("am-main".to_string())
|
||||
.stack_size(8 * 1024 * 1024)
|
||||
.spawn(real_main)
|
||||
.expect("cannot spawn the am main thread")
|
||||
.join()
|
||||
.unwrap_or(1)
|
||||
}
|
||||
|
||||
/// The actual entry point, running on the big-stack thread.
|
||||
fn real_main() -> i32 {
|
||||
// Enable ANSI escape sequences on Windows consoles (best effort): the
|
||||
// colored crate and the theme palettes both emit raw VT codes.
|
||||
#[cfg(windows)]
|
||||
|
||||
+138
-9
@@ -46,8 +46,12 @@ pub struct AmCompleter {
|
||||
gateway_shells: Vec<&'static str>,
|
||||
options: Vec<&'static str>,
|
||||
agents: Vec<String>,
|
||||
/// Whole catalog (install/info/search only).
|
||||
catalog_agents: Vec<String>,
|
||||
aliases: Vec<String>,
|
||||
groups: Vec<String>,
|
||||
/// 'profile' subcommands.
|
||||
profile_sub: Vec<&'static str>,
|
||||
/// Short descriptions shown next to candidates in the Tab menu
|
||||
/// (Nushell-style).
|
||||
descriptions: BTreeMap<String, String>,
|
||||
@@ -90,6 +94,15 @@ const COMMAND_DESCRIPTIONS: &[(&str, &str)] = &[
|
||||
("self-uninstall", "remove agent-manager"),
|
||||
("export", "backup config + state"),
|
||||
("import", "restore a backup"),
|
||||
("dashboard", "live TUI dashboard of the fleet"),
|
||||
("favorite", "mark an agent as a favorite"),
|
||||
("unfavorite", "remove the favorite star"),
|
||||
("note", "attach a note to an agent"),
|
||||
("tag", "tag an agent (personal tags)"),
|
||||
("untag", "remove a personal tag"),
|
||||
("tags", "list personal tags"),
|
||||
("profile", "manage environment profiles"),
|
||||
("man", "generate man pages"),
|
||||
("shell", "show or switch the system shell"),
|
||||
("theme", "show or switch the color theme"),
|
||||
("ls", "list files and directories (Nushell-style)"),
|
||||
@@ -105,8 +118,30 @@ const COMMAND_DESCRIPTIONS: &[(&str, &str)] = &[
|
||||
|
||||
impl AmCompleter {
|
||||
pub fn new(app: &App) -> Self {
|
||||
let completer =
|
||||
Self::from_catalog(&app.catalog, &app.config.aliases, &app.config.groups);
|
||||
// Issue #41: Tab proposes the installed agents (managed + external),
|
||||
// aliases and groups — not the whole catalog.
|
||||
let installed: std::collections::BTreeSet<String> = app
|
||||
.state
|
||||
.all()
|
||||
.unwrap_or_default()
|
||||
.keys()
|
||||
.cloned()
|
||||
.collect();
|
||||
let mut completer = Self::from_catalog(
|
||||
&app.catalog,
|
||||
&app.config.aliases,
|
||||
&app.config.groups,
|
||||
Some(&installed),
|
||||
);
|
||||
// External agents found on PATH are launchable too.
|
||||
let probe = crate::probe::detect_externals(app);
|
||||
for a in app.catalog.agents() {
|
||||
if probe.path_of(&a.name).is_some() {
|
||||
completer.agents.push(a.name.clone());
|
||||
}
|
||||
}
|
||||
completer.agents.sort();
|
||||
completer.agents.dedup();
|
||||
completer.theme.set(app.theme());
|
||||
completer
|
||||
}
|
||||
@@ -120,14 +155,23 @@ impl AmCompleter {
|
||||
catalog: &crate::catalog::Catalog,
|
||||
aliases: &BTreeMap<String, String>,
|
||||
groups: &BTreeMap<String, Vec<String>>,
|
||||
installed: Option<&std::collections::BTreeSet<String>>,
|
||||
) -> Self {
|
||||
let mut agents: Vec<String> = catalog
|
||||
.agents()
|
||||
.iter()
|
||||
.filter(|a| !a.hidden)
|
||||
.filter(|a| installed.map(|set| set.contains(&a.name)).unwrap_or(true))
|
||||
.map(|a| a.name.clone())
|
||||
.collect();
|
||||
agents.sort();
|
||||
// The whole catalog stays available for install/info/search.
|
||||
let catalog_agents: Vec<String> = catalog
|
||||
.agents()
|
||||
.iter()
|
||||
.filter(|a| !a.hidden)
|
||||
.map(|a| a.name.clone())
|
||||
.collect();
|
||||
let mut alias_list: Vec<String> = aliases.keys().cloned().collect();
|
||||
alias_list.sort();
|
||||
let mut group_list: Vec<String> = groups.keys().map(|g| format!("group:{g}")).collect();
|
||||
@@ -153,9 +197,12 @@ impl AmCompleter {
|
||||
"list", "status", "sessions", "stats", "top", "report", "projects", "timeline", "log", "logs", "history", "init", "alias", "secret", "open", "watch", "search", "info", "install", "uninstall", "update",
|
||||
"start", "stop", "restart", "run", "doctor", "config", "completion",
|
||||
"self-update", "self-uninstall", "export", "import", "shell", "theme",
|
||||
"dashboard", "favorite", "unfavorite", "note", "tag", "untag", "tags",
|
||||
"profile", "man",
|
||||
"ls", "dir", "cd", "ps", "where", "get", "help", "version", "exit",
|
||||
],
|
||||
config_sub: vec!["show", "path", "edit", "validate", "add"],
|
||||
profile_sub: vec!["list", "show"],
|
||||
shells: vec!["bash", "zsh", "fish", "powershell", "elvish"],
|
||||
gateway_shells: vec![
|
||||
"list", "bash", "zsh", "fish", "powershell", "pwsh", "cmd", "sh", "nu",
|
||||
@@ -165,8 +212,10 @@ impl AmCompleter {
|
||||
"--background", "--force", "--purge", "--method", "--all",
|
||||
"--category", "--args", "--env", "--notify", "--timeout", "--yes",
|
||||
"--verbose", "--quiet", "--json", "--dry-run", "--no-color",
|
||||
"--profile", "--installed", "--tag", "--output",
|
||||
],
|
||||
agents,
|
||||
catalog_agents,
|
||||
aliases: alias_list,
|
||||
groups: group_list,
|
||||
descriptions,
|
||||
@@ -194,6 +243,9 @@ impl AmCompleter {
|
||||
"config" => {
|
||||
pool = self.config_sub.iter().map(|s| s.to_string()).collect();
|
||||
}
|
||||
"profile" => {
|
||||
pool = self.profile_sub.iter().map(|s| s.to_string()).collect();
|
||||
}
|
||||
"completion" => {
|
||||
pool = self.shells.iter().map(|s| s.to_string()).collect();
|
||||
}
|
||||
@@ -216,8 +268,11 @@ impl AmCompleter {
|
||||
let cwd = current_dir();
|
||||
pool = crate::nav::path_candidates(&cwd, word, false);
|
||||
}
|
||||
"install" | "uninstall" | "update" | "start" | "stop" | "restart" | "run"
|
||||
| "info" | "status" => {
|
||||
// Issue #41: operational commands propose installed agents,
|
||||
// aliases and groups only.
|
||||
"start" | "stop" | "restart" | "run" | "status" | "logs" | "open"
|
||||
| "watch" | "favorite" | "unfavorite" | "note" | "tag" | "untag"
|
||||
| "sessions" | "stats" | "log" | "update" | "uninstall" => {
|
||||
if word.starts_with("group:") {
|
||||
pool = self.groups.clone();
|
||||
} else if previous.len() == 1 {
|
||||
@@ -231,6 +286,16 @@ impl AmCompleter {
|
||||
pool = self.options.iter().map(|s| s.to_string()).collect();
|
||||
}
|
||||
}
|
||||
"install" | "info" | "search" => {
|
||||
if word.starts_with('-') {
|
||||
pool = self.options.iter().map(|s| s.to_string()).collect();
|
||||
} else if previous.len() == 1 {
|
||||
pool = self.catalog_agents.clone();
|
||||
pool.extend(self.aliases.iter().cloned());
|
||||
} else {
|
||||
pool = self.options.iter().map(|s| s.to_string()).collect();
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
if word.starts_with('-') {
|
||||
pool = self.options.iter().map(|s| s.to_string()).collect();
|
||||
@@ -1270,6 +1335,47 @@ fn handle_line(
|
||||
return Ok(false);
|
||||
}
|
||||
},
|
||||
"dashboard" => Command::Dashboard,
|
||||
"favorite" => Command::Favorite {
|
||||
agent: need("agent name")?,
|
||||
},
|
||||
"unfavorite" => Command::Unfavorite {
|
||||
agent: need("agent name")?,
|
||||
},
|
||||
"note" => Command::Note {
|
||||
agent: need("agent name")?,
|
||||
text: rest[1..].to_vec(),
|
||||
},
|
||||
"tag" => Command::Tag {
|
||||
agent: need("agent name")?,
|
||||
words: rest[1..].to_vec(),
|
||||
},
|
||||
"untag" => Command::Untag {
|
||||
agent: need("agent name")?,
|
||||
tag: need("tag")?,
|
||||
},
|
||||
"tags" => Command::Tags {
|
||||
agent: rest.first().cloned(),
|
||||
},
|
||||
"profile" => match rest.first().map(|s| s.as_str()) {
|
||||
Some("show") if rest.len() >= 2 => {
|
||||
Command::Profile(crate::cli::ProfileCmd::Show {
|
||||
name: rest[1].clone(),
|
||||
})
|
||||
}
|
||||
Some("list") | None => Command::Profile(crate::cli::ProfileCmd::List),
|
||||
other => {
|
||||
app.log.error(&format!(
|
||||
"usage: profile list | profile show <name>{}",
|
||||
other.map(|o| format!(" (unknown 'profile {o}')")).unwrap_or_default()
|
||||
));
|
||||
return Ok(false);
|
||||
}
|
||||
},
|
||||
"man" => Command::Man {
|
||||
command: rest.first().cloned(),
|
||||
output: opt_value("--output").map(PathBuf::from),
|
||||
},
|
||||
"status" => Command::Status {
|
||||
agent: rest.first().cloned(),
|
||||
},
|
||||
@@ -1318,16 +1424,26 @@ fn handle_line(
|
||||
rerun: opt_value("--rerun").and_then(|v| v.parse().ok()),
|
||||
},
|
||||
"init" => Command::Init { force: flag("--force") },
|
||||
"search" => Command::Search {
|
||||
keyword: rest.join(" "),
|
||||
"search" => {
|
||||
let words: Vec<String> = rest
|
||||
.iter()
|
||||
.filter(|t| !t.starts_with("--"))
|
||||
.cloned()
|
||||
.collect();
|
||||
let kw = words.join(" ");
|
||||
Command::Search {
|
||||
keyword: if kw.is_empty() { None } else { Some(kw) },
|
||||
category: None,
|
||||
},
|
||||
tag: opt_value("--tag"),
|
||||
}
|
||||
}
|
||||
"info" => Command::Info {
|
||||
agent: need("agent name")?,
|
||||
},
|
||||
"start" => Command::Start(StartArgs {
|
||||
agent: rest.first().cloned(),
|
||||
background: flag("--background") || flag("-b"),
|
||||
profile: opt_value("--profile"),
|
||||
..Default::default()
|
||||
}),
|
||||
"stop" => Command::Stop {
|
||||
@@ -1339,6 +1455,7 @@ fn handle_line(
|
||||
start: StartArgs {
|
||||
agent: rest.first().cloned(),
|
||||
background: flag("--background") || flag("-b"),
|
||||
profile: opt_value("--profile"),
|
||||
..Default::default()
|
||||
},
|
||||
force: flag("--force"),
|
||||
@@ -1380,7 +1497,10 @@ fn handle_line(
|
||||
let shell: clap_complete::Shell = name
|
||||
.parse()
|
||||
.map_err(|e: String| anyhow!("unknown shell '{name}': {e}"))?;
|
||||
Command::Completion { shell }
|
||||
Command::Completion {
|
||||
shell,
|
||||
installed: flag("--installed"),
|
||||
}
|
||||
}
|
||||
"self-update" => Command::SelfUpdate {
|
||||
check: flag("--check"),
|
||||
@@ -1453,6 +1573,15 @@ fn is_am_command(word: &str) -> bool {
|
||||
| "self-uninstall"
|
||||
| "export"
|
||||
| "import"
|
||||
| "dashboard"
|
||||
| "favorite"
|
||||
| "unfavorite"
|
||||
| "note"
|
||||
| "tag"
|
||||
| "untag"
|
||||
| "tags"
|
||||
| "profile"
|
||||
| "man"
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1703,7 +1832,7 @@ mod tests {
|
||||
cfg.aliases.clone(),
|
||||
cfg.groups.clone(),
|
||||
);
|
||||
AmCompleter::from_catalog(&catalog, &cfg.aliases, &cfg.groups)
|
||||
AmCompleter::from_catalog(&catalog, &cfg.aliases, &cfg.groups, None)
|
||||
}
|
||||
|
||||
fn test_session() -> ShellSession {
|
||||
|
||||
+53
-3
@@ -6,7 +6,7 @@ use serde::{Deserialize, Serialize};
|
||||
use std::collections::BTreeMap;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
pub const STATE_VERSION: u32 = 2;
|
||||
pub const STATE_VERSION: u32 = 3;
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct StateFile {
|
||||
@@ -21,6 +21,23 @@ pub struct StateFile {
|
||||
/// RFC 3339 timestamp of the last start/run of any agent.
|
||||
#[serde(default)]
|
||||
pub last_used: Option<String>,
|
||||
/// Personal annotations per agent: favorite, note, tags (issue #39).
|
||||
#[serde(default)]
|
||||
pub annotations: BTreeMap<String, Annotation>,
|
||||
}
|
||||
|
||||
/// Personal annotations attached to an agent by the user (issue #39).
|
||||
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
|
||||
pub struct Annotation {
|
||||
/// Marked as a favorite (star in list/status).
|
||||
#[serde(default)]
|
||||
pub favorite: bool,
|
||||
/// Free-form note shown in 'am info'.
|
||||
#[serde(default)]
|
||||
pub note: Option<String>,
|
||||
/// Personal tags, filterable with 'am search --tag'.
|
||||
#[serde(default)]
|
||||
pub tags: Vec<String>,
|
||||
}
|
||||
|
||||
impl Default for StateFile {
|
||||
@@ -30,6 +47,7 @@ impl Default for StateFile {
|
||||
installed: BTreeMap::new(),
|
||||
sessions_count: 0,
|
||||
last_used: None,
|
||||
annotations: BTreeMap::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -162,6 +180,38 @@ impl StateStore {
|
||||
sf.sessions_count = sf.sessions_count.saturating_add(1);
|
||||
self.save(&sf)
|
||||
}
|
||||
|
||||
/// Every personal annotation, keyed by agent name (issue #39).
|
||||
pub fn annotations(&self) -> Result<BTreeMap<String, Annotation>> {
|
||||
Ok(self.load()?.annotations)
|
||||
}
|
||||
|
||||
/// The annotation block of one agent (defaults to empty).
|
||||
pub fn annotation(&self, name: &str) -> Result<Annotation> {
|
||||
Ok(self
|
||||
.load()?
|
||||
.annotations
|
||||
.get(name)
|
||||
.cloned()
|
||||
.unwrap_or_default())
|
||||
}
|
||||
|
||||
/// Replace the annotation block of one agent.
|
||||
pub fn set_annotation(&self, name: &str, ann: &Annotation) -> Result<()> {
|
||||
let mut sf = self.load()?;
|
||||
sf.annotations.insert(name.to_string(), ann.clone());
|
||||
self.save(&sf)
|
||||
}
|
||||
|
||||
/// Remove the annotation block of one agent (returns true when present).
|
||||
pub fn remove_annotation(&self, name: &str) -> Result<bool> {
|
||||
let mut sf = self.load()?;
|
||||
let removed = sf.annotations.remove(name).is_some();
|
||||
if removed {
|
||||
self.save(&sf)?;
|
||||
}
|
||||
Ok(removed)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
@@ -221,13 +271,13 @@ mod tests {
|
||||
)
|
||||
.unwrap();
|
||||
let sf = st.load().unwrap();
|
||||
assert_eq!(sf.version, 2);
|
||||
assert_eq!(sf.version, 3);
|
||||
assert_eq!(sf.sessions_count, 0);
|
||||
assert_eq!(sf.last_used, None);
|
||||
assert!(sf.installed.contains_key("claude-code"));
|
||||
// The migration is persisted on first contact.
|
||||
let raw = std::fs::read_to_string(st.path()).unwrap();
|
||||
assert!(raw.contains(r#""version": 2"#), "migrated file rewritten: {raw}");
|
||||
assert!(raw.contains(r#""version": 3"#), "migrated file rewritten: {raw}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
//! Favorites, notes and personal tags (issue #39).
|
||||
|
||||
mod common;
|
||||
|
||||
use agent_manager::commands::annotations_cmd;
|
||||
use agent_manager::commands::search_cmd;
|
||||
use agent_manager::events::{self, EventKind};
|
||||
use agent_manager::state::{Annotation, InstalledEntry};
|
||||
|
||||
fn install(app: &agent_manager::app::App, name: &str) {
|
||||
let entry = InstalledEntry {
|
||||
name: name.to_string(),
|
||||
version: Some("1.0.0".to_string()),
|
||||
method: "npm".to_string(),
|
||||
install_dir: format!("/tmp/{name}"),
|
||||
bins: vec![],
|
||||
run: name.to_string(),
|
||||
installed_at: "2026-08-01T00:00:00Z".to_string(),
|
||||
updated_at: None,
|
||||
pid: None,
|
||||
started_at: None,
|
||||
};
|
||||
app.state.set(&entry).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn favorite_persists_in_state_and_survives_reload() {
|
||||
let app = common::test_app("fav", &["list"]);
|
||||
install(&app, "claude-code");
|
||||
let code = annotations_cmd::run_favorite(&app, "claude-code").unwrap();
|
||||
assert_eq!(code, 0);
|
||||
assert!(annotations_cmd::is_favorite(&app, "claude-code"));
|
||||
|
||||
// A fresh StateStore over the same file sees the star (restart).
|
||||
let store = agent_manager::state::StateStore::new(app.state.path().to_path_buf());
|
||||
let ann = store.annotation("claude-code").unwrap();
|
||||
assert!(ann.favorite, "favorite must survive a reload");
|
||||
|
||||
let code = annotations_cmd::run_unfavorite(&app, "claude-code").unwrap();
|
||||
assert_eq!(code, 0);
|
||||
assert!(!annotations_cmd::is_favorite(&app, "claude-code"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn favorite_is_journalized() {
|
||||
let app = common::test_app("favlog", &["list"]);
|
||||
install(&app, "claude-code");
|
||||
annotations_cmd::run_favorite(&app, "claude-code").unwrap();
|
||||
let evs = events::read_events(&app.events_dir(), 10);
|
||||
assert!(
|
||||
evs.iter().any(|e| e.kind == EventKind::Annotate && e.agent.as_deref() == Some("claude-code")),
|
||||
"an annotate event must be journaled: {evs:?}"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn note_is_stored_and_shown() {
|
||||
let app = common::test_app("note", &["list"]);
|
||||
install(&app, "claude-code");
|
||||
let code = annotations_cmd::run_note(
|
||||
&app,
|
||||
"claude-code",
|
||||
&["use".to_string(), "the".to_string(), "sonnet".to_string(), "model".to_string()],
|
||||
)
|
||||
.unwrap();
|
||||
assert_eq!(code, 0);
|
||||
let ann = app.state.annotation("claude-code").unwrap();
|
||||
assert_eq!(ann.note.as_deref(), Some("use the sonnet model"));
|
||||
// Showing the note is a no-error operation too.
|
||||
assert_eq!(annotations_cmd::run_note(&app, "claude-code", &[]).unwrap(), 0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn tags_are_filterable_in_search() {
|
||||
let app = common::test_app("tag", &["list"]);
|
||||
install(&app, "claude-code");
|
||||
install(&app, "gemini-cli");
|
||||
annotations_cmd::run_tag(&app, "claude-code", &["python".to_string(), "Frontend".to_string()]).unwrap();
|
||||
annotations_cmd::run_tag(&app, "gemini-cli", &["python".to_string()]).unwrap();
|
||||
|
||||
// Personal tags are lowercased and de-duplicated.
|
||||
let ann: Annotation = app.state.annotation("claude-code").unwrap();
|
||||
assert_eq!(ann.tags, vec!["frontend", "python"]);
|
||||
|
||||
// search --tag python returns both tagged agents.
|
||||
assert_eq!(
|
||||
annotations_cmd::agents_with_tag(&app, "python"),
|
||||
vec!["claude-code".to_string(), "gemini-cli".to_string()]
|
||||
);
|
||||
let code = search_cmd::run(&app, Some(""), None, Some("python")).unwrap();
|
||||
assert_eq!(code, 0);
|
||||
|
||||
// A tag matching nothing is reported cleanly.
|
||||
let code = search_cmd::run(&app, Some(""), None, Some("nope")).unwrap();
|
||||
assert_eq!(code, 0);
|
||||
|
||||
// untag removes one tag; tags command lists the rest.
|
||||
annotations_cmd::run_untag(&app, "claude-code", "frontend").unwrap();
|
||||
let ann = app.state.annotation("claude-code").unwrap();
|
||||
assert_eq!(ann.tags, vec!["python"]);
|
||||
let code = annotations_cmd::run_tags(&app, None).unwrap();
|
||||
assert_eq!(code, 0);
|
||||
let code = annotations_cmd::run_tags(&app, Some("claude-code")).unwrap();
|
||||
assert_eq!(code, 0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn tag_requires_at_least_one_word() {
|
||||
let app = common::test_app("tagempty", &["list"]);
|
||||
install(&app, "claude-code");
|
||||
let err = annotations_cmd::run_tag(&app, "claude-code", &[]).unwrap_err().to_string();
|
||||
assert!(err.contains("usage"), "{err}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn unknown_agent_is_rejected() {
|
||||
let app = common::test_app("favbad", &["list"]);
|
||||
let err = annotations_cmd::run_favorite(&app, "does-not-exist").unwrap_err().to_string();
|
||||
assert!(err.contains("unknown agent"), "{err}");
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
//! Dynamic completions + man pages (issue #41).
|
||||
|
||||
mod common;
|
||||
|
||||
use agent_manager::cli::{Cli, Command};
|
||||
use agent_manager::commands::{agents_cmd, completion_cmd, man_cmd};
|
||||
use agent_manager::state::InstalledEntry;
|
||||
use clap::CommandFactory;
|
||||
use clap::Parser;
|
||||
use clap_complete::Shell;
|
||||
|
||||
fn generate(shell: Shell, installed: bool) -> String {
|
||||
let mut cmd = Cli::command();
|
||||
let mut buf: Vec<u8> = Vec::new();
|
||||
clap_complete::generate(shell, &mut cmd, "am", &mut buf);
|
||||
if installed {
|
||||
buf.push(b'\n');
|
||||
}
|
||||
let base = String::from_utf8(buf).unwrap();
|
||||
if !installed {
|
||||
return base;
|
||||
}
|
||||
// Reuse the command's own generation path (with the dynamic layer).
|
||||
// completion_cmd writes to stdout; emulate by calling its logic through
|
||||
// the shell snippet functions instead.
|
||||
let _ = base;
|
||||
match shell {
|
||||
Shell::Bash => format!("{}
|
||||
{}", base, completion_cmd::bash_snippet()),
|
||||
Shell::Zsh => format!("{}
|
||||
{}", base, completion_cmd::zsh_snippet()),
|
||||
Shell::Fish => format!("{}
|
||||
{}", base, completion_cmd::fish_snippet()),
|
||||
Shell::PowerShell => {
|
||||
let marker = "Register-ArgumentCompleter -Native -CommandName 'am' -ScriptBlock {";
|
||||
let mut text = base.replace(marker, "$amBase = {");
|
||||
text.push('\n');
|
||||
text.push_str(completion_cmd::powershell_snippet());
|
||||
text
|
||||
}
|
||||
Shell::Elvish => format!("{}
|
||||
{}", base, completion_cmd::elvish_snippet()),
|
||||
_ => base,
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn base_script_has_no_dynamic_layer() {
|
||||
for shell in [Shell::Bash, Shell::Zsh, Shell::Fish, Shell::PowerShell, Shell::Elvish] {
|
||||
let script = generate(shell, false);
|
||||
assert!(!script.contains("_agents --installed"), "{shell:?}");
|
||||
assert!(!script.contains("_am_installed"), "{shell:?}");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn installed_mode_embeds_the_dynamic_layer() {
|
||||
for shell in [Shell::Bash, Shell::Zsh, Shell::Fish, Shell::PowerShell, Shell::Elvish] {
|
||||
let script = generate(shell, true);
|
||||
assert!(script.contains("_agents --installed"), "{shell:?}");
|
||||
assert!(script.contains("favorite"), "{shell:?}");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn agents_command_lists_installed_only_in_installed_mode() {
|
||||
let app = common::test_app("agents", &["list"]);
|
||||
let entry = InstalledEntry {
|
||||
name: "claude-code".to_string(),
|
||||
version: Some("1.0.0".to_string()),
|
||||
method: "npm".to_string(),
|
||||
install_dir: "/tmp/cc".to_string(),
|
||||
bins: vec![],
|
||||
run: "claude".to_string(),
|
||||
installed_at: "2026-08-01T00:00:00Z".to_string(),
|
||||
updated_at: None,
|
||||
pid: None,
|
||||
started_at: None,
|
||||
};
|
||||
app.state.set(&entry).unwrap();
|
||||
let names = agents_cmd::agent_names(&app, true);
|
||||
assert!(names.contains(&"claude-code".to_string()));
|
||||
assert!(!names.contains(&"ante".to_string()), "an agent that was never installed must not appear: {names:?}");
|
||||
let all = agents_cmd::agent_names(&app, false);
|
||||
assert!(all.contains(&"ante".to_string()), "default mode keeps the whole catalog");
|
||||
assert_eq!(agents_cmd::run(&app, true).unwrap(), 0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn man_pages_are_written_to_output_dir() {
|
||||
let app = common::test_app("man", &["man"]);
|
||||
let dir = std::env::temp_dir().join(format!("am-man-{}", std::process::id()));
|
||||
std::fs::create_dir_all(&dir).unwrap();
|
||||
let code = man_cmd::run(&app, None, Some(&dir)).unwrap();
|
||||
assert_eq!(code, 0);
|
||||
assert!(dir.join("am.1").exists(), "am.1 missing");
|
||||
for name in ["start", "sessions", "stats", "log", "history", "dashboard", "favorite", "profile", "man"] {
|
||||
assert!(
|
||||
dir.join(format!("am-{name}.1")).exists(),
|
||||
"am-{name}.1 missing"
|
||||
);
|
||||
}
|
||||
let text = std::fs::read_to_string(dir.join("am.1")).unwrap();
|
||||
assert!(text.contains(".TH"), "a roff page must start with .TH: {text}");
|
||||
assert!(text.contains("dashboard"), "new commands must appear in the page");
|
||||
let code = man_cmd::run(&app, Some("install"), Some(&dir)).unwrap();
|
||||
assert_eq!(code, 0);
|
||||
assert!(dir.join("am-install.1").exists());
|
||||
let _ = std::fs::remove_dir_all(&dir);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn unknown_man_command_is_rejected() {
|
||||
let app = common::test_app("manbad", &["man"]);
|
||||
let err = man_cmd::run(&app, Some("does-not-exist"), None).unwrap_err().to_string();
|
||||
assert!(err.contains("unknown command"), "{err}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn cli_parses_completion_installed_flag() {
|
||||
let cli = Cli::parse_from(["am", "completion", "bash", "--installed"]);
|
||||
match cli.command {
|
||||
Some(Command::Completion { installed, .. }) => assert!(installed),
|
||||
other => panic!("unexpected: {other:?}"),
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
//! Dashboard TUI data + non-TUI modes (issue #33).
|
||||
|
||||
mod common;
|
||||
|
||||
use agent_manager::commands::dashboard_cmd;
|
||||
use agent_manager::dashboard;
|
||||
use agent_manager::state::InstalledEntry;
|
||||
|
||||
fn install(app: &agent_manager::app::App, name: &str, pid: Option<u32>) {
|
||||
let entry = InstalledEntry {
|
||||
name: name.to_string(),
|
||||
version: Some("1.0.0".to_string()),
|
||||
method: "npm".to_string(),
|
||||
install_dir: format!("/tmp/{name}"),
|
||||
bins: vec![],
|
||||
run: name.to_string(),
|
||||
installed_at: "2026-08-01T00:00:00Z".to_string(),
|
||||
updated_at: None,
|
||||
pid,
|
||||
started_at: pid.map(|_| chrono::Utc::now().to_rfc3339()),
|
||||
};
|
||||
app.state.set(&entry).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn dashboard_collects_overview_and_counts() {
|
||||
let app = common::test_app("dash", &["dashboard"]);
|
||||
install(&app, "claude-code", Some(4242));
|
||||
let data = dashboard::collect(&app);
|
||||
assert_eq!(data.counts.installed, 1);
|
||||
assert_eq!(data.counts.running, 0, "pid 4242 is not a live process here");
|
||||
let row = data.overview.iter().find(|r| r.name == "claude-code").unwrap();
|
||||
assert_eq!(row.status, "installed");
|
||||
assert_eq!(row.version.as_deref(), Some("1.0.0"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn dashboard_never_blocks_on_an_empty_journal() {
|
||||
let app = common::test_app("dashempty", &["dashboard"]);
|
||||
let data = dashboard::collect(&app);
|
||||
assert!(data.activity.is_empty());
|
||||
assert!(data.stats.is_empty());
|
||||
assert!(data.sessions.is_empty());
|
||||
assert!(data.projects.is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn dashboard_piped_and_json_modes_return_ok() {
|
||||
let app = common::test_app("dashpipe", &["dashboard"]);
|
||||
// In tests stdout is not a terminal: the plain snapshot path runs.
|
||||
assert_eq!(dashboard_cmd::run(&app).unwrap(), 0);
|
||||
// JSON mode prints the whole snapshot as one document.
|
||||
let app = common::test_app("dashjson", &["dashboard", "--json"]);
|
||||
assert_eq!(dashboard_cmd::run(&app).unwrap(), 0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn dashboard_follows_the_journal() {
|
||||
let app = common::test_app("dashlog", &["dashboard"]);
|
||||
let month = chrono::Utc::now().format("%Y%m").to_string();
|
||||
let path = app.events_dir().join(format!("events-{month}.jsonl"));
|
||||
std::fs::create_dir_all(app.events_dir()).unwrap();
|
||||
std::fs::write(
|
||||
&path,
|
||||
concat!(
|
||||
"{\"ts\":\"2026-08-01T10:00:00Z\",\"kind\":\"run\",\"agent\":\"a\",\"exit_code\":0}\n",
|
||||
"{\"ts\":\"2026-08-02T10:00:00Z\",\"kind\":\"install\",\"agent\":\"b\"}\n",
|
||||
),
|
||||
)
|
||||
.unwrap();
|
||||
let data = dashboard::collect(&app);
|
||||
assert_eq!(data.activity.len(), 2);
|
||||
assert_eq!(data.activity[0].kind, "install", "newest first");
|
||||
assert_eq!(data.stats.len(), 2, "journal feeds the stats tab");
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
//! Environment profiles (issue #40).
|
||||
|
||||
mod common;
|
||||
|
||||
use agent_manager::cli::{Cli, Command, ProfileCmd, StartArgs};
|
||||
use agent_manager::commands::{profile_cmd, run_cmd};
|
||||
use clap::Parser;
|
||||
|
||||
fn app_with_profiles(tag: &str) -> agent_manager::app::App {
|
||||
let dir = std::env::temp_dir().join(format!("am-profiles-{tag}-{}", std::process::id()));
|
||||
std::fs::create_dir_all(&dir).unwrap();
|
||||
let cfg = dir.join("config.yaml");
|
||||
std::fs::write(
|
||||
&cfg,
|
||||
"version: \"1.0\"\nsettings:\n auto_install_deps: false\n confirm_before_run: false\nprofiles:\n dev:\n agent: claude-code\n env:\n DEBUG: \"1\"\n LOG_LEVEL: debug\n args: [--model, sonnet]\n prod:\n env:\n LOG_LEVEL: info\nagents:\n - name: claude-code\n run: claude\n install: {type: npm, package: \"@anthropic-ai/claude-code\"}\n",
|
||||
)
|
||||
.unwrap();
|
||||
let cli = Cli::parse_from(["am", "--config", cfg.to_str().unwrap()]);
|
||||
let mut app = agent_manager::app::App::from_cli(cli).unwrap();
|
||||
let mut p = app.paths.clone();
|
||||
p.install_dir = dir.join("agents");
|
||||
p.bin_dir = dir.join("agents").join("bin");
|
||||
p.log_dir = dir.join("logs");
|
||||
p.state_file = dir.join("state.json");
|
||||
p.probe_cache_file = dir.join("probe-cache.json");
|
||||
p.config_dir = Some(dir.join("config"));
|
||||
app.paths = p;
|
||||
app
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn profile_list_and_show() {
|
||||
let app = app_with_profiles("list");
|
||||
assert_eq!(profile_cmd::run_list(&app).unwrap(), 0);
|
||||
assert_eq!(profile_cmd::run_show(&app, "dev").unwrap(), 0);
|
||||
let json = app; // keep clippy quiet about unused paths
|
||||
let _ = json;
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn unknown_profile_lists_available_ones() {
|
||||
let app = app_with_profiles("unknown");
|
||||
let err = profile_cmd::resolve(&app, "staging").unwrap_err().to_string();
|
||||
assert!(err.contains("unknown profile 'staging'"), "{err}");
|
||||
assert!(err.contains("dev") && err.contains("prod"), "{err}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn apply_merges_profile_env_and_args() {
|
||||
let app = app_with_profiles("apply");
|
||||
let (args, env) = profile_cmd::apply(
|
||||
&app,
|
||||
Some("prod"),
|
||||
&["--base".to_string()],
|
||||
&std::collections::BTreeMap::from([("KEEP".to_string(), "1".to_string())]),
|
||||
)
|
||||
.unwrap();
|
||||
assert_eq!(args, vec!["--base"]);
|
||||
assert_eq!(env.get("LOG_LEVEL").map(String::as_str), Some("info"));
|
||||
assert_eq!(env.get("KEEP").map(String::as_str), Some("1"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn start_with_unknown_profile_fails_cleanly() {
|
||||
let app = app_with_profiles("badstart");
|
||||
let opts = StartArgs {
|
||||
agent: Some("claude-code".to_string()),
|
||||
profile: Some("staging".to_string()),
|
||||
..Default::default()
|
||||
};
|
||||
let err = run_cmd::start(&app, &opts).unwrap_err().to_string();
|
||||
assert!(err.contains("unknown profile"), "{err}");
|
||||
assert!(err.contains("dev"), "{err}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn start_with_profile_dry_run_succeeds() {
|
||||
let mut app = app_with_profiles("dry");
|
||||
// Force dry-run so start_one never spawns.
|
||||
app.cli.dry_run = true;
|
||||
let opts = StartArgs {
|
||||
agent: Some("claude-code".to_string()),
|
||||
profile: Some("dev".to_string()),
|
||||
..Default::default()
|
||||
};
|
||||
assert_eq!(run_cmd::start(&app, &opts).unwrap(), 0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn start_without_agent_uses_profile_default_agent() {
|
||||
let mut app = app_with_profiles("default");
|
||||
app.cli.dry_run = true;
|
||||
let opts = StartArgs {
|
||||
agent: None,
|
||||
profile: Some("dev".to_string()),
|
||||
..Default::default()
|
||||
};
|
||||
assert_eq!(run_cmd::start(&app, &opts).unwrap(), 0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn cli_parses_profile_subcommands() {
|
||||
let cli = Cli::parse_from(["am", "profile", "list"]);
|
||||
assert!(matches!(
|
||||
cli.command,
|
||||
Some(Command::Profile(ProfileCmd::List))
|
||||
));
|
||||
let cli = Cli::parse_from(["am", "profile", "show", "dev"]);
|
||||
assert!(matches!(
|
||||
cli.command,
|
||||
Some(Command::Profile(ProfileCmd::Show { ref name })) if name == "dev"
|
||||
));
|
||||
let cli = Cli::parse_from(["am", "start", "claude-code", "--profile", "dev"]);
|
||||
match cli.command {
|
||||
Some(Command::Start(a)) => assert_eq!(a.profile.as_deref(), Some("dev")),
|
||||
other => panic!("unexpected: {other:?}"),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user