From 56732d672b2ca97493e75a3ddd6c0a2ca38e31d7 Mon Sep 17 00:00:00 2001 From: Bruno Charest Date: Mon, 17 Aug 2026 10:50:13 -0400 Subject: [PATCH] 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 --- .gitea/workflows/release.yml | 103 + Cargo.lock | 1202 ++++++++++- Cargo.toml | 5 +- EXAMPLES.md | 96 + README.md | 23 +- RELEASING.md | 102 +- ROADMAP.md | 14 +- completions/_am | 1338 ++++++++---- completions/_am.ps1 | 839 ++++++-- completions/am.bash | 1819 ++++++++++++----- completions/am.elv | 774 ++++++- completions/am.fish | 490 ++++- config.yaml | 3 +- man/am-alias.1 | 26 + man/am-completion.1 | 35 + man/am-config.1 | 35 + man/am-dashboard.1 | 13 + man/am-doctor.1 | 16 + man/am-export.1 | 16 + man/am-favorite.1 | 16 + man/am-help.1 | 19 + man/am-history.1 | 34 + man/am-import.1 | 16 + man/am-info.1 | 16 + man/am-init.1 | 16 + man/am-install.1 | 22 + man/am-list.1 | 25 + man/am-log.1 | 28 + man/am-logs.1 | 22 + man/am-man.1 | 19 + man/am-note.1 | 19 + man/am-open.1 | 16 + man/am-profile.1 | 23 + man/am-projects.1 | 16 + man/am-report.1 | 22 + man/am-restart.1 | 40 + man/am-run.1 | 19 + man/am-search.1 | 22 + man/am-secret.1 | 26 + man/am-self-uninstall.1 | 15 + man/am-self-update.1 | 19 + man/am-sessions.1 | 28 + man/am-start.1 | 34 + man/am-stats.1 | 19 + man/am-status.1 | 16 + man/am-stop.1 | 22 + man/am-tag.1 | 19 + man/am-tags.1 | 16 + man/am-timeline.1 | 25 + man/am-top.1 | 16 + man/am-unfavorite.1 | 16 + man/am-uninstall.1 | 19 + man/am-untag.1 | 19 + man/am-update.1 | 19 + man/am-version.1 | 13 + man/am-watch.1 | 25 + man/am.1 | 177 ++ packaging/deb/make-deb.sh | 33 + packaging/homebrew/am.rb | 36 + packaging/rpm/am.spec | 26 + packaging/scoop/am.json | 24 + packaging/winget/agent-manager.installer.yaml | 16 + .../winget/agent-manager.locale.en-US.yaml | 18 + packaging/winget/agent-manager.yaml | 6 + scripts/build-release.ps1 | 20 + scripts/render-manifests.ps1 | 50 + src/cli.rs | 86 +- src/commands/agents_cmd.rs | 37 + src/commands/annotations_cmd.rs | 209 ++ src/commands/completion_cmd.rs | 145 +- src/commands/dashboard_cmd.rs | 379 ++++ src/commands/export_import.rs | 1 + src/commands/info_cmd.rs | 48 + src/commands/list_cmd.rs | 11 +- src/commands/man_cmd.rs | 70 + src/commands/mod.rs | 21 +- src/commands/profile_cmd.rs | 214 ++ src/commands/run_cmd.rs | 59 +- src/commands/search_cmd.rs | 68 +- src/commands/self_update.rs | 5 +- src/commands/status_cmd.rs | 15 +- src/config.rs | 37 +- src/dashboard.rs | 286 +++ src/download.rs | 21 +- src/events.rs | 3 + src/help.rs | 175 +- src/lib.rs | 17 + src/repl.rs | 149 +- src/state.rs | 56 +- tests/annotations_test.rs | 120 ++ tests/completion_man_test.rs | 126 ++ tests/dashboard_test.rs | 75 + tests/profiles_test.rs | 118 ++ 93 files changed, 9412 insertions(+), 1270 deletions(-) create mode 100644 .gitea/workflows/release.yml create mode 100644 man/am-alias.1 create mode 100644 man/am-completion.1 create mode 100644 man/am-config.1 create mode 100644 man/am-dashboard.1 create mode 100644 man/am-doctor.1 create mode 100644 man/am-export.1 create mode 100644 man/am-favorite.1 create mode 100644 man/am-help.1 create mode 100644 man/am-history.1 create mode 100644 man/am-import.1 create mode 100644 man/am-info.1 create mode 100644 man/am-init.1 create mode 100644 man/am-install.1 create mode 100644 man/am-list.1 create mode 100644 man/am-log.1 create mode 100644 man/am-logs.1 create mode 100644 man/am-man.1 create mode 100644 man/am-note.1 create mode 100644 man/am-open.1 create mode 100644 man/am-profile.1 create mode 100644 man/am-projects.1 create mode 100644 man/am-report.1 create mode 100644 man/am-restart.1 create mode 100644 man/am-run.1 create mode 100644 man/am-search.1 create mode 100644 man/am-secret.1 create mode 100644 man/am-self-uninstall.1 create mode 100644 man/am-self-update.1 create mode 100644 man/am-sessions.1 create mode 100644 man/am-start.1 create mode 100644 man/am-stats.1 create mode 100644 man/am-status.1 create mode 100644 man/am-stop.1 create mode 100644 man/am-tag.1 create mode 100644 man/am-tags.1 create mode 100644 man/am-timeline.1 create mode 100644 man/am-top.1 create mode 100644 man/am-unfavorite.1 create mode 100644 man/am-uninstall.1 create mode 100644 man/am-untag.1 create mode 100644 man/am-update.1 create mode 100644 man/am-version.1 create mode 100644 man/am-watch.1 create mode 100644 man/am.1 create mode 100644 packaging/deb/make-deb.sh create mode 100644 packaging/homebrew/am.rb create mode 100644 packaging/rpm/am.spec create mode 100644 packaging/scoop/am.json create mode 100644 packaging/winget/agent-manager.installer.yaml create mode 100644 packaging/winget/agent-manager.locale.en-US.yaml create mode 100644 packaging/winget/agent-manager.yaml create mode 100644 scripts/build-release.ps1 create mode 100644 scripts/render-manifests.ps1 create mode 100644 src/commands/agents_cmd.rs create mode 100644 src/commands/annotations_cmd.rs create mode 100644 src/commands/dashboard_cmd.rs create mode 100644 src/commands/man_cmd.rs create mode 100644 src/commands/profile_cmd.rs create mode 100644 src/dashboard.rs create mode 100644 tests/annotations_test.rs create mode 100644 tests/completion_man_test.rs create mode 100644 tests/dashboard_test.rs create mode 100644 tests/profiles_test.rs diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 0000000..dd140b6 --- /dev/null +++ b/.gitea/workflows/release.yml @@ -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 }} diff --git a/Cargo.lock b/Cargo.lock index 92e7e96..c7b967d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -21,15 +21,18 @@ dependencies = [ [[package]] name = "agent-manager" -version = "0.3.0" +version = "0.4.1" dependencies = [ "anyhow", "chrono", "clap", "clap_complete", + "clap_mangen", "colored", + "crossterm", "flate2", "keyring", + "ratatui", "rustyline", "semver", "serde", @@ -46,6 +49,21 @@ dependencies = [ "zip", ] +[[package]] +name = "aho-corasick" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + [[package]] name = "android_system_properties" version = "0.1.6" @@ -111,6 +129,24 @@ version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" +[[package]] +name = "approx" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" +dependencies = [ + "num-traits", +] + +[[package]] +name = "atomic" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89cbf775b137e9b968e67227ef7f775587cde3fd31b0d8599dbd0f598a48340" +dependencies = [ + "bytemuck", +] + [[package]] name = "autocfg" version = "1.5.1" @@ -129,6 +165,27 @@ version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + [[package]] name = "bitflags" version = "2.13.1" @@ -150,6 +207,18 @@ version = "3.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" +[[package]] +name = "by_address" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06" + +[[package]] +name = "bytemuck" +version = "1.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" + [[package]] name = "byteorder" version = "1.5.0" @@ -176,6 +245,15 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "castaway" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec551ab6e7578819132c713a93c022a05d60159dc86e7a7050223577484c55a" +dependencies = [ + "rustversion", +] + [[package]] name = "cc" version = "1.4.3" @@ -200,6 +278,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +[[package]] +name = "cfg_aliases" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" + [[package]] name = "chrono" version = "0.4.45" @@ -274,6 +358,16 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" +[[package]] +name = "clap_mangen" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "211d617eaa4b735c96c9e0228fcbdb5120ef623f2b8cb67ffb84c3e02dbc28a4" +dependencies = [ + "clap", + "roff", +] + [[package]] name = "clipboard-win" version = "5.4.1" @@ -299,12 +393,35 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "compact_str" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dfdd1c2274d9aa354115b09dc9a901d6c5576818cdf70d14cae2bdb47df00ab" +dependencies = [ + "castaway", + "cfg-if", + "itoa", + "rustversion", + "ryu", + "static_assertions", +] + [[package]] name = "constant_time_eq" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" +[[package]] +name = "convert_case" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -329,12 +446,45 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "critical-section" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" + [[package]] name = "crossbeam-utils" version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17" +[[package]] +name = "crossterm" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b" +dependencies = [ + "bitflags 2.13.1", + "crossterm_winapi", + "derive_more", + "document-features", + "mio", + "parking_lot", + "rustix", + "signal-hook", + "signal-hook-mio", + "winapi", +] + +[[package]] +name = "crossterm_winapi" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" +dependencies = [ + "winapi", +] + [[package]] name = "crypto-common" version = "0.1.7" @@ -345,12 +495,84 @@ dependencies = [ "typenum", ] +[[package]] +name = "csscolorparser" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb2a7d3066da2de787b7f032c736763eb7ae5d355f81a68bab2675a96008b0bf" +dependencies = [ + "lab", + "phf", +] + +[[package]] +name = "darling" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88490bf1b990d87eaaa7ac8aa887f629a08e7359765b4911faf63c3763347d23" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "084e274f91c482280130e1e34e0b8d6e66776a060d7b6de7b84289ca778868c4" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 3.0.3", +] + +[[package]] +name = "darling_macro" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f5792fa0d41cd2325ce0ffa64f0a340eaebd4971a3a0c5e1ffd2cc488a355e" +dependencies = [ + "darling_core", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "deltae" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5729f5117e208430e437df2f4843f5e5952997175992d1414f94c57d61e270b4" + [[package]] name = "deranged" version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" +[[package]] +name = "derive_more" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.119", +] + [[package]] name = "digest" version = "0.10.7" @@ -373,6 +595,15 @@ dependencies = [ "syn 3.0.3", ] +[[package]] +name = "document-features" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" +dependencies = [ + "litrs", +] + [[package]] name = "either" version = "1.17.0" @@ -407,6 +638,25 @@ version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b5343afd4a8365a643ac588dab4cf234a190c7f6c88c9f6dd6ffe00837661b7" +[[package]] +name = "euclid" +version = "0.22.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1a05365e3b1c6d1650318537c7460c6923f1abdd272ad6842baa2b509957a06" +dependencies = [ + "num-traits", +] + +[[package]] +name = "fancy-regex" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b95f7c0680e4142284cf8b22c14a476e87d61b004a3a0861872b32ef7ead40a2" +dependencies = [ + "bit-set", + "regex", +] + [[package]] name = "fastrand" version = "2.5.0" @@ -424,6 +674,17 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "filedescriptor" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e40758ed24c9b2eeb76c35fb0aebc66c626084edd827e07e1552279814c6682d" +dependencies = [ + "libc", + "thiserror 1.0.69", + "winapi", +] + [[package]] name = "filetime" version = "0.2.29" @@ -440,6 +701,18 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d45db016d36b838f563236e9193d0ee6ce38f3f68b6c94e914b4929c96bbb890" +[[package]] +name = "finl_unicode" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9844ddc3a6e533d62bba727eb6c28b5d360921d5175e9ff0f1e621a5c590a4d5" + +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + [[package]] name = "flate2" version = "1.1.9" @@ -450,6 +723,18 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + [[package]] name = "form_urlencoded" version = "1.2.2" @@ -504,6 +789,18 @@ dependencies = [ "wasi", ] +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi 5.3.0", + "wasip2", +] + [[package]] name = "getrandom" version = "0.4.3" @@ -512,7 +809,18 @@ checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" dependencies = [ "cfg-if", "libc", - "r-efi", + "r-efi 6.0.0", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", ] [[package]] @@ -520,6 +828,11 @@ name = "hashbrown" version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] [[package]] name = "heck" @@ -527,6 +840,12 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + [[package]] name = "hmac" version = "0.12.1" @@ -643,6 +962,12 @@ dependencies = [ "zerovec", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" version = "1.1.0" @@ -671,7 +996,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.17.1", +] + +[[package]] +name = "indoc" +version = "2.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706" +dependencies = [ + "rustversion", ] [[package]] @@ -683,12 +1017,34 @@ dependencies = [ "generic-array", ] +[[package]] +name = "instability" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf84e73fa6f27f299dec58e13223cf70db80da872eb921d4f6138342a0eabc8" +dependencies = [ + "darling", + "indoc", + "proc-macro2", + "quote", + "syn 3.0.3", +] + [[package]] name = "is_terminal_polyfill" version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.18" @@ -716,6 +1072,17 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "kasuari" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bde5057d6143cc94e861d90f591b9303d6716c6b9602309150bd068853c10899" +dependencies = [ + "hashbrown 0.16.1", + "portable-atomic", + "thiserror 2.0.20", +] + [[package]] name = "keyring" version = "3.6.3" @@ -726,6 +1093,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "lab" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf36173d4167ed999940f804952e6b08197cae5ad5d572eb4db150ce8ad5d58f" + [[package]] name = "lazy_static" version = "1.5.0" @@ -738,6 +1111,21 @@ version = "0.2.189" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" +[[package]] +name = "libm" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" + +[[package]] +name = "line-clipping" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e752191d037c44ad111a8caa762921926658402f01cc1253f7bef2020ece4f5e" +dependencies = [ + "bitflags 2.13.1", +] + [[package]] name = "linux-raw-sys" version = "0.12.1" @@ -750,18 +1138,73 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae" +[[package]] +name = "litrs" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + [[package]] name = "log" version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" +[[package]] +name = "lru" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d2f2f9b4ba7e6b24d95e7e899329d35be83bcded72c8540cdd5368932d1d90a" +dependencies = [ + "hashbrown 0.17.1", +] + +[[package]] +name = "mac_address" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0aeb26bf5e836cc1c341c8106051b573f1766dfa05aa87f0b98be5e51b02303" +dependencies = [ + "nix 0.29.0", + "winapi", +] + [[package]] name = "memchr" version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" +[[package]] +name = "memmem" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a64a92489e2744ce060c349162be1c5f33c6969234104dbd99ddb5feb08b8c15" + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + [[package]] name = "miniz_oxide" version = "0.8.9" @@ -772,24 +1215,70 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "mio" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30d65c71f1ce40ab09135ce117d742b9f8a19ff91a41a8b57ed50bc2de59c427" +dependencies = [ + "libc", + "log", + "wasi", + "windows-sys 0.61.2", +] + [[package]] name = "nix" version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" dependencies = [ - "bitflags", + "bitflags 2.13.1", "cfg-if", - "cfg_aliases", + "cfg_aliases 0.1.1", "libc", ] +[[package]] +name = "nix" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" +dependencies = [ + "bitflags 2.13.1", + "cfg-if", + "cfg_aliases 0.2.2", + "libc", + "memoffset", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + [[package]] name = "num-conv" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "num-traits" version = "0.2.19" @@ -799,6 +1288,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "num_threads" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" +dependencies = [ + "libc", +] + [[package]] name = "once_cell" version = "1.21.4" @@ -811,6 +1309,71 @@ version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" +[[package]] +name = "ordered-float" +version = "4.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bb71e1b3fa6ca1c61f383464aaf2bb0e2f8e772a1f01d486832464de363b951" +dependencies = [ + "num-traits", +] + +[[package]] +name = "palette" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddeed8580d347d2abf3dcf06a5f0b3dc020258338526b277847cd4248a70fc64" +dependencies = [ + "approx", + "libm", + "palette_derive", + "palette_math", +] + +[[package]] +name = "palette_derive" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88537020289b719d81be994ccf1bbf4990f477e2f69ee52fe3e45f43a02e56be" +dependencies = [ + "by_address", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "palette_math" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e6eb142958d64335fb0e345c5b9ead2ecd6fc438c307e9d7d3c4fd428dbaf12" +dependencies = [ + "libm", +] + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link", +] + [[package]] name = "password-hash" version = "0.4.2" @@ -840,6 +1403,100 @@ version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" +[[package]] +name = "pest" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a07a60cc7a4d00c91f95c685609d1d2f79050e6804b70ebedd7650f0b839bcf" +dependencies = [ + "memchr", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3a83744a5c8455b8b3e0dc5031362780a347c878bdd11584d1a8984228cc88d" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0cd3451aa3de60d4b9a1e736885e4dea6b31617598026f12256ad566d63304a" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "pest_meta" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e04d3a0849e241d7dfce834c83b1c5edc8622009e8dd51a12ba1927c32f05496" +dependencies = [ + "pest", +] + +[[package]] +name = "phf" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" +dependencies = [ + "phf_macros", + "phf_shared", +] + +[[package]] +name = "phf_codegen" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a" +dependencies = [ + "phf_generator", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" +dependencies = [ + "phf_shared", + "rand", +] + +[[package]] +name = "phf_macros" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "phf_shared" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" +dependencies = [ + "siphasher", +] + [[package]] name = "pin-project-lite" version = "0.2.17" @@ -852,6 +1509,12 @@ version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" +[[package]] +name = "portable-atomic" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85" + [[package]] name = "potential_utf" version = "0.1.6" @@ -885,18 +1548,172 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + [[package]] name = "r-efi" version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" +[[package]] +name = "rand" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22f6172bdec972074665ed81ed53b71da00bfc44b65a753cfde883ec4c702a1a" +dependencies = [ + "rand_core", +] + [[package]] name = "rand_core" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +[[package]] +name = "ratatui" +version = "0.30.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3274ba0a2c5e1bcad2a2005d20f4dc59dad26b2eb0940fb094500dba4099d57d" +dependencies = [ + "instability", + "ratatui-core", + "ratatui-crossterm", + "ratatui-macros", + "ratatui-termina", + "ratatui-termwiz", + "ratatui-widgets", + "serde", +] + +[[package]] +name = "ratatui-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbb175c433c8e28a809d1f5773a2ae96e68c0ce40db865cbab1020bf33ae479c" +dependencies = [ + "bitflags 2.13.1", + "compact_str", + "critical-section", + "hashbrown 0.17.1", + "itertools", + "kasuari", + "lru", + "palette", + "serde", + "strum", + "thiserror 2.0.20", + "unicode-segmentation", + "unicode-truncate", + "unicode-width 0.2.2", +] + +[[package]] +name = "ratatui-crossterm" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567584a3b0e6a8203c23de40b4861497266725eb5363dbfd18a1edd603cca9f0" +dependencies = [ + "cfg-if", + "crossterm", + "instability", + "ratatui-core", +] + +[[package]] +name = "ratatui-macros" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed7dc68daa7498a43e4d68e0eb078427e10c38fbcfbb1e42d955f1fa2140d814" +dependencies = [ + "ratatui-core", + "ratatui-widgets", +] + +[[package]] +name = "ratatui-termina" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0bf912d9e66f057a759d92e386a280ea886b352ab757d6ac4d653c7ed2c43c2" +dependencies = [ + "instability", + "ratatui-core", + "termina", +] + +[[package]] +name = "ratatui-termwiz" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf03e0380b7744054d6cb74224fe3adf062a029754933f575ca1e3b4c2ce977" +dependencies = [ + "ratatui-core", + "termwiz", +] + +[[package]] +name = "ratatui-widgets" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66e3d19bcc9130ca376277d93b60767ff121ace3be06f5f95f81dd68956407d1" +dependencies = [ + "bitflags 2.13.1", + "hashbrown 0.17.1", + "indoc", + "instability", + "itertools", + "line-clipping", + "ratatui-core", + "serde", + "strum", + "time", + "unicode-segmentation", + "unicode-width 0.2.2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags 2.13.1", +] + +[[package]] +name = "regex" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" + [[package]] name = "ring" version = "0.17.14" @@ -911,13 +1728,28 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "roff" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "323c417e1d9665a65b263ec744ba09030cfb277e9daa0b018a4ab62e57bc8189" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + [[package]] name = "rustix" version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ - "bitflags", + "bitflags 2.13.1", "errno", "libc", "linux-raw-sys", @@ -971,16 +1803,16 @@ version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7803e8936da37efd9b6d4478277f4b2b9bb5cdb37a113e8d63222e58da647e63" dependencies = [ - "bitflags", + "bitflags 2.13.1", "cfg-if", "clipboard-win", "fd-lock", "libc", "log", "memchr", - "nix", + "nix 0.28.0", "unicode-segmentation", - "unicode-width", + "unicode-width 0.1.14", "utf8parse", "windows-sys 0.52.0", ] @@ -991,6 +1823,12 @@ version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + [[package]] name = "semver" version = "1.0.28" @@ -1087,12 +1925,49 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" +[[package]] +name = "signal-hook" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d881a16cf4426aa584979d30bd82cb33429027e42122b169753d6ef1085ed6e2" +dependencies = [ + "libc", + "signal-hook-registry", +] + +[[package]] +name = "signal-hook-mio" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b75a19a7a740b25bc7944bdee6172368f988763b744e3d4dfe753f6b4ece40cc" +dependencies = [ + "libc", + "mio", + "signal-hook", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + [[package]] name = "simd-adler32" version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" +[[package]] +name = "siphasher" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649" + [[package]] name = "slab" version = "0.4.12" @@ -1111,18 +1986,56 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + [[package]] name = "strsim" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +[[package]] +name = "strum" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9628de9b8791db39ceda2b119bbe13134770b56c138ec1d3af810d045c04f9bd" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab85eea0270ee17587ed4156089e10b9e6880ee688791d45a905f5b1ca36f664" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "subtle" version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "syn" version = "2.0.119" @@ -1180,6 +2093,19 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "termina" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9048a889effe34a5cddee0af7f53285198b16dca3be510858d38dfdb3e62a04e" +dependencies = [ + "bitflags 2.13.1", + "parking_lot", + "rustix", + "signal-hook", + "windows-sys 0.61.2", +] + [[package]] name = "terminal_size" version = "0.4.4" @@ -1190,6 +2116,109 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "terminfo" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4ea810f0692f9f51b382fff5893887bb4580f5fa246fde546e0b13e7fcee662" +dependencies = [ + "fnv", + "nom", + "phf", + "phf_codegen", +] + +[[package]] +name = "termios" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "411c5bf740737c7918b8b1fe232dca4dc9f8e754b8ad5e20966814001ed0ac6b" +dependencies = [ + "libc", +] + +[[package]] +name = "termwiz" +version = "0.23.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4676b37242ccbd1aabf56edb093a4827dc49086c0ffd764a5705899e0f35f8f7" +dependencies = [ + "anyhow", + "base64", + "bitflags 2.13.1", + "fancy-regex", + "filedescriptor", + "finl_unicode", + "fixedbitset", + "hex", + "lazy_static", + "libc", + "log", + "memmem", + "nix 0.29.0", + "num-derive", + "num-traits", + "ordered-float", + "pest", + "pest_derive", + "phf", + "sha2", + "signal-hook", + "siphasher", + "terminfo", + "termios", + "thiserror 1.0.69", + "ucd-trie", + "unicode-segmentation", + "vtparse", + "wezterm-bidi", + "wezterm-blob-leases", + "wezterm-color-types", + "wezterm-dynamic", + "wezterm-input-types", + "winapi", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f" +dependencies = [ + "thiserror-impl 2.0.20", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + [[package]] name = "time" version = "0.3.55" @@ -1197,7 +2226,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134" dependencies = [ "deranged", + "libc", "num-conv", + "num_threads", "powerfmt", "serde_core", "time-core", @@ -1225,6 +2256,12 @@ version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" +[[package]] +name = "ucd-trie" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" + [[package]] name = "unicode-ident" version = "1.0.24" @@ -1237,12 +2274,29 @@ version = "1.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" +[[package]] +name = "unicode-truncate" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b380a1238663e5f8a691f9039c73e1cdae598a30e9855f541d29b08b53e9a5" +dependencies = [ + "itertools", + "unicode-segmentation", + "unicode-width 0.2.2", +] + [[package]] name = "unicode-width" version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" +[[package]] +name = "unicode-width" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" + [[package]] name = "unsafe-libyaml" version = "0.2.11" @@ -1294,12 +2348,33 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "uuid" +version = "1.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cefc03fd367c0c6d4305de1b312cf00248c4114f4a0418ce6a6af769e3b0bd9" +dependencies = [ + "atomic", + "getrandom 0.4.3", + "js-sys", + "wasm-bindgen", +] + [[package]] name = "version_check" version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +[[package]] +name = "vtparse" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d9b2acfb050df409c972a37d3b8e08cdea3bddb0c09db9d53137e504cfabed0" +dependencies = [ + "utf8parse", +] + [[package]] name = "wait-timeout" version = "0.2.1" @@ -1315,6 +2390,15 @@ version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" +[[package]] +name = "wasip2" +version = "1.0.4+wasi-0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +dependencies = [ + "wit-bindgen", +] + [[package]] name = "wasm-bindgen" version = "0.2.127" @@ -1378,6 +2462,78 @@ dependencies = [ "rustls-pki-types", ] +[[package]] +name = "wezterm-bidi" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0a6e355560527dd2d1cf7890652f4f09bb3433b6aadade4c9b5ed76de5f3ec" +dependencies = [ + "log", + "wezterm-dynamic", +] + +[[package]] +name = "wezterm-blob-leases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "692daff6d93d94e29e4114544ef6d5c942a7ed998b37abdc19b17136ea428eb7" +dependencies = [ + "getrandom 0.3.4", + "mac_address", + "sha2", + "thiserror 1.0.69", + "uuid", +] + +[[package]] +name = "wezterm-color-types" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7de81ef35c9010270d63772bebef2f2d6d1f2d20a983d27505ac850b8c4b4296" +dependencies = [ + "csscolorparser", + "deltae", + "lazy_static", + "wezterm-dynamic", +] + +[[package]] +name = "wezterm-dynamic" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f2ab60e120fd6eaa68d9567f3226e876684639d22a4219b313ff69ec0ccd5ac" +dependencies = [ + "log", + "ordered-float", + "strsim", + "thiserror 1.0.69", + "wezterm-dynamic-derive", +] + +[[package]] +name = "wezterm-dynamic-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46c0cf2d539c645b448eaffec9ec494b8b19bd5077d9e58cb1ae7efece8d575b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "wezterm-input-types" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7012add459f951456ec9d6c7e6fc340b1ce15d6fc9629f8c42853412c029e57e" +dependencies = [ + "bitflags 1.3.2", + "euclid", + "lazy_static", + "serde", + "wezterm-dynamic", +] + [[package]] name = "which" version = "7.0.3" @@ -1390,6 +2546,28 @@ dependencies = [ "winsafe", ] +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + [[package]] name = "windows-core" version = "0.62.2" @@ -1546,6 +2724,12 @@ version = "0.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + [[package]] name = "writeable" version = "0.6.4" diff --git a/Cargo.toml b/Cargo.toml index d5660b8..91f5b58 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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"] } diff --git a/EXAMPLES.md b/EXAMPLES.md index 4c9e813..51b435f 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -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') diff --git a/README.md b/README.md index 715b380..8faf063 100644 --- a/README.md +++ b/README.md @@ -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 --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 / am unfavorite | étoile ★ dans am list, am status et am info (persistante) | +| am note | note libre affichée dans am info (am note : affiche) | +| am tag … / am untag | 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 --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 | ouvre le répertoire d'installation dans l'explorateur | -| am completion | script de complétion (bash, zsh, fish, powershell) | +| am completion [--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 # complétion Tab : commandes, agents, groupes, options + ❯ inst # 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 diff --git a/RELEASING.md b/RELEASING.md index 354d4c3..7e142f9 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -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 " \ -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 " \ - -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//assets?name=am-windows-x86_64.zip - curl -X POST -H "Authorization: token " \ - -F "attachment=@am-linux-x86_64.tar.gz" \ - https://git.dracodev.net/api/v1/repos/Projets/agent-manager/releases//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 diff --git a/ROADMAP.md b/ROADMAP.md index f916fb6..f62637e 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -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 diff --git a/completions/_am b/completions/_am index 5998350..336e4af 100644 --- a/completions/_am +++ b/completions/_am @@ -17,6 +17,7 @@ _am() { _arguments "${_arguments_options[@]}" : \ '-c+[Use an alternate configuration file]:FILE:_files' \ '--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ '-v[Verbose output\: show every command executed and its details]' \ '--verbose[Verbose output\: show every command executed and its details]' \ '(-v --verbose)-q[Quiet mode\: only errors are printed]' \ @@ -42,10 +43,12 @@ _am() { (list) _arguments "${_arguments_options[@]}" : \ '--category=[Only show agents of this category]:CATEGORY:_default' \ +'--sort=[Sort by name, version or status (default\: name)]:KEY:_default' \ '-c+[Use an alternate configuration file]:FILE:_files' \ '--config=[Use an alternate configuration file]:FILE:_files' \ -'--installed-only[Only show agents that are installed (managed or external)]' \ -'--all[Include hidden agents as well]' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'--all[Show every agent known to the catalog, not only the installed ones]' \ +'--running[Only show running agents]' \ '-v[Verbose output\: show every command executed and its details]' \ '--verbose[Verbose output\: show every command executed and its details]' \ '(-v --verbose)-q[Quiet mode\: only errors are printed]' \ @@ -59,12 +62,493 @@ _arguments "${_arguments_options[@]}" : \ '--help[Print help]' \ && ret=0 ;; +(logs) +_arguments "${_arguments_options[@]}" : \ +'--lines=[Number of lines to show (default\: 20)]:N:_default' \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'--follow[Follow the log as it grows]' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +':agent -- Agent name or alias:_default' \ +&& ret=0 +;; +(open) +_arguments "${_arguments_options[@]}" : \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +':agent -- Agent name or alias:_default' \ +&& ret=0 +;; +(watch) +_arguments "${_arguments_options[@]}" : \ +'--interval=[Check interval in seconds (default\: 5)]:SECS:_default' \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'--restart[Restart the agent automatically when it dies (with backoff)]' \ +'--notify[Desktop notification on every restart]' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +':agent -- Agent name or alias:_default' \ +&& ret=0 +;; +(dashboard) +_arguments "${_arguments_options[@]}" : \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(favorite) +_arguments "${_arguments_options[@]}" : \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +':agent -- Agent name or alias:_default' \ +&& ret=0 +;; +(unfavorite) +_arguments "${_arguments_options[@]}" : \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +':agent -- Agent name or alias:_default' \ +&& ret=0 +;; +(note) +_arguments "${_arguments_options[@]}" : \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +':agent -- Agent name or alias:_default' \ +'*::text -- Note text (several words are joined); empty prints the note:_default' \ +&& ret=0 +;; +(tag) +_arguments "${_arguments_options[@]}" : \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +':agent -- Agent name or alias:_default' \ +'*::words -- One or more tags to add:_default' \ +&& ret=0 +;; +(untag) +_arguments "${_arguments_options[@]}" : \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +':agent -- Agent name or alias:_default' \ +':tag -- Tag to remove:_default' \ +&& ret=0 +;; +(tags) +_arguments "${_arguments_options[@]}" : \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +'::agent -- Only show the tags of this agent:_default' \ +&& ret=0 +;; +(profile) +_arguments "${_arguments_options[@]}" : \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_am__subcmd__profile_commands" \ +"*::: :->profile" \ +&& ret=0 + + case $state in + (profile) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:am-profile-command-$line[1]:" + case $line[1] in + (list) +_arguments "${_arguments_options[@]}" : \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(show) +_arguments "${_arguments_options[@]}" : \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +':name -- Profile name:_default' \ +&& ret=0 +;; + esac + ;; +esac +;; +(man) +_arguments "${_arguments_options[@]}" : \ +'--output=[Write the page(s) to this directory instead of stdout]:DIR:_files' \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +'::command -- Command name (omit for the whole CLI):_default' \ +&& ret=0 +;; +(_agents) +_arguments "${_arguments_options[@]}" : \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'--installed[Only installed agents (managed + external), aliases and groups]' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(alias) +_arguments "${_arguments_options[@]}" : \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_am__subcmd__alias_commands" \ +"*::: :->alias" \ +&& ret=0 + + case $state in + (alias) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:am-alias-command-$line[1]:" + case $line[1] in + (add) +_arguments "${_arguments_options[@]}" : \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +':name -- Short name of the alias:_default' \ +':target -- Agent name (or another alias) it points to:_default' \ +&& ret=0 +;; +(remove) +_arguments "${_arguments_options[@]}" : \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +':name -- Alias to remove:_default' \ +&& ret=0 +;; +(list) +_arguments "${_arguments_options[@]}" : \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; + esac + ;; +esac +;; +(secret) +_arguments "${_arguments_options[@]}" : \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_am__subcmd__secret_commands" \ +"*::: :->secret" \ +&& ret=0 + + case $state in + (secret) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:am-secret-command-$line[1]:" + case $line[1] in + (set) +_arguments "${_arguments_options[@]}" : \ +'--agent=[Agent it belongs to]:AGENT:_default' \ +'--value=[Secret value (prefer --value over shell history; never logged)]:VALUE:_default' \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +':name -- Secret name (the environment variable name):_default' \ +&& ret=0 +;; +(unset) +_arguments "${_arguments_options[@]}" : \ +'--agent=[Agent it belongs to]:AGENT:_default' \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +':name -- Secret name:_default' \ +&& ret=0 +;; +(list) +_arguments "${_arguments_options[@]}" : \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; + esac + ;; +esac +;; (start) _arguments "${_arguments_options[@]}" : \ '*--args=[Extra arguments passed to the agent (repeatable; quoted strings are split on spaces)]::ARGS:_default' \ '*--env=[Set an environment variable for the agent (repeatable)\: --env KEY=VALUE]:KEY=VALUE:_default' \ +'--profile=[Apply an environment profile (env + args, defined in the config)]:NAME:_default' \ '-c+[Use an alternate configuration file]:FILE:_files' \ '--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ '(-f --foreground)-b[Run detached in the background; output goes to the agent log file]' \ '(-f --foreground)--background[Run detached in the background; output goes to the agent log file]' \ '-f[Run in the foreground, attached to this terminal (the default)]' \ @@ -81,7 +565,7 @@ _arguments "${_arguments_options[@]}" : \ '--no-color[Disable ANSI colors]' \ '-h[Print help]' \ '--help[Print help]' \ -':agent -- Agent name, alias, or group\::_default' \ +'::agent -- Agent name, alias, or group\: (defaults to the project'\''s default agent):_default' \ && ret=0 ;; (stop) @@ -89,6 +573,7 @@ _arguments "${_arguments_options[@]}" : \ '--timeout=[Grace period in seconds before killing (default\: from config, 5s)]:SECS:_default' \ '-c+[Use an alternate configuration file]:FILE:_files' \ '--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ '--force[Kill immediately instead of terminating gracefully]' \ '-v[Verbose output\: show every command executed and its details]' \ '--verbose[Verbose output\: show every command executed and its details]' \ @@ -108,9 +593,11 @@ _arguments "${_arguments_options[@]}" : \ _arguments "${_arguments_options[@]}" : \ '*--args=[Extra arguments passed to the agent (repeatable; quoted strings are split on spaces)]::ARGS:_default' \ '*--env=[Set an environment variable for the agent (repeatable)\: --env KEY=VALUE]:KEY=VALUE:_default' \ +'--profile=[Apply an environment profile (env + args, defined in the config)]:NAME:_default' \ '--timeout=[Grace period in seconds before killing (default\: from config, 5s)]:SECS:_default' \ '-c+[Use an alternate configuration file]:FILE:_files' \ '--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ '(-f --foreground)-b[Run detached in the background; output goes to the agent log file]' \ '(-f --foreground)--background[Run detached in the background; output goes to the agent log file]' \ '-f[Run in the foreground, attached to this terminal (the default)]' \ @@ -128,13 +615,14 @@ _arguments "${_arguments_options[@]}" : \ '--no-color[Disable ANSI colors]' \ '-h[Print help]' \ '--help[Print help]' \ -':agent -- Agent name, alias, or group\::_default' \ +'::agent -- Agent name, alias, or group\: (defaults to the project'\''s default agent):_default' \ && ret=0 ;; (status) _arguments "${_arguments_options[@]}" : \ '-c+[Use an alternate configuration file]:FILE:_files' \ '--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ '-v[Verbose output\: show every command executed and its details]' \ '--verbose[Verbose output\: show every command executed and its details]' \ '(-v --verbose)-q[Quiet mode\: only errors are printed]' \ @@ -149,11 +637,159 @@ _arguments "${_arguments_options[@]}" : \ '::agent -- Agent name or alias (omit to show all installed agents):_default' \ && ret=0 ;; +(sessions) +_arguments "${_arguments_options[@]}" : \ +'--project=[Only sessions of this project]:PROJECT:_default' \ +'--status=[Only sessions with this status (running, stopped, failed, interrupted)]:STATUS:_default' \ +'--show=[Show one session in detail (summary + log excerpt)]:ID:_default' \ +'--resume=[Resume a finished session\: relaunch the agent with its recorded arguments]:ID:_default' \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +'::agent -- Only sessions of this agent:_default' \ +&& ret=0 +;; +(stats) +_arguments "${_arguments_options[@]}" : \ +'--period=[Only events of the last period (7d, 30d, 90d, all)]:PERIOD:_default' \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +'::agent -- Agent name or alias (omit for the global view):_default' \ +&& ret=0 +;; +(top) +_arguments "${_arguments_options[@]}" : \ +'--period=[Only events of the last period (7d, 30d, 90d, all)]:PERIOD:_default' \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(report) +_arguments "${_arguments_options[@]}" : \ +'--output=[Output file (default\: report-YYYYMMDD.md in the state directory)]:FILE:_files' \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'(--last-month)--last-week[Cover the last 7 days]' \ +'--last-month[Cover the last 30 days]' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(projects) +_arguments "${_arguments_options[@]}" : \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +'::name -- Project name (omit to list every project):_default' \ +&& ret=0 +;; +(timeline) +_arguments "${_arguments_options[@]}" : \ +'--project=[Only activity of this project]:PROJECT:_default' \ +'--since=[Only activity at or after this date (YYYY-MM-DD or RFC 3339)]:DATE:_default' \ +'--limit=[Maximum number of entries (default\: 50)]:N:_default' \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +'::agent -- Only activity of this agent:_default' \ +&& ret=0 +;; +(log) +_arguments "${_arguments_options[@]}" : \ +'--kind=[Only these event kinds (comma separated\: start,stop,run,install,...)]:KINDS:_default' \ +'--since=[Only events at or after this date (YYYY-MM-DD or RFC 3339)]:DATE:_default' \ +'--limit=[Maximum number of events (default\: 50)]:N:_default' \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'--follow[Follow the journal as new events arrive]' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +'::agent -- Only events of this agent:_default' \ +&& ret=0 +;; (install) _arguments "${_arguments_options[@]}" : \ '--method=[Select the install method (index, or type\: npm, pip, uv, cargo, go, bun, curl, binary, git)]:METHOD:_default' \ '-c+[Use an alternate configuration file]:FILE:_files' \ '--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ '--force[Reinstall even if already installed]' \ '-v[Verbose output\: show every command executed and its details]' \ '--verbose[Verbose output\: show every command executed and its details]' \ @@ -173,6 +809,7 @@ _arguments "${_arguments_options[@]}" : \ _arguments "${_arguments_options[@]}" : \ '-c+[Use an alternate configuration file]:FILE:_files' \ '--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ '--purge[Also remove logs and the agent entry from the user config file]' \ '-v[Verbose output\: show every command executed and its details]' \ '--verbose[Verbose output\: show every command executed and its details]' \ @@ -192,6 +829,7 @@ _arguments "${_arguments_options[@]}" : \ _arguments "${_arguments_options[@]}" : \ '-c+[Use an alternate configuration file]:FILE:_files' \ '--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ '--all[Update every installed managed agent]' \ '-v[Verbose output\: show every command executed and its details]' \ '--verbose[Verbose output\: show every command executed and its details]' \ @@ -210,8 +848,36 @@ _arguments "${_arguments_options[@]}" : \ (search) _arguments "${_arguments_options[@]}" : \ '--category=[Restrict to this category]:CATEGORY:_default' \ +'--tag=[Only agents carrying this personal tag]:TAG:_default' \ '-c+[Use an alternate configuration file]:FILE:_files' \ '--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +'::keyword -- Keyword to search for (case-insensitive substring):_default' \ +&& ret=0 +;; +(history) +_arguments "${_arguments_options[@]}" : \ +'--kind=[Only commands of this kind (am or shell)]:KIND:_default' \ +'--cwd=[Only commands run in this directory]:DIR:_default' \ +'--search=[Full-text search in the command line]:TEXT:_default' \ +'--session=[Only commands of this session]:ID:_default' \ +'--limit=[Maximum number of entries (default\: 100)]:N:_default' \ +'--rerun=[Re-run the Nth most recent entry (with confirmation)]:N:_default' \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'--failed[Only failed commands]' \ '-v[Verbose output\: show every command executed and its details]' \ '--verbose[Verbose output\: show every command executed and its details]' \ '(-v --verbose)-q[Quiet mode\: only errors are printed]' \ @@ -223,13 +889,13 @@ _arguments "${_arguments_options[@]}" : \ '--no-color[Disable ANSI colors]' \ '-h[Print help]' \ '--help[Print help]' \ -':keyword -- Keyword to search for (case-insensitive substring):_default' \ && ret=0 ;; (info) _arguments "${_arguments_options[@]}" : \ '-c+[Use an alternate configuration file]:FILE:_files' \ '--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ '-v[Verbose output\: show every command executed and its details]' \ '--verbose[Verbose output\: show every command executed and its details]' \ '(-v --verbose)-q[Quiet mode\: only errors are printed]' \ @@ -244,10 +910,68 @@ _arguments "${_arguments_options[@]}" : \ ':agent -- Agent name or alias:_default' \ && ret=0 ;; +(init) +_arguments "${_arguments_options[@]}" : \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'--force[Overwrite an existing agent-manager.yaml]' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +'--find=[Search through all help commands table]:TEXT:_default' \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +'::command -- Command name (also accepts an agent name or alias); "commands" lists every command:_default' \ +&& ret=0 +;; +(version) +_arguments "${_arguments_options[@]}" : \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; (config) _arguments "${_arguments_options[@]}" : \ '-c+[Use an alternate configuration file]:FILE:_files' \ '--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ '-v[Verbose output\: show every command executed and its details]' \ '--verbose[Verbose output\: show every command executed and its details]' \ '(-v --verbose)-q[Quiet mode\: only errors are printed]' \ @@ -273,6 +997,7 @@ _arguments "${_arguments_options[@]}" : \ _arguments "${_arguments_options[@]}" : \ '-c+[Use an alternate configuration file]:FILE:_files' \ '--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ '-v[Verbose output\: show every command executed and its details]' \ '--verbose[Verbose output\: show every command executed and its details]' \ '(-v --verbose)-q[Quiet mode\: only errors are printed]' \ @@ -290,6 +1015,7 @@ _arguments "${_arguments_options[@]}" : \ _arguments "${_arguments_options[@]}" : \ '-c+[Use an alternate configuration file]:FILE:_files' \ '--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ '-v[Verbose output\: show every command executed and its details]' \ '--verbose[Verbose output\: show every command executed and its details]' \ '(-v --verbose)-q[Quiet mode\: only errors are printed]' \ @@ -307,6 +1033,7 @@ _arguments "${_arguments_options[@]}" : \ _arguments "${_arguments_options[@]}" : \ '-c+[Use an alternate configuration file]:FILE:_files' \ '--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ '-v[Verbose output\: show every command executed and its details]' \ '--verbose[Verbose output\: show every command executed and its details]' \ '(-v --verbose)-q[Quiet mode\: only errors are printed]' \ @@ -324,6 +1051,7 @@ _arguments "${_arguments_options[@]}" : \ _arguments "${_arguments_options[@]}" : \ '-c+[Use an alternate configuration file]:FILE:_files' \ '--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ '-v[Verbose output\: show every command executed and its details]' \ '--verbose[Verbose output\: show every command executed and its details]' \ '(-v --verbose)-q[Quiet mode\: only errors are printed]' \ @@ -341,6 +1069,7 @@ _arguments "${_arguments_options[@]}" : \ _arguments "${_arguments_options[@]}" : \ '-c+[Use an alternate configuration file]:FILE:_files' \ '--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ '-v[Verbose output\: show every command executed and its details]' \ '--verbose[Verbose output\: show every command executed and its details]' \ '(-v --verbose)-q[Quiet mode\: only errors are printed]' \ @@ -355,45 +1084,25 @@ _arguments "${_arguments_options[@]}" : \ ':file -- YAML (or JSON) file defining agents to include:_files' \ && ret=0 ;; -(help) +(set) _arguments "${_arguments_options[@]}" : \ -":: :_am__subcmd__config__subcmd__help_commands" \ -"*::: :->help" \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help]' \ +'--help[Print help]' \ +':key -- Dotted key path, e.g. settings.default_shell:_default' \ +':value -- New value (booleans and integers keep their type):_default' \ && ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:am-config-help-command-$line[1]:" - case $line[1] in - (show) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(path) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(edit) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(validate) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(add) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac ;; esac ;; @@ -403,6 +1112,7 @@ esac _arguments "${_arguments_options[@]}" : \ '-c+[Use an alternate configuration file]:FILE:_files' \ '--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ '--fix[Attempt to repair problems (create directories, fix the state file)]' \ '-v[Verbose output\: show every command executed and its details]' \ '--verbose[Verbose output\: show every command executed and its details]' \ @@ -421,6 +1131,7 @@ _arguments "${_arguments_options[@]}" : \ _arguments "${_arguments_options[@]}" : \ '-c+[Use an alternate configuration file]:FILE:_files' \ '--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ '-v[Verbose output\: show every command executed and its details]' \ '--verbose[Verbose output\: show every command executed and its details]' \ '(-v --verbose)-q[Quiet mode\: only errors are printed]' \ @@ -440,6 +1151,8 @@ _arguments "${_arguments_options[@]}" : \ _arguments "${_arguments_options[@]}" : \ '-c+[Use an alternate configuration file]:FILE:_files' \ '--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'--installed[Add dynamic completion of the installed agents, aliases and groups (queried from '\''am _agents'\'' at Tab time)]' \ '-v[Verbose output\: show every command executed and its details]' \ '--verbose[Verbose output\: show every command executed and its details]' \ '(-v --verbose)-q[Quiet mode\: only errors are printed]' \ @@ -459,6 +1172,7 @@ _arguments "${_arguments_options[@]}" : \ '--to=[Download the new binary to this path instead of replacing the current one]:FILE:_files' \ '-c+[Use an alternate configuration file]:FILE:_files' \ '--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ '--check[Only check whether a newer version exists]' \ '-v[Verbose output\: show every command executed and its details]' \ '--verbose[Verbose output\: show every command executed and its details]' \ @@ -473,11 +1187,30 @@ _arguments "${_arguments_options[@]}" : \ '--help[Print help]' \ && ret=0 ;; +(self-uninstall) +_arguments "${_arguments_options[@]}" : \ +'-c+[Use an alternate configuration file]:FILE:_files' \ +'--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ +'-v[Verbose output\: show every command executed and its details]' \ +'--verbose[Verbose output\: show every command executed and its details]' \ +'(-v --verbose)-q[Quiet mode\: only errors are printed]' \ +'(-v --verbose)--quiet[Quiet mode\: only errors are printed]' \ +'-y[Answer yes to every confirmation prompt]' \ +'--yes[Answer yes to every confirmation prompt]' \ +'--dry-run[Simulate the action without changing anything]' \ +'--json[Emit machine-readable JSON on stdout (for scripts)]' \ +'--no-color[Disable ANSI colors]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; (export) _arguments "${_arguments_options[@]}" : \ '--output=[Output file (default\: am-export.json)]:FILE:_files' \ '-c+[Use an alternate configuration file]:FILE:_files' \ '--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ '-v[Verbose output\: show every command executed and its details]' \ '--verbose[Verbose output\: show every command executed and its details]' \ '(-v --verbose)-q[Quiet mode\: only errors are printed]' \ @@ -495,6 +1228,7 @@ _arguments "${_arguments_options[@]}" : \ _arguments "${_arguments_options[@]}" : \ '-c+[Use an alternate configuration file]:FILE:_files' \ '--config=[Use an alternate configuration file]:FILE:_files' \ +'--theme=[Color theme for the output (see '\''am help theme'\'' for the list)]:THEME:_default' \ '-v[Verbose output\: show every command executed and its details]' \ '--verbose[Verbose output\: show every command executed and its details]' \ '(-v --verbose)-q[Quiet mode\: only errors are printed]' \ @@ -508,126 +1242,6 @@ _arguments "${_arguments_options[@]}" : \ '--help[Print help]' \ ':file -- File exported by the export command:_files' \ && ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_am__subcmd__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:am-help-command-$line[1]:" - case $line[1] in - (list) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(start) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(stop) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(restart) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(status) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(install) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(uninstall) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(update) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(search) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(info) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(config) -_arguments "${_arguments_options[@]}" : \ -":: :_am__subcmd__help__subcmd__config_commands" \ -"*::: :->config" \ -&& ret=0 - - case $state in - (config) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:am-help-config-command-$line[1]:" - case $line[1] in - (show) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(path) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(edit) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(validate) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(add) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(doctor) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(run) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(completion) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(self-update) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(export) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(import) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac ;; esac ;; @@ -637,27 +1251,82 @@ esac (( $+functions[_am_commands] )) || _am_commands() { local commands; commands=( -'list:List agents\: installed ones, or every agent known to the catalog' \ +'list:List installed agents (default); use --all for the whole catalog' \ +'logs:Tail the log file of an agent (--follow for a live view)' \ +'open:Open an agent'\''s installation directory in the file manager' \ +'watch:Supervise an agent and optionally restart it on crash' \ +'dashboard:Live TUI dashboard\: overview, activity, stats, sessions, projects' \ +'favorite:Mark an agent as a favorite (star in list and status)' \ +'unfavorite:Remove the favorite star from an agent' \ +'note:Attach a free-form note to an agent (shown in '\''am info'\''); '\''am note '\'' without text prints the current note' \ +'tag:Add a personal tag to an agent' \ +'untag:Remove a personal tag from an agent' \ +'tags:List personal tags (with counts), optionally for one agent' \ +'profile:Manage environment profiles (dev, prod, ...)' \ +'man:Generate a man page for am (or for one command)' \ +'_agents:Internal\: list agent names for shell completions (hidden)' \ +'alias:Manage command aliases (cc -> claude-code)' \ +'secret:Manage secrets in the OS keyring (never in plaintext config)' \ 'start:Start an agent (foreground by default, or detached with --background)' \ 'stop:Stop a background agent (SIGTERM, then SIGKILL after the timeout)' \ 'restart:Restart an agent\: stop, then start with the same options' \ 'status:Show the state of one agent, or of every installed agent' \ +'sessions:List the sessions of every agent (and of the interactive shell)' \ +'stats:Show usage statistics computed from the event journal' \ +'top:Show the most used agents (top 10)' \ +'report:Write a markdown activity report' \ +'projects:Show which agent works on which project' \ +'timeline:One chronological view of every activity (journal + REPL history)' \ +'log:Read the event journal\: everything am did' \ 'install:Install an agent and its dependencies' \ -'uninstall:Uninstall an agent and clean its files' \ +'uninstall:Uninstall an agent (managed or external) and clean its files' \ 'update:Update an installed agent to the latest available version' \ 'search:Search the catalog by keyword (name, description, category, tags)' \ +'history:Search the command history (am and shell commands)' \ 'info:Show detailed information about one agent' \ +'init:Generate a local agent-manager.yaml for the current directory' \ +'help:Display help\: the overview, a command, the command list, or a search' \ +'version:Display version and build information' \ 'config:Manage the configuration file' \ 'doctor:Check the environment\: tools, config validity, paths, permissions' \ 'run:Run the agent command directly with the given arguments (no process management)' \ 'completion:Generate a shell completion script' \ 'self-update:Update agent-manager itself from GitHub Releases' \ +'self-uninstall:Remove agent-manager and everything it created from this machine' \ 'export:Export the configuration and installation state (backup)' \ 'import:Import a previously exported configuration and state' \ -'help:Print this message or the help of the given subcommand(s)' \ ) _describe -t commands 'am commands' commands "$@" } +(( $+functions[_am__subcmd___agents_commands] )) || +_am__subcmd___agents_commands() { + local commands; commands=() + _describe -t commands 'am _agents commands' commands "$@" +} +(( $+functions[_am__subcmd__alias_commands] )) || +_am__subcmd__alias_commands() { + local commands; commands=( +'add:Add an alias (am alias add cc claude-code)' \ +'remove:Remove an alias' \ +'list:List every alias' \ + ) + _describe -t commands 'am alias commands' commands "$@" +} +(( $+functions[_am__subcmd__alias__subcmd__add_commands] )) || +_am__subcmd__alias__subcmd__add_commands() { + local commands; commands=() + _describe -t commands 'am alias add commands' commands "$@" +} +(( $+functions[_am__subcmd__alias__subcmd__list_commands] )) || +_am__subcmd__alias__subcmd__list_commands() { + local commands; commands=() + _describe -t commands 'am alias list commands' commands "$@" +} +(( $+functions[_am__subcmd__alias__subcmd__remove_commands] )) || +_am__subcmd__alias__subcmd__remove_commands() { + local commands; commands=() + _describe -t commands 'am alias remove commands' commands "$@" +} (( $+functions[_am__subcmd__completion_commands] )) || _am__subcmd__completion_commands() { local commands; commands=() @@ -671,7 +1340,7 @@ _am__subcmd__config_commands() { 'edit:Open the user configuration file in your editor' \ 'validate:Validate the configuration file(s)' \ 'add:Add another agent definition file to the user configuration' \ -'help:Print this message or the help of the given subcommand(s)' \ +'set:Set one configuration key without an editor (config set settings.default_shell pwsh)' \ ) _describe -t commands 'am config commands' commands "$@" } @@ -685,53 +1354,16 @@ _am__subcmd__config__subcmd__edit_commands() { local commands; commands=() _describe -t commands 'am config edit commands' commands "$@" } -(( $+functions[_am__subcmd__config__subcmd__help_commands] )) || -_am__subcmd__config__subcmd__help_commands() { - local commands; commands=( -'show:Print the effective (merged) configuration as YAML' \ -'path:Print the location of the configuration file(s)' \ -'edit:Open the user configuration file in your editor' \ -'validate:Validate the configuration file(s)' \ -'add:Add another agent definition file to the user configuration' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'am config help commands' commands "$@" -} -(( $+functions[_am__subcmd__config__subcmd__help__subcmd__add_commands] )) || -_am__subcmd__config__subcmd__help__subcmd__add_commands() { - local commands; commands=() - _describe -t commands 'am config help add commands' commands "$@" -} -(( $+functions[_am__subcmd__config__subcmd__help__subcmd__edit_commands] )) || -_am__subcmd__config__subcmd__help__subcmd__edit_commands() { - local commands; commands=() - _describe -t commands 'am config help edit commands' commands "$@" -} -(( $+functions[_am__subcmd__config__subcmd__help__subcmd__help_commands] )) || -_am__subcmd__config__subcmd__help__subcmd__help_commands() { - local commands; commands=() - _describe -t commands 'am config help help commands' commands "$@" -} -(( $+functions[_am__subcmd__config__subcmd__help__subcmd__path_commands] )) || -_am__subcmd__config__subcmd__help__subcmd__path_commands() { - local commands; commands=() - _describe -t commands 'am config help path commands' commands "$@" -} -(( $+functions[_am__subcmd__config__subcmd__help__subcmd__show_commands] )) || -_am__subcmd__config__subcmd__help__subcmd__show_commands() { - local commands; commands=() - _describe -t commands 'am config help show commands' commands "$@" -} -(( $+functions[_am__subcmd__config__subcmd__help__subcmd__validate_commands] )) || -_am__subcmd__config__subcmd__help__subcmd__validate_commands() { - local commands; commands=() - _describe -t commands 'am config help validate commands' commands "$@" -} (( $+functions[_am__subcmd__config__subcmd__path_commands] )) || _am__subcmd__config__subcmd__path_commands() { local commands; commands=() _describe -t commands 'am config path commands' commands "$@" } +(( $+functions[_am__subcmd__config__subcmd__set_commands] )) || +_am__subcmd__config__subcmd__set_commands() { + local commands; commands=() + _describe -t commands 'am config set commands' commands "$@" +} (( $+functions[_am__subcmd__config__subcmd__show_commands] )) || _am__subcmd__config__subcmd__show_commands() { local commands; commands=() @@ -742,6 +1374,11 @@ _am__subcmd__config__subcmd__validate_commands() { local commands; commands=() _describe -t commands 'am config validate commands' commands "$@" } +(( $+functions[_am__subcmd__dashboard_commands] )) || +_am__subcmd__dashboard_commands() { + local commands; commands=() + _describe -t commands 'am dashboard commands' commands "$@" +} (( $+functions[_am__subcmd__doctor_commands] )) || _am__subcmd__doctor_commands() { local commands; commands=() @@ -752,150 +1389,20 @@ _am__subcmd__export_commands() { local commands; commands=() _describe -t commands 'am export commands' commands "$@" } +(( $+functions[_am__subcmd__favorite_commands] )) || +_am__subcmd__favorite_commands() { + local commands; commands=() + _describe -t commands 'am favorite commands' commands "$@" +} (( $+functions[_am__subcmd__help_commands] )) || _am__subcmd__help_commands() { - local commands; commands=( -'list:List agents\: installed ones, or every agent known to the catalog' \ -'start:Start an agent (foreground by default, or detached with --background)' \ -'stop:Stop a background agent (SIGTERM, then SIGKILL after the timeout)' \ -'restart:Restart an agent\: stop, then start with the same options' \ -'status:Show the state of one agent, or of every installed agent' \ -'install:Install an agent and its dependencies' \ -'uninstall:Uninstall an agent and clean its files' \ -'update:Update an installed agent to the latest available version' \ -'search:Search the catalog by keyword (name, description, category, tags)' \ -'info:Show detailed information about one agent' \ -'config:Manage the configuration file' \ -'doctor:Check the environment\: tools, config validity, paths, permissions' \ -'run:Run the agent command directly with the given arguments (no process management)' \ -'completion:Generate a shell completion script' \ -'self-update:Update agent-manager itself from GitHub Releases' \ -'export:Export the configuration and installation state (backup)' \ -'import:Import a previously exported configuration and state' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) + local commands; commands=() _describe -t commands 'am help commands' commands "$@" } -(( $+functions[_am__subcmd__help__subcmd__completion_commands] )) || -_am__subcmd__help__subcmd__completion_commands() { +(( $+functions[_am__subcmd__history_commands] )) || +_am__subcmd__history_commands() { local commands; commands=() - _describe -t commands 'am help completion commands' commands "$@" -} -(( $+functions[_am__subcmd__help__subcmd__config_commands] )) || -_am__subcmd__help__subcmd__config_commands() { - local commands; commands=( -'show:Print the effective (merged) configuration as YAML' \ -'path:Print the location of the configuration file(s)' \ -'edit:Open the user configuration file in your editor' \ -'validate:Validate the configuration file(s)' \ -'add:Add another agent definition file to the user configuration' \ - ) - _describe -t commands 'am help config commands' commands "$@" -} -(( $+functions[_am__subcmd__help__subcmd__config__subcmd__add_commands] )) || -_am__subcmd__help__subcmd__config__subcmd__add_commands() { - local commands; commands=() - _describe -t commands 'am help config add commands' commands "$@" -} -(( $+functions[_am__subcmd__help__subcmd__config__subcmd__edit_commands] )) || -_am__subcmd__help__subcmd__config__subcmd__edit_commands() { - local commands; commands=() - _describe -t commands 'am help config edit commands' commands "$@" -} -(( $+functions[_am__subcmd__help__subcmd__config__subcmd__path_commands] )) || -_am__subcmd__help__subcmd__config__subcmd__path_commands() { - local commands; commands=() - _describe -t commands 'am help config path commands' commands "$@" -} -(( $+functions[_am__subcmd__help__subcmd__config__subcmd__show_commands] )) || -_am__subcmd__help__subcmd__config__subcmd__show_commands() { - local commands; commands=() - _describe -t commands 'am help config show commands' commands "$@" -} -(( $+functions[_am__subcmd__help__subcmd__config__subcmd__validate_commands] )) || -_am__subcmd__help__subcmd__config__subcmd__validate_commands() { - local commands; commands=() - _describe -t commands 'am help config validate commands' commands "$@" -} -(( $+functions[_am__subcmd__help__subcmd__doctor_commands] )) || -_am__subcmd__help__subcmd__doctor_commands() { - local commands; commands=() - _describe -t commands 'am help doctor commands' commands "$@" -} -(( $+functions[_am__subcmd__help__subcmd__export_commands] )) || -_am__subcmd__help__subcmd__export_commands() { - local commands; commands=() - _describe -t commands 'am help export commands' commands "$@" -} -(( $+functions[_am__subcmd__help__subcmd__help_commands] )) || -_am__subcmd__help__subcmd__help_commands() { - local commands; commands=() - _describe -t commands 'am help help commands' commands "$@" -} -(( $+functions[_am__subcmd__help__subcmd__import_commands] )) || -_am__subcmd__help__subcmd__import_commands() { - local commands; commands=() - _describe -t commands 'am help import commands' commands "$@" -} -(( $+functions[_am__subcmd__help__subcmd__info_commands] )) || -_am__subcmd__help__subcmd__info_commands() { - local commands; commands=() - _describe -t commands 'am help info commands' commands "$@" -} -(( $+functions[_am__subcmd__help__subcmd__install_commands] )) || -_am__subcmd__help__subcmd__install_commands() { - local commands; commands=() - _describe -t commands 'am help install commands' commands "$@" -} -(( $+functions[_am__subcmd__help__subcmd__list_commands] )) || -_am__subcmd__help__subcmd__list_commands() { - local commands; commands=() - _describe -t commands 'am help list commands' commands "$@" -} -(( $+functions[_am__subcmd__help__subcmd__restart_commands] )) || -_am__subcmd__help__subcmd__restart_commands() { - local commands; commands=() - _describe -t commands 'am help restart commands' commands "$@" -} -(( $+functions[_am__subcmd__help__subcmd__run_commands] )) || -_am__subcmd__help__subcmd__run_commands() { - local commands; commands=() - _describe -t commands 'am help run commands' commands "$@" -} -(( $+functions[_am__subcmd__help__subcmd__search_commands] )) || -_am__subcmd__help__subcmd__search_commands() { - local commands; commands=() - _describe -t commands 'am help search commands' commands "$@" -} -(( $+functions[_am__subcmd__help__subcmd__self-update_commands] )) || -_am__subcmd__help__subcmd__self-update_commands() { - local commands; commands=() - _describe -t commands 'am help self-update commands' commands "$@" -} -(( $+functions[_am__subcmd__help__subcmd__start_commands] )) || -_am__subcmd__help__subcmd__start_commands() { - local commands; commands=() - _describe -t commands 'am help start commands' commands "$@" -} -(( $+functions[_am__subcmd__help__subcmd__status_commands] )) || -_am__subcmd__help__subcmd__status_commands() { - local commands; commands=() - _describe -t commands 'am help status commands' commands "$@" -} -(( $+functions[_am__subcmd__help__subcmd__stop_commands] )) || -_am__subcmd__help__subcmd__stop_commands() { - local commands; commands=() - _describe -t commands 'am help stop commands' commands "$@" -} -(( $+functions[_am__subcmd__help__subcmd__uninstall_commands] )) || -_am__subcmd__help__subcmd__uninstall_commands() { - local commands; commands=() - _describe -t commands 'am help uninstall commands' commands "$@" -} -(( $+functions[_am__subcmd__help__subcmd__update_commands] )) || -_am__subcmd__help__subcmd__update_commands() { - local commands; commands=() - _describe -t commands 'am help update commands' commands "$@" + _describe -t commands 'am history commands' commands "$@" } (( $+functions[_am__subcmd__import_commands] )) || _am__subcmd__import_commands() { @@ -907,6 +1414,11 @@ _am__subcmd__info_commands() { local commands; commands=() _describe -t commands 'am info commands' commands "$@" } +(( $+functions[_am__subcmd__init_commands] )) || +_am__subcmd__init_commands() { + local commands; commands=() + _describe -t commands 'am init commands' commands "$@" +} (( $+functions[_am__subcmd__install_commands] )) || _am__subcmd__install_commands() { local commands; commands=() @@ -917,6 +1429,59 @@ _am__subcmd__list_commands() { local commands; commands=() _describe -t commands 'am list commands' commands "$@" } +(( $+functions[_am__subcmd__log_commands] )) || +_am__subcmd__log_commands() { + local commands; commands=() + _describe -t commands 'am log commands' commands "$@" +} +(( $+functions[_am__subcmd__logs_commands] )) || +_am__subcmd__logs_commands() { + local commands; commands=() + _describe -t commands 'am logs commands' commands "$@" +} +(( $+functions[_am__subcmd__man_commands] )) || +_am__subcmd__man_commands() { + local commands; commands=() + _describe -t commands 'am man commands' commands "$@" +} +(( $+functions[_am__subcmd__note_commands] )) || +_am__subcmd__note_commands() { + local commands; commands=() + _describe -t commands 'am note commands' commands "$@" +} +(( $+functions[_am__subcmd__open_commands] )) || +_am__subcmd__open_commands() { + local commands; commands=() + _describe -t commands 'am open commands' commands "$@" +} +(( $+functions[_am__subcmd__profile_commands] )) || +_am__subcmd__profile_commands() { + local commands; commands=( +'list:List every defined profile' \ +'show:Show one profile in detail (agent, env, args)' \ + ) + _describe -t commands 'am profile commands' commands "$@" +} +(( $+functions[_am__subcmd__profile__subcmd__list_commands] )) || +_am__subcmd__profile__subcmd__list_commands() { + local commands; commands=() + _describe -t commands 'am profile list commands' commands "$@" +} +(( $+functions[_am__subcmd__profile__subcmd__show_commands] )) || +_am__subcmd__profile__subcmd__show_commands() { + local commands; commands=() + _describe -t commands 'am profile show commands' commands "$@" +} +(( $+functions[_am__subcmd__projects_commands] )) || +_am__subcmd__projects_commands() { + local commands; commands=() + _describe -t commands 'am projects commands' commands "$@" +} +(( $+functions[_am__subcmd__report_commands] )) || +_am__subcmd__report_commands() { + local commands; commands=() + _describe -t commands 'am report commands' commands "$@" +} (( $+functions[_am__subcmd__restart_commands] )) || _am__subcmd__restart_commands() { local commands; commands=() @@ -932,16 +1497,55 @@ _am__subcmd__search_commands() { local commands; commands=() _describe -t commands 'am search commands' commands "$@" } +(( $+functions[_am__subcmd__secret_commands] )) || +_am__subcmd__secret_commands() { + local commands; commands=( +'set:Store a secret for an agent' \ +'unset:Remove a secret' \ +'list:List stored secret names (values are never shown)' \ + ) + _describe -t commands 'am secret commands' commands "$@" +} +(( $+functions[_am__subcmd__secret__subcmd__list_commands] )) || +_am__subcmd__secret__subcmd__list_commands() { + local commands; commands=() + _describe -t commands 'am secret list commands' commands "$@" +} +(( $+functions[_am__subcmd__secret__subcmd__set_commands] )) || +_am__subcmd__secret__subcmd__set_commands() { + local commands; commands=() + _describe -t commands 'am secret set commands' commands "$@" +} +(( $+functions[_am__subcmd__secret__subcmd__unset_commands] )) || +_am__subcmd__secret__subcmd__unset_commands() { + local commands; commands=() + _describe -t commands 'am secret unset commands' commands "$@" +} +(( $+functions[_am__subcmd__self-uninstall_commands] )) || +_am__subcmd__self-uninstall_commands() { + local commands; commands=() + _describe -t commands 'am self-uninstall commands' commands "$@" +} (( $+functions[_am__subcmd__self-update_commands] )) || _am__subcmd__self-update_commands() { local commands; commands=() _describe -t commands 'am self-update commands' commands "$@" } +(( $+functions[_am__subcmd__sessions_commands] )) || +_am__subcmd__sessions_commands() { + local commands; commands=() + _describe -t commands 'am sessions commands' commands "$@" +} (( $+functions[_am__subcmd__start_commands] )) || _am__subcmd__start_commands() { local commands; commands=() _describe -t commands 'am start commands' commands "$@" } +(( $+functions[_am__subcmd__stats_commands] )) || +_am__subcmd__stats_commands() { + local commands; commands=() + _describe -t commands 'am stats commands' commands "$@" +} (( $+functions[_am__subcmd__status_commands] )) || _am__subcmd__status_commands() { local commands; commands=() @@ -952,16 +1556,56 @@ _am__subcmd__stop_commands() { local commands; commands=() _describe -t commands 'am stop commands' commands "$@" } +(( $+functions[_am__subcmd__tag_commands] )) || +_am__subcmd__tag_commands() { + local commands; commands=() + _describe -t commands 'am tag commands' commands "$@" +} +(( $+functions[_am__subcmd__tags_commands] )) || +_am__subcmd__tags_commands() { + local commands; commands=() + _describe -t commands 'am tags commands' commands "$@" +} +(( $+functions[_am__subcmd__timeline_commands] )) || +_am__subcmd__timeline_commands() { + local commands; commands=() + _describe -t commands 'am timeline commands' commands "$@" +} +(( $+functions[_am__subcmd__top_commands] )) || +_am__subcmd__top_commands() { + local commands; commands=() + _describe -t commands 'am top commands' commands "$@" +} +(( $+functions[_am__subcmd__unfavorite_commands] )) || +_am__subcmd__unfavorite_commands() { + local commands; commands=() + _describe -t commands 'am unfavorite commands' commands "$@" +} (( $+functions[_am__subcmd__uninstall_commands] )) || _am__subcmd__uninstall_commands() { local commands; commands=() _describe -t commands 'am uninstall commands' commands "$@" } +(( $+functions[_am__subcmd__untag_commands] )) || +_am__subcmd__untag_commands() { + local commands; commands=() + _describe -t commands 'am untag commands' commands "$@" +} (( $+functions[_am__subcmd__update_commands] )) || _am__subcmd__update_commands() { local commands; commands=() _describe -t commands 'am update commands' commands "$@" } +(( $+functions[_am__subcmd__version_commands] )) || +_am__subcmd__version_commands() { + local commands; commands=() + _describe -t commands 'am version commands' commands "$@" +} +(( $+functions[_am__subcmd__watch_commands] )) || +_am__subcmd__watch_commands() { + local commands; commands=() + _describe -t commands 'am watch commands' commands "$@" +} if [ "$funcstack[1]" = "_am" ]; then _am "$@" diff --git a/completions/_am.ps1 b/completions/_am.ps1 index 9e497a7..4e85233 100644 --- a/completions/_am.ps1 +++ b/completions/_am.ps1 @@ -23,6 +23,7 @@ Register-ArgumentCompleter -Native -CommandName 'am' -ScriptBlock { 'am' { [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') @@ -36,32 +37,469 @@ Register-ArgumentCompleter -Native -CommandName 'am' -ScriptBlock { [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') [CompletionResult]::new('-V', '-V ', [CompletionResultType]::ParameterName, 'Print version') [CompletionResult]::new('--version', '--version', [CompletionResultType]::ParameterName, 'Print version') - [CompletionResult]::new('list', 'list', [CompletionResultType]::ParameterValue, 'List agents: installed ones, or every agent known to the catalog') + [CompletionResult]::new('list', 'list', [CompletionResultType]::ParameterValue, 'List installed agents (default); use --all for the whole catalog') + [CompletionResult]::new('logs', 'logs', [CompletionResultType]::ParameterValue, 'Tail the log file of an agent (--follow for a live view)') + [CompletionResult]::new('open', 'open', [CompletionResultType]::ParameterValue, 'Open an agent''s installation directory in the file manager') + [CompletionResult]::new('watch', 'watch', [CompletionResultType]::ParameterValue, 'Supervise an agent and optionally restart it on crash') + [CompletionResult]::new('dashboard', 'dashboard', [CompletionResultType]::ParameterValue, 'Live TUI dashboard: overview, activity, stats, sessions, projects') + [CompletionResult]::new('favorite', 'favorite', [CompletionResultType]::ParameterValue, 'Mark an agent as a favorite (star in list and status)') + [CompletionResult]::new('unfavorite', 'unfavorite', [CompletionResultType]::ParameterValue, 'Remove the favorite star from an agent') + [CompletionResult]::new('note', 'note', [CompletionResultType]::ParameterValue, 'Attach a free-form note to an agent (shown in ''am info''); ''am note '' without text prints the current note') + [CompletionResult]::new('tag', 'tag', [CompletionResultType]::ParameterValue, 'Add a personal tag to an agent') + [CompletionResult]::new('untag', 'untag', [CompletionResultType]::ParameterValue, 'Remove a personal tag from an agent') + [CompletionResult]::new('tags', 'tags', [CompletionResultType]::ParameterValue, 'List personal tags (with counts), optionally for one agent') + [CompletionResult]::new('profile', 'profile', [CompletionResultType]::ParameterValue, 'Manage environment profiles (dev, prod, ...)') + [CompletionResult]::new('man', 'man', [CompletionResultType]::ParameterValue, 'Generate a man page for am (or for one command)') + [CompletionResult]::new('_agents', '_agents', [CompletionResultType]::ParameterValue, 'Internal: list agent names for shell completions (hidden)') + [CompletionResult]::new('alias', 'alias', [CompletionResultType]::ParameterValue, 'Manage command aliases (cc -> claude-code)') + [CompletionResult]::new('secret', 'secret', [CompletionResultType]::ParameterValue, 'Manage secrets in the OS keyring (never in plaintext config)') [CompletionResult]::new('start', 'start', [CompletionResultType]::ParameterValue, 'Start an agent (foreground by default, or detached with --background)') [CompletionResult]::new('stop', 'stop', [CompletionResultType]::ParameterValue, 'Stop a background agent (SIGTERM, then SIGKILL after the timeout)') [CompletionResult]::new('restart', 'restart', [CompletionResultType]::ParameterValue, 'Restart an agent: stop, then start with the same options') [CompletionResult]::new('status', 'status', [CompletionResultType]::ParameterValue, 'Show the state of one agent, or of every installed agent') + [CompletionResult]::new('sessions', 'sessions', [CompletionResultType]::ParameterValue, 'List the sessions of every agent (and of the interactive shell)') + [CompletionResult]::new('stats', 'stats', [CompletionResultType]::ParameterValue, 'Show usage statistics computed from the event journal') + [CompletionResult]::new('top', 'top', [CompletionResultType]::ParameterValue, 'Show the most used agents (top 10)') + [CompletionResult]::new('report', 'report', [CompletionResultType]::ParameterValue, 'Write a markdown activity report') + [CompletionResult]::new('projects', 'projects', [CompletionResultType]::ParameterValue, 'Show which agent works on which project') + [CompletionResult]::new('timeline', 'timeline', [CompletionResultType]::ParameterValue, 'One chronological view of every activity (journal + REPL history)') + [CompletionResult]::new('log', 'log', [CompletionResultType]::ParameterValue, 'Read the event journal: everything am did') [CompletionResult]::new('install', 'install', [CompletionResultType]::ParameterValue, 'Install an agent and its dependencies') - [CompletionResult]::new('uninstall', 'uninstall', [CompletionResultType]::ParameterValue, 'Uninstall an agent and clean its files') + [CompletionResult]::new('uninstall', 'uninstall', [CompletionResultType]::ParameterValue, 'Uninstall an agent (managed or external) and clean its files') [CompletionResult]::new('update', 'update', [CompletionResultType]::ParameterValue, 'Update an installed agent to the latest available version') [CompletionResult]::new('search', 'search', [CompletionResultType]::ParameterValue, 'Search the catalog by keyword (name, description, category, tags)') + [CompletionResult]::new('history', 'history', [CompletionResultType]::ParameterValue, 'Search the command history (am and shell commands)') [CompletionResult]::new('info', 'info', [CompletionResultType]::ParameterValue, 'Show detailed information about one agent') + [CompletionResult]::new('init', 'init', [CompletionResultType]::ParameterValue, 'Generate a local agent-manager.yaml for the current directory') + [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Display help: the overview, a command, the command list, or a search') + [CompletionResult]::new('version', 'version', [CompletionResultType]::ParameterValue, 'Display version and build information') [CompletionResult]::new('config', 'config', [CompletionResultType]::ParameterValue, 'Manage the configuration file') [CompletionResult]::new('doctor', 'doctor', [CompletionResultType]::ParameterValue, 'Check the environment: tools, config validity, paths, permissions') [CompletionResult]::new('run', 'run', [CompletionResultType]::ParameterValue, 'Run the agent command directly with the given arguments (no process management)') [CompletionResult]::new('completion', 'completion', [CompletionResultType]::ParameterValue, 'Generate a shell completion script') [CompletionResult]::new('self-update', 'self-update', [CompletionResultType]::ParameterValue, 'Update agent-manager itself from GitHub Releases') + [CompletionResult]::new('self-uninstall', 'self-uninstall', [CompletionResultType]::ParameterValue, 'Remove agent-manager and everything it created from this machine') [CompletionResult]::new('export', 'export', [CompletionResultType]::ParameterValue, 'Export the configuration and installation state (backup)') [CompletionResult]::new('import', 'import', [CompletionResultType]::ParameterValue, 'Import a previously exported configuration and state') - [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') break } 'am;list' { [CompletionResult]::new('--category', '--category', [CompletionResultType]::ParameterName, 'Only show agents of this category') + [CompletionResult]::new('--sort', '--sort', [CompletionResultType]::ParameterName, 'Sort by name, version or status (default: name)') [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') - [CompletionResult]::new('--installed-only', '--installed-only', [CompletionResultType]::ParameterName, 'Only show agents that are installed (managed or external)') - [CompletionResult]::new('--all', '--all', [CompletionResultType]::ParameterName, 'Include hidden agents as well') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('--all', '--all', [CompletionResultType]::ParameterName, 'Show every agent known to the catalog, not only the installed ones') + [CompletionResult]::new('--running', '--running', [CompletionResultType]::ParameterName, 'Only show running agents') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;logs' { + [CompletionResult]::new('--lines', '--lines', [CompletionResultType]::ParameterName, 'Number of lines to show (default: 20)') + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('--follow', '--follow', [CompletionResultType]::ParameterName, 'Follow the log as it grows') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;open' { + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;watch' { + [CompletionResult]::new('--interval', '--interval', [CompletionResultType]::ParameterName, 'Check interval in seconds (default: 5)') + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('--restart', '--restart', [CompletionResultType]::ParameterName, 'Restart the agent automatically when it dies (with backoff)') + [CompletionResult]::new('--notify', '--notify', [CompletionResultType]::ParameterName, 'Desktop notification on every restart') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;dashboard' { + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;favorite' { + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;unfavorite' { + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;note' { + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;tag' { + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;untag' { + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;tags' { + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;profile' { + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('list', 'list', [CompletionResultType]::ParameterValue, 'List every defined profile') + [CompletionResult]::new('show', 'show', [CompletionResultType]::ParameterValue, 'Show one profile in detail (agent, env, args)') + break + } + 'am;profile;list' { + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;profile;show' { + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;man' { + [CompletionResult]::new('--output', '--output', [CompletionResultType]::ParameterName, 'Write the page(s) to this directory instead of stdout') + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;_agents' { + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('--installed', '--installed', [CompletionResultType]::ParameterName, 'Only installed agents (managed + external), aliases and groups') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;alias' { + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('add', 'add', [CompletionResultType]::ParameterValue, 'Add an alias (am alias add cc claude-code)') + [CompletionResult]::new('remove', 'remove', [CompletionResultType]::ParameterValue, 'Remove an alias') + [CompletionResult]::new('list', 'list', [CompletionResultType]::ParameterValue, 'List every alias') + break + } + 'am;alias;add' { + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;alias;remove' { + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;alias;list' { + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;secret' { + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('set', 'set', [CompletionResultType]::ParameterValue, 'Store a secret for an agent') + [CompletionResult]::new('unset', 'unset', [CompletionResultType]::ParameterValue, 'Remove a secret') + [CompletionResult]::new('list', 'list', [CompletionResultType]::ParameterValue, 'List stored secret names (values are never shown)') + break + } + 'am;secret;set' { + [CompletionResult]::new('--agent', '--agent', [CompletionResultType]::ParameterName, 'Agent it belongs to') + [CompletionResult]::new('--value', '--value', [CompletionResultType]::ParameterName, 'Secret value (prefer --value over shell history; never logged)') + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;secret;unset' { + [CompletionResult]::new('--agent', '--agent', [CompletionResultType]::ParameterName, 'Agent it belongs to') + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;secret;list' { + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') @@ -78,8 +516,10 @@ Register-ArgumentCompleter -Native -CommandName 'am' -ScriptBlock { 'am;start' { [CompletionResult]::new('--args', '--args', [CompletionResultType]::ParameterName, 'Extra arguments passed to the agent (repeatable; quoted strings are split on spaces)') [CompletionResult]::new('--env', '--env', [CompletionResultType]::ParameterName, 'Set an environment variable for the agent (repeatable): --env KEY=VALUE') + [CompletionResult]::new('--profile', '--profile', [CompletionResultType]::ParameterName, 'Apply an environment profile (env + args, defined in the config)') [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') [CompletionResult]::new('-b', '-b', [CompletionResultType]::ParameterName, 'Run detached in the background; output goes to the agent log file') [CompletionResult]::new('--background', '--background', [CompletionResultType]::ParameterName, 'Run detached in the background; output goes to the agent log file') [CompletionResult]::new('-f', '-f', [CompletionResultType]::ParameterName, 'Run in the foreground, attached to this terminal (the default)') @@ -102,6 +542,7 @@ Register-ArgumentCompleter -Native -CommandName 'am' -ScriptBlock { [CompletionResult]::new('--timeout', '--timeout', [CompletionResultType]::ParameterName, 'Grace period in seconds before killing (default: from config, 5s)') [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') [CompletionResult]::new('--force', '--force', [CompletionResultType]::ParameterName, 'Kill immediately instead of terminating gracefully') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') @@ -119,9 +560,11 @@ Register-ArgumentCompleter -Native -CommandName 'am' -ScriptBlock { 'am;restart' { [CompletionResult]::new('--args', '--args', [CompletionResultType]::ParameterName, 'Extra arguments passed to the agent (repeatable; quoted strings are split on spaces)') [CompletionResult]::new('--env', '--env', [CompletionResultType]::ParameterName, 'Set an environment variable for the agent (repeatable): --env KEY=VALUE') + [CompletionResult]::new('--profile', '--profile', [CompletionResultType]::ParameterName, 'Apply an environment profile (env + args, defined in the config)') [CompletionResult]::new('--timeout', '--timeout', [CompletionResultType]::ParameterName, 'Grace period in seconds before killing (default: from config, 5s)') [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') [CompletionResult]::new('-b', '-b', [CompletionResultType]::ParameterName, 'Run detached in the background; output goes to the agent log file') [CompletionResult]::new('--background', '--background', [CompletionResultType]::ParameterName, 'Run detached in the background; output goes to the agent log file') [CompletionResult]::new('-f', '-f', [CompletionResultType]::ParameterName, 'Run in the foreground, attached to this terminal (the default)') @@ -144,6 +587,142 @@ Register-ArgumentCompleter -Native -CommandName 'am' -ScriptBlock { 'am;status' { [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;sessions' { + [CompletionResult]::new('--project', '--project', [CompletionResultType]::ParameterName, 'Only sessions of this project') + [CompletionResult]::new('--status', '--status', [CompletionResultType]::ParameterName, 'Only sessions with this status (running, stopped, failed, interrupted)') + [CompletionResult]::new('--show', '--show', [CompletionResultType]::ParameterName, 'Show one session in detail (summary + log excerpt)') + [CompletionResult]::new('--resume', '--resume', [CompletionResultType]::ParameterName, 'Resume a finished session: relaunch the agent with its recorded arguments') + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;stats' { + [CompletionResult]::new('--period', '--period', [CompletionResultType]::ParameterName, 'Only events of the last period (7d, 30d, 90d, all)') + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;top' { + [CompletionResult]::new('--period', '--period', [CompletionResultType]::ParameterName, 'Only events of the last period (7d, 30d, 90d, all)') + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;report' { + [CompletionResult]::new('--output', '--output', [CompletionResultType]::ParameterName, 'Output file (default: report-YYYYMMDD.md in the state directory)') + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('--last-week', '--last-week', [CompletionResultType]::ParameterName, 'Cover the last 7 days') + [CompletionResult]::new('--last-month', '--last-month', [CompletionResultType]::ParameterName, 'Cover the last 30 days') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;projects' { + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;timeline' { + [CompletionResult]::new('--project', '--project', [CompletionResultType]::ParameterName, 'Only activity of this project') + [CompletionResult]::new('--since', '--since', [CompletionResultType]::ParameterName, 'Only activity at or after this date (YYYY-MM-DD or RFC 3339)') + [CompletionResult]::new('--limit', '--limit', [CompletionResultType]::ParameterName, 'Maximum number of entries (default: 50)') + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;log' { + [CompletionResult]::new('--kind', '--kind', [CompletionResultType]::ParameterName, 'Only these event kinds (comma separated: start,stop,run,install,...)') + [CompletionResult]::new('--since', '--since', [CompletionResultType]::ParameterName, 'Only events at or after this date (YYYY-MM-DD or RFC 3339)') + [CompletionResult]::new('--limit', '--limit', [CompletionResultType]::ParameterName, 'Maximum number of events (default: 50)') + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('--follow', '--follow', [CompletionResultType]::ParameterName, 'Follow the journal as new events arrive') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') @@ -161,6 +740,7 @@ Register-ArgumentCompleter -Native -CommandName 'am' -ScriptBlock { [CompletionResult]::new('--method', '--method', [CompletionResultType]::ParameterName, 'Select the install method (index, or type: npm, pip, uv, cargo, go, bun, curl, binary, git)') [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') [CompletionResult]::new('--force', '--force', [CompletionResultType]::ParameterName, 'Reinstall even if already installed') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') @@ -178,6 +758,7 @@ Register-ArgumentCompleter -Native -CommandName 'am' -ScriptBlock { 'am;uninstall' { [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') [CompletionResult]::new('--purge', '--purge', [CompletionResultType]::ParameterName, 'Also remove logs and the agent entry from the user config file') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') @@ -195,6 +776,7 @@ Register-ArgumentCompleter -Native -CommandName 'am' -ScriptBlock { 'am;update' { [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') [CompletionResult]::new('--all', '--all', [CompletionResultType]::ParameterName, 'Update every installed managed agent') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') @@ -211,8 +793,34 @@ Register-ArgumentCompleter -Native -CommandName 'am' -ScriptBlock { } 'am;search' { [CompletionResult]::new('--category', '--category', [CompletionResultType]::ParameterName, 'Restrict to this category') + [CompletionResult]::new('--tag', '--tag', [CompletionResultType]::ParameterName, 'Only agents carrying this personal tag') [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;history' { + [CompletionResult]::new('--kind', '--kind', [CompletionResultType]::ParameterName, 'Only commands of this kind (am or shell)') + [CompletionResult]::new('--cwd', '--cwd', [CompletionResultType]::ParameterName, 'Only commands run in this directory') + [CompletionResult]::new('--search', '--search', [CompletionResultType]::ParameterName, 'Full-text search in the command line') + [CompletionResult]::new('--session', '--session', [CompletionResultType]::ParameterName, 'Only commands of this session') + [CompletionResult]::new('--limit', '--limit', [CompletionResultType]::ParameterName, 'Maximum number of entries (default: 100)') + [CompletionResult]::new('--rerun', '--rerun', [CompletionResultType]::ParameterName, 'Re-run the Nth most recent entry (with confirmation)') + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('--failed', '--failed', [CompletionResultType]::ParameterName, 'Only failed commands') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') @@ -229,6 +837,60 @@ Register-ArgumentCompleter -Native -CommandName 'am' -ScriptBlock { 'am;info' { [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;init' { + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('--force', '--force', [CompletionResultType]::ParameterName, 'Overwrite an existing agent-manager.yaml') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;help' { + [CompletionResult]::new('--find', '--find', [CompletionResultType]::ParameterName, 'Search through all help commands table') + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + break + } + 'am;version' { + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') @@ -245,6 +907,7 @@ Register-ArgumentCompleter -Native -CommandName 'am' -ScriptBlock { 'am;config' { [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') @@ -261,12 +924,13 @@ Register-ArgumentCompleter -Native -CommandName 'am' -ScriptBlock { [CompletionResult]::new('edit', 'edit', [CompletionResultType]::ParameterValue, 'Open the user configuration file in your editor') [CompletionResult]::new('validate', 'validate', [CompletionResultType]::ParameterValue, 'Validate the configuration file(s)') [CompletionResult]::new('add', 'add', [CompletionResultType]::ParameterValue, 'Add another agent definition file to the user configuration') - [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') + [CompletionResult]::new('set', 'set', [CompletionResultType]::ParameterValue, 'Set one configuration key without an editor (config set settings.default_shell pwsh)') break } 'am;config;show' { [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') @@ -283,6 +947,7 @@ Register-ArgumentCompleter -Native -CommandName 'am' -ScriptBlock { 'am;config;path' { [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') @@ -299,6 +964,7 @@ Register-ArgumentCompleter -Native -CommandName 'am' -ScriptBlock { 'am;config;edit' { [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') @@ -315,6 +981,7 @@ Register-ArgumentCompleter -Native -CommandName 'am' -ScriptBlock { 'am;config;validate' { [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') @@ -331,6 +998,7 @@ Register-ArgumentCompleter -Native -CommandName 'am' -ScriptBlock { 'am;config;add' { [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') @@ -344,36 +1012,27 @@ Register-ArgumentCompleter -Native -CommandName 'am' -ScriptBlock { [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') break } - 'am;config;help' { - [CompletionResult]::new('show', 'show', [CompletionResultType]::ParameterValue, 'Print the effective (merged) configuration as YAML') - [CompletionResult]::new('path', 'path', [CompletionResultType]::ParameterValue, 'Print the location of the configuration file(s)') - [CompletionResult]::new('edit', 'edit', [CompletionResultType]::ParameterValue, 'Open the user configuration file in your editor') - [CompletionResult]::new('validate', 'validate', [CompletionResultType]::ParameterValue, 'Validate the configuration file(s)') - [CompletionResult]::new('add', 'add', [CompletionResultType]::ParameterValue, 'Add another agent definition file to the user configuration') - [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') - break - } - 'am;config;help;show' { - break - } - 'am;config;help;path' { - break - } - 'am;config;help;edit' { - break - } - 'am;config;help;validate' { - break - } - 'am;config;help;add' { - break - } - 'am;config;help;help' { + 'am;config;set' { + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') break } 'am;doctor' { [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') [CompletionResult]::new('--fix', '--fix', [CompletionResultType]::ParameterName, 'Attempt to repair problems (create directories, fix the state file)') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') @@ -391,6 +1050,7 @@ Register-ArgumentCompleter -Native -CommandName 'am' -ScriptBlock { 'am;run' { [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') @@ -407,6 +1067,8 @@ Register-ArgumentCompleter -Native -CommandName 'am' -ScriptBlock { 'am;completion' { [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('--installed', '--installed', [CompletionResultType]::ParameterName, 'Add dynamic completion of the installed agents, aliases and groups (queried from ''am _agents'' at Tab time)') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') @@ -424,6 +1086,7 @@ Register-ArgumentCompleter -Native -CommandName 'am' -ScriptBlock { [CompletionResult]::new('--to', '--to', [CompletionResultType]::ParameterName, 'Download the new binary to this path instead of replacing the current one') [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') [CompletionResult]::new('--check', '--check', [CompletionResultType]::ParameterName, 'Only check whether a newer version exists') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') @@ -438,10 +1101,28 @@ Register-ArgumentCompleter -Native -CommandName 'am' -ScriptBlock { [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') break } + 'am;self-uninstall' { + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') + [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Answer yes to every confirmation prompt') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Simulate the action without changing anything') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit machine-readable JSON on stdout (for scripts)') + [CompletionResult]::new('--no-color', '--no-color', [CompletionResultType]::ParameterName, 'Disable ANSI colors') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') + break + } 'am;export' { [CompletionResult]::new('--output', '--output', [CompletionResultType]::ParameterName, 'Output file (default: am-export.json)') [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') @@ -458,6 +1139,7 @@ Register-ArgumentCompleter -Native -CommandName 'am' -ScriptBlock { 'am;import' { [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Use an alternate configuration file') + [CompletionResult]::new('--theme', '--theme', [CompletionResultType]::ParameterName, 'Color theme for the output (see ''am help theme'' for the list)') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Verbose output: show every command executed and its details') [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Quiet mode: only errors are printed') @@ -471,101 +1153,6 @@ Register-ArgumentCompleter -Native -CommandName 'am' -ScriptBlock { [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') break } - 'am;help' { - [CompletionResult]::new('list', 'list', [CompletionResultType]::ParameterValue, 'List agents: installed ones, or every agent known to the catalog') - [CompletionResult]::new('start', 'start', [CompletionResultType]::ParameterValue, 'Start an agent (foreground by default, or detached with --background)') - [CompletionResult]::new('stop', 'stop', [CompletionResultType]::ParameterValue, 'Stop a background agent (SIGTERM, then SIGKILL after the timeout)') - [CompletionResult]::new('restart', 'restart', [CompletionResultType]::ParameterValue, 'Restart an agent: stop, then start with the same options') - [CompletionResult]::new('status', 'status', [CompletionResultType]::ParameterValue, 'Show the state of one agent, or of every installed agent') - [CompletionResult]::new('install', 'install', [CompletionResultType]::ParameterValue, 'Install an agent and its dependencies') - [CompletionResult]::new('uninstall', 'uninstall', [CompletionResultType]::ParameterValue, 'Uninstall an agent and clean its files') - [CompletionResult]::new('update', 'update', [CompletionResultType]::ParameterValue, 'Update an installed agent to the latest available version') - [CompletionResult]::new('search', 'search', [CompletionResultType]::ParameterValue, 'Search the catalog by keyword (name, description, category, tags)') - [CompletionResult]::new('info', 'info', [CompletionResultType]::ParameterValue, 'Show detailed information about one agent') - [CompletionResult]::new('config', 'config', [CompletionResultType]::ParameterValue, 'Manage the configuration file') - [CompletionResult]::new('doctor', 'doctor', [CompletionResultType]::ParameterValue, 'Check the environment: tools, config validity, paths, permissions') - [CompletionResult]::new('run', 'run', [CompletionResultType]::ParameterValue, 'Run the agent command directly with the given arguments (no process management)') - [CompletionResult]::new('completion', 'completion', [CompletionResultType]::ParameterValue, 'Generate a shell completion script') - [CompletionResult]::new('self-update', 'self-update', [CompletionResultType]::ParameterValue, 'Update agent-manager itself from GitHub Releases') - [CompletionResult]::new('export', 'export', [CompletionResultType]::ParameterValue, 'Export the configuration and installation state (backup)') - [CompletionResult]::new('import', 'import', [CompletionResultType]::ParameterValue, 'Import a previously exported configuration and state') - [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') - break - } - 'am;help;list' { - break - } - 'am;help;start' { - break - } - 'am;help;stop' { - break - } - 'am;help;restart' { - break - } - 'am;help;status' { - break - } - 'am;help;install' { - break - } - 'am;help;uninstall' { - break - } - 'am;help;update' { - break - } - 'am;help;search' { - break - } - 'am;help;info' { - break - } - 'am;help;config' { - [CompletionResult]::new('show', 'show', [CompletionResultType]::ParameterValue, 'Print the effective (merged) configuration as YAML') - [CompletionResult]::new('path', 'path', [CompletionResultType]::ParameterValue, 'Print the location of the configuration file(s)') - [CompletionResult]::new('edit', 'edit', [CompletionResultType]::ParameterValue, 'Open the user configuration file in your editor') - [CompletionResult]::new('validate', 'validate', [CompletionResultType]::ParameterValue, 'Validate the configuration file(s)') - [CompletionResult]::new('add', 'add', [CompletionResultType]::ParameterValue, 'Add another agent definition file to the user configuration') - break - } - 'am;help;config;show' { - break - } - 'am;help;config;path' { - break - } - 'am;help;config;edit' { - break - } - 'am;help;config;validate' { - break - } - 'am;help;config;add' { - break - } - 'am;help;doctor' { - break - } - 'am;help;run' { - break - } - 'am;help;completion' { - break - } - 'am;help;self-update' { - break - } - 'am;help;export' { - break - } - 'am;help;import' { - break - } - 'am;help;help' { - break - } }) $completions.Where{ $_.CompletionText -like "$wordToComplete*" } | diff --git a/completions/am.bash b/completions/am.bash index ea2d2ac..1b3be70 100644 --- a/completions/am.bash +++ b/completions/am.bash @@ -16,33 +16,75 @@ _am() { ",$1") cmd="am" ;; + am,_agents) + cmd="am__subcmd___agents" + ;; + am,alias) + cmd="am__subcmd__alias" + ;; am,completion) cmd="am__subcmd__completion" ;; am,config) cmd="am__subcmd__config" ;; + am,dashboard) + cmd="am__subcmd__dashboard" + ;; am,doctor) cmd="am__subcmd__doctor" ;; am,export) cmd="am__subcmd__export" ;; + am,favorite) + cmd="am__subcmd__favorite" + ;; am,help) cmd="am__subcmd__help" ;; + am,history) + cmd="am__subcmd__history" + ;; am,import) cmd="am__subcmd__import" ;; am,info) cmd="am__subcmd__info" ;; + am,init) + cmd="am__subcmd__init" + ;; am,install) cmd="am__subcmd__install" ;; am,list) cmd="am__subcmd__list" ;; + am,log) + cmd="am__subcmd__log" + ;; + am,logs) + cmd="am__subcmd__logs" + ;; + am,man) + cmd="am__subcmd__man" + ;; + am,note) + cmd="am__subcmd__note" + ;; + am,open) + cmd="am__subcmd__open" + ;; + am,profile) + cmd="am__subcmd__profile" + ;; + am,projects) + cmd="am__subcmd__projects" + ;; + am,report) + cmd="am__subcmd__report" + ;; am,restart) cmd="am__subcmd__restart" ;; @@ -52,128 +94,101 @@ _am() { am,search) cmd="am__subcmd__search" ;; + am,secret) + cmd="am__subcmd__secret" + ;; + am,self-uninstall) + cmd="am__subcmd__self__subcmd__uninstall" + ;; am,self-update) cmd="am__subcmd__self__subcmd__update" ;; + am,sessions) + cmd="am__subcmd__sessions" + ;; am,start) cmd="am__subcmd__start" ;; + am,stats) + cmd="am__subcmd__stats" + ;; am,status) cmd="am__subcmd__status" ;; am,stop) cmd="am__subcmd__stop" ;; + am,tag) + cmd="am__subcmd__tag" + ;; + am,tags) + cmd="am__subcmd__tags" + ;; + am,timeline) + cmd="am__subcmd__timeline" + ;; + am,top) + cmd="am__subcmd__top" + ;; + am,unfavorite) + cmd="am__subcmd__unfavorite" + ;; am,uninstall) cmd="am__subcmd__uninstall" ;; + am,untag) + cmd="am__subcmd__untag" + ;; am,update) cmd="am__subcmd__update" ;; + am,version) + cmd="am__subcmd__version" + ;; + am,watch) + cmd="am__subcmd__watch" + ;; + am__subcmd__alias,add) + cmd="am__subcmd__alias__subcmd__add" + ;; + am__subcmd__alias,list) + cmd="am__subcmd__alias__subcmd__list" + ;; + am__subcmd__alias,remove) + cmd="am__subcmd__alias__subcmd__remove" + ;; am__subcmd__config,add) cmd="am__subcmd__config__subcmd__add" ;; am__subcmd__config,edit) cmd="am__subcmd__config__subcmd__edit" ;; - am__subcmd__config,help) - cmd="am__subcmd__config__subcmd__help" - ;; am__subcmd__config,path) cmd="am__subcmd__config__subcmd__path" ;; + am__subcmd__config,set) + cmd="am__subcmd__config__subcmd__set" + ;; am__subcmd__config,show) cmd="am__subcmd__config__subcmd__show" ;; am__subcmd__config,validate) cmd="am__subcmd__config__subcmd__validate" ;; - am__subcmd__config__subcmd__help,add) - cmd="am__subcmd__config__subcmd__help__subcmd__add" + am__subcmd__profile,list) + cmd="am__subcmd__profile__subcmd__list" ;; - am__subcmd__config__subcmd__help,edit) - cmd="am__subcmd__config__subcmd__help__subcmd__edit" + am__subcmd__profile,show) + cmd="am__subcmd__profile__subcmd__show" ;; - am__subcmd__config__subcmd__help,help) - cmd="am__subcmd__config__subcmd__help__subcmd__help" + am__subcmd__secret,list) + cmd="am__subcmd__secret__subcmd__list" ;; - am__subcmd__config__subcmd__help,path) - cmd="am__subcmd__config__subcmd__help__subcmd__path" + am__subcmd__secret,set) + cmd="am__subcmd__secret__subcmd__set" ;; - am__subcmd__config__subcmd__help,show) - cmd="am__subcmd__config__subcmd__help__subcmd__show" - ;; - am__subcmd__config__subcmd__help,validate) - cmd="am__subcmd__config__subcmd__help__subcmd__validate" - ;; - am__subcmd__help,completion) - cmd="am__subcmd__help__subcmd__completion" - ;; - am__subcmd__help,config) - cmd="am__subcmd__help__subcmd__config" - ;; - am__subcmd__help,doctor) - cmd="am__subcmd__help__subcmd__doctor" - ;; - am__subcmd__help,export) - cmd="am__subcmd__help__subcmd__export" - ;; - am__subcmd__help,help) - cmd="am__subcmd__help__subcmd__help" - ;; - am__subcmd__help,import) - cmd="am__subcmd__help__subcmd__import" - ;; - am__subcmd__help,info) - cmd="am__subcmd__help__subcmd__info" - ;; - am__subcmd__help,install) - cmd="am__subcmd__help__subcmd__install" - ;; - am__subcmd__help,list) - cmd="am__subcmd__help__subcmd__list" - ;; - am__subcmd__help,restart) - cmd="am__subcmd__help__subcmd__restart" - ;; - am__subcmd__help,run) - cmd="am__subcmd__help__subcmd__run" - ;; - am__subcmd__help,search) - cmd="am__subcmd__help__subcmd__search" - ;; - am__subcmd__help,self-update) - cmd="am__subcmd__help__subcmd__self__subcmd__update" - ;; - am__subcmd__help,start) - cmd="am__subcmd__help__subcmd__start" - ;; - am__subcmd__help,status) - cmd="am__subcmd__help__subcmd__status" - ;; - am__subcmd__help,stop) - cmd="am__subcmd__help__subcmd__stop" - ;; - am__subcmd__help,uninstall) - cmd="am__subcmd__help__subcmd__uninstall" - ;; - am__subcmd__help,update) - cmd="am__subcmd__help__subcmd__update" - ;; - am__subcmd__help__subcmd__config,add) - cmd="am__subcmd__help__subcmd__config__subcmd__add" - ;; - am__subcmd__help__subcmd__config,edit) - cmd="am__subcmd__help__subcmd__config__subcmd__edit" - ;; - am__subcmd__help__subcmd__config,path) - cmd="am__subcmd__help__subcmd__config__subcmd__path" - ;; - am__subcmd__help__subcmd__config,show) - cmd="am__subcmd__help__subcmd__config__subcmd__show" - ;; - am__subcmd__help__subcmd__config,validate) - cmd="am__subcmd__help__subcmd__config__subcmd__validate" + am__subcmd__secret,unset) + cmd="am__subcmd__secret__subcmd__unset" ;; *) ;; @@ -182,7 +197,7 @@ _am() { case "${cmd}" in am) - opts="-c -v -q -y -h -V --config --verbose --quiet --yes --dry-run --json --no-color --help --version list start stop restart status install uninstall update search info config doctor run completion self-update export import help" + opts="-c -v -q -y -h -V --config --verbose --quiet --yes --dry-run --json --no-color --theme --help --version list logs open watch dashboard favorite unfavorite note tag untag tags profile man _agents alias secret start stop restart status sessions stats top report projects timeline log install uninstall update search history info init help version config doctor run completion self-update self-uninstall export import" if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -196,6 +211,10 @@ _am() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -203,8 +222,8 @@ _am() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - am__subcmd__completion) - opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --help bash elvish fish powershell zsh" + am__subcmd___agents) + opts="-c -v -q -y -h --installed --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -218,6 +237,140 @@ _am() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__alias) + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help add remove list" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__alias__subcmd__add) + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__alias__subcmd__list) + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__alias__subcmd__remove) + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__completion) + opts="-c -v -q -y -h --installed --config --verbose --quiet --yes --dry-run --json --no-color --theme --help bash elvish fish powershell zsh" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -226,7 +379,7 @@ _am() { return 0 ;; am__subcmd__config) - opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --help show path edit validate add help" + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help show path edit validate add set" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -240,6 +393,10 @@ _am() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -248,7 +405,7 @@ _am() { return 0 ;; am__subcmd__config__subcmd__add) - opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --help" + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -262,6 +419,10 @@ _am() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -270,7 +431,7 @@ _am() { return 0 ;; am__subcmd__config__subcmd__edit) - opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --help" + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -284,104 +445,10 @@ _am() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - *) - COMPREPLY=() + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__config__subcmd__help) - opts="show path edit validate add help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__config__subcmd__help__subcmd__add) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__config__subcmd__help__subcmd__edit) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__config__subcmd__help__subcmd__help) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__config__subcmd__help__subcmd__path) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__config__subcmd__help__subcmd__show) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__config__subcmd__help__subcmd__validate) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in *) COMPREPLY=() ;; @@ -390,7 +457,7 @@ _am() { return 0 ;; am__subcmd__config__subcmd__path) - opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --help" + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -404,6 +471,36 @@ _am() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__config__subcmd__set) + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -412,7 +509,7 @@ _am() { return 0 ;; am__subcmd__config__subcmd__show) - opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --help" + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -426,6 +523,10 @@ _am() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -434,7 +535,7 @@ _am() { return 0 ;; am__subcmd__config__subcmd__validate) - opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --help" + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -448,6 +549,10 @@ _am() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -455,8 +560,8 @@ _am() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - am__subcmd__doctor) - opts="-c -v -q -y -h --fix --config --verbose --quiet --yes --dry-run --json --no-color --help" + am__subcmd__dashboard) + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -470,6 +575,36 @@ _am() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__doctor) + opts="-c -v -q -y -h --fix --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -478,7 +613,7 @@ _am() { return 0 ;; am__subcmd__export) - opts="-c -v -q -y -h --output --config --verbose --quiet --yes --dry-run --json --no-color --help" + opts="-c -v -q -y -h --output --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -496,6 +631,10 @@ _am() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -503,344 +642,8 @@ _am() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - am__subcmd__help) - opts="list start stop restart status install uninstall update search info config doctor run completion self-update export import help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__help__subcmd__completion) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__help__subcmd__config) - opts="show path edit validate add" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__help__subcmd__config__subcmd__add) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__help__subcmd__config__subcmd__edit) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__help__subcmd__config__subcmd__path) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__help__subcmd__config__subcmd__show) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__help__subcmd__config__subcmd__validate) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__help__subcmd__doctor) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__help__subcmd__export) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__help__subcmd__help) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__help__subcmd__import) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__help__subcmd__info) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__help__subcmd__install) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__help__subcmd__list) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__help__subcmd__restart) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__help__subcmd__run) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__help__subcmd__search) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__help__subcmd__self__subcmd__update) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__help__subcmd__start) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__help__subcmd__status) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__help__subcmd__stop) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__help__subcmd__uninstall) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__help__subcmd__update) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; - am__subcmd__import) - opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --help" + am__subcmd__favorite) + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -854,6 +657,116 @@ _am() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__help) + opts="-c -v -q -y -h --find --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --find) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__history) + opts="-c -v -q -y -h --kind --cwd --search --failed --session --limit --rerun --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --kind) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --cwd) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --search) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --session) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --limit) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --rerun) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__import) + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -862,7 +775,7 @@ _am() { return 0 ;; am__subcmd__info) - opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --help" + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -876,6 +789,36 @@ _am() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__init) + opts="-c -v -q -y -h --force --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -884,7 +827,7 @@ _am() { return 0 ;; am__subcmd__install) - opts="-c -v -q -y -h --method --force --config --verbose --quiet --yes --dry-run --json --no-color --help" + opts="-c -v -q -y -h --method --force --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -902,6 +845,10 @@ _am() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -910,7 +857,7 @@ _am() { return 0 ;; am__subcmd__list) - opts="-c -v -q -y -h --installed-only --category --all --config --verbose --quiet --yes --dry-run --json --no-color --help" + opts="-c -v -q -y -h --all --category --running --sort --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -920,6 +867,10 @@ _am() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --sort) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; --config) COMPREPLY=($(compgen -f "${cur}")) return 0 @@ -928,6 +879,294 @@ _am() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__log) + opts="-c -v -q -y -h --kind --since --limit --follow --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --kind) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --since) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --limit) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__logs) + opts="-c -v -q -y -h --lines --follow --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --lines) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__man) + opts="-c -v -q -y -h --output --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__note) + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__open) + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__profile) + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help list show" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__profile__subcmd__list) + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__profile__subcmd__show) + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__projects) + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__report) + opts="-c -v -q -y -h --last-week --last-month --output --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -936,7 +1175,7 @@ _am() { return 0 ;; am__subcmd__restart) - opts="-b -f -c -v -q -y -h --background --foreground --args --env --notify --force --timeout --config --verbose --quiet --yes --dry-run --json --no-color --help" + opts="-b -f -c -v -q -y -h --background --foreground --args --env --notify --profile --force --timeout --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -950,6 +1189,10 @@ _am() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --profile) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; --timeout) COMPREPLY=($(compgen -f "${cur}")) return 0 @@ -962,6 +1205,10 @@ _am() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -970,7 +1217,7 @@ _am() { return 0 ;; am__subcmd__run) - opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --help" + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -984,6 +1231,10 @@ _am() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -992,7 +1243,7 @@ _am() { return 0 ;; am__subcmd__search) - opts="-c -v -q -y -h --category --config --verbose --quiet --yes --dry-run --json --no-color --help" + opts="-c -v -q -y -h --category --tag --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1002,6 +1253,10 @@ _am() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --tag) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; --config) COMPREPLY=($(compgen -f "${cur}")) return 0 @@ -1010,6 +1265,152 @@ _am() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__secret) + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help set unset list" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__secret__subcmd__list) + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__secret__subcmd__set) + opts="-c -v -q -y -h --agent --value --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --agent) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --value) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__secret__subcmd__unset) + opts="-c -v -q -y -h --agent --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --agent) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__self__subcmd__uninstall) + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -1018,7 +1419,7 @@ _am() { return 0 ;; am__subcmd__self__subcmd__update) - opts="-c -v -q -y -h --check --to --config --verbose --quiet --yes --dry-run --json --no-color --help" + opts="-c -v -q -y -h --check --to --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1036,6 +1437,52 @@ _am() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__sessions) + opts="-c -v -q -y -h --project --status --show --resume --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --project) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --status) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --show) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --resume) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -1044,7 +1491,7 @@ _am() { return 0 ;; am__subcmd__start) - opts="-b -f -c -v -q -y -h --background --foreground --args --env --notify --config --verbose --quiet --yes --dry-run --json --no-color --help" + opts="-b -f -c -v -q -y -h --background --foreground --args --env --notify --profile --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1058,6 +1505,10 @@ _am() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --profile) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; --config) COMPREPLY=($(compgen -f "${cur}")) return 0 @@ -1066,6 +1517,40 @@ _am() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__stats) + opts="-c -v -q -y -h --period --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --period) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -1074,7 +1559,7 @@ _am() { return 0 ;; am__subcmd__status) - opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --help" + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1088,6 +1573,10 @@ _am() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -1096,7 +1585,7 @@ _am() { return 0 ;; am__subcmd__stop) - opts="-c -v -q -y -h --force --timeout --config --verbose --quiet --yes --dry-run --json --no-color --help" + opts="-c -v -q -y -h --force --timeout --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1114,6 +1603,10 @@ _am() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -1121,8 +1614,8 @@ _am() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - am__subcmd__uninstall) - opts="-c -v -q -y -h --purge --config --verbose --quiet --yes --dry-run --json --no-color --help" + am__subcmd__tag) + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1136,6 +1629,182 @@ _am() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__tags) + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__timeline) + opts="-c -v -q -y -h --project --since --limit --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --project) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --since) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --limit) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__top) + opts="-c -v -q -y -h --period --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --period) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__unfavorite) + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__uninstall) + opts="-c -v -q -y -h --purge --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__untag) + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -1144,7 +1813,7 @@ _am() { return 0 ;; am__subcmd__update) - opts="-c -v -q -y -h --all --config --verbose --quiet --yes --dry-run --json --no-color --help" + opts="-c -v -q -y -h --all --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1158,6 +1827,66 @@ _am() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__version) + opts="-c -v -q -y -h --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + am__subcmd__watch) + opts="-c -v -q -y -h --restart --notify --interval --config --verbose --quiet --yes --dry-run --json --no-color --theme --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --interval) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --config) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --theme) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; diff --git a/completions/am.elv b/completions/am.elv index 0bdc5ab..4f21bac 100644 --- a/completions/am.elv +++ b/completions/am.elv @@ -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 '' 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] } diff --git a/completions/am.fish b/completions/am.fish index 39674f4..9c9c759 100644 --- a/completions/am.fish +++ b/completions/am.fish @@ -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 \' 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' diff --git a/config.yaml b/config.yaml index 4f960e0..488ed64 100644 --- a/config.yaml +++ b/config.yaml @@ -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: diff --git a/man/am-alias.1 b/man/am-alias.1 new file mode 100644 index 0000000..153ae77 --- /dev/null +++ b/man/am-alias.1 @@ -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) diff --git a/man/am-completion.1 b/man/am-completion.1 new file mode 100644 index 0000000..482f9d8 --- /dev/null +++ b/man/am-completion.1 @@ -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 diff --git a/man/am-config.1 b/man/am-config.1 new file mode 100644 index 0000000..fd986ea --- /dev/null +++ b/man/am-config.1 @@ -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) diff --git a/man/am-dashboard.1 b/man/am-dashboard.1 new file mode 100644 index 0000000..0c68cbb --- /dev/null +++ b/man/am-dashboard.1 @@ -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 diff --git a/man/am-doctor.1 b/man/am-doctor.1 new file mode 100644 index 0000000..5c8561b --- /dev/null +++ b/man/am-doctor.1 @@ -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 diff --git a/man/am-export.1 b/man/am-export.1 new file mode 100644 index 0000000..f8bff1d --- /dev/null +++ b/man/am-export.1 @@ -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\fR [default: am\-export.json] +Output file (default: am\-export.json) +.TP +\fB\-h\fR, \fB\-\-help\fR +Print help diff --git a/man/am-favorite.1 b/man/am-favorite.1 new file mode 100644 index 0000000..b715cce --- /dev/null +++ b/man/am-favorite.1 @@ -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 diff --git a/man/am-help.1 b/man/am-help.1 new file mode 100644 index 0000000..0c48aa5 --- /dev/null +++ b/man/am-help.1 @@ -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\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 diff --git a/man/am-history.1 b/man/am-history.1 new file mode 100644 index 0000000..56b86c2 --- /dev/null +++ b/man/am-history.1 @@ -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\fR +Only commands of this kind (am or shell) +.TP +\fB\-\-cwd\fR \fI\fR +Only commands run in this directory +.TP +\fB\-\-search\fR \fI\fR +Full\-text search in the command line +.TP +\fB\-\-failed\fR +Only failed commands +.TP +\fB\-\-session\fR \fI\fR +Only commands of this session +.TP +\fB\-\-limit\fR \fI\fR [default: 100] +Maximum number of entries (default: 100) +.TP +\fB\-\-rerun\fR \fI\fR +Re\-run the Nth most recent entry (with confirmation) +.TP +\fB\-h\fR, \fB\-\-help\fR +Print help diff --git a/man/am-import.1 b/man/am-import.1 new file mode 100644 index 0000000..7d1d765 --- /dev/null +++ b/man/am-import.1 @@ -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 diff --git a/man/am-info.1 b/man/am-info.1 new file mode 100644 index 0000000..370dc73 --- /dev/null +++ b/man/am-info.1 @@ -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 diff --git a/man/am-init.1 b/man/am-init.1 new file mode 100644 index 0000000..1a3a8e4 --- /dev/null +++ b/man/am-init.1 @@ -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 diff --git a/man/am-install.1 b/man/am-install.1 new file mode 100644 index 0000000..8e6e72c --- /dev/null +++ b/man/am-install.1 @@ -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\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 diff --git a/man/am-list.1 b/man/am-list.1 new file mode 100644 index 0000000..902bf1c --- /dev/null +++ b/man/am-list.1 @@ -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\fR +Only show agents of this category +.TP +\fB\-\-running\fR +Only show running agents +.TP +\fB\-\-sort\fR \fI\fR +Sort by name, version or status (default: name) +.TP +\fB\-h\fR, \fB\-\-help\fR +Print help diff --git a/man/am-log.1 b/man/am-log.1 new file mode 100644 index 0000000..130d715 --- /dev/null +++ b/man/am-log.1 @@ -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\fR +Only these event kinds (comma separated: start,stop,run,install,...) +.TP +\fB\-\-since\fR \fI\fR +Only events at or after this date (YYYY\-MM\-DD or RFC 3339) +.TP +\fB\-\-limit\fR \fI\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 diff --git a/man/am-logs.1 b/man/am-logs.1 new file mode 100644 index 0000000..ddd4847 --- /dev/null +++ b/man/am-logs.1 @@ -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\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 diff --git a/man/am-man.1 b/man/am-man.1 new file mode 100644 index 0000000..8270b39 --- /dev/null +++ b/man/am-man.1 @@ -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\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) diff --git a/man/am-note.1 b/man/am-note.1 new file mode 100644 index 0000000..ed77944 --- /dev/null +++ b/man/am-note.1 @@ -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 \*(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 \*(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 diff --git a/man/am-open.1 b/man/am-open.1 new file mode 100644 index 0000000..3853961 --- /dev/null +++ b/man/am-open.1 @@ -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 diff --git a/man/am-profile.1 b/man/am-profile.1 new file mode 100644 index 0000000..b811de0 --- /dev/null +++ b/man/am-profile.1 @@ -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) diff --git a/man/am-projects.1 b/man/am-projects.1 new file mode 100644 index 0000000..380c874 --- /dev/null +++ b/man/am-projects.1 @@ -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) diff --git a/man/am-report.1 b/man/am-report.1 new file mode 100644 index 0000000..a10fe8a --- /dev/null +++ b/man/am-report.1 @@ -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\fR +Output file (default: report\-YYYYMMDD.md in the state directory) +.TP +\fB\-h\fR, \fB\-\-help\fR +Print help diff --git a/man/am-restart.1 b/man/am-restart.1 new file mode 100644 index 0000000..6b18591 --- /dev/null +++ b/man/am-restart.1 @@ -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...\fR] +Extra arguments passed to the agent (repeatable; quoted strings are split on spaces) +.TP +\fB\-\-env\fR \fI\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\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\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: (defaults to the project\*(Aqs default agent) diff --git a/man/am-run.1 b/man/am-run.1 new file mode 100644 index 0000000..b75e379 --- /dev/null +++ b/man/am-run.1 @@ -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 diff --git a/man/am-search.1 b/man/am-search.1 new file mode 100644 index 0000000..713f273 --- /dev/null +++ b/man/am-search.1 @@ -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\fR +Restrict to this category +.TP +\fB\-\-tag\fR \fI\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) diff --git a/man/am-secret.1 b/man/am-secret.1 new file mode 100644 index 0000000..2eed080 --- /dev/null +++ b/man/am-secret.1 @@ -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) diff --git a/man/am-self-uninstall.1 b/man/am-self-uninstall.1 new file mode 100644 index 0000000..1fdaa17 --- /dev/null +++ b/man/am-self-uninstall.1 @@ -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) diff --git a/man/am-self-update.1 b/man/am-self-update.1 new file mode 100644 index 0000000..249e983 --- /dev/null +++ b/man/am-self-update.1 @@ -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\fR +Download the new binary to this path instead of replacing the current one +.TP +\fB\-h\fR, \fB\-\-help\fR +Print help diff --git a/man/am-sessions.1 b/man/am-sessions.1 new file mode 100644 index 0000000..1baeb1f --- /dev/null +++ b/man/am-sessions.1 @@ -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\fR +Only sessions of this project +.TP +\fB\-\-status\fR \fI\fR +Only sessions with this status (running, stopped, failed, interrupted) +.TP +\fB\-\-show\fR \fI\fR +Show one session in detail (summary + log excerpt) +.TP +\fB\-\-resume\fR \fI\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 diff --git a/man/am-start.1 b/man/am-start.1 new file mode 100644 index 0000000..c414011 --- /dev/null +++ b/man/am-start.1 @@ -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...\fR] +Extra arguments passed to the agent (repeatable; quoted strings are split on spaces) +.TP +\fB\-\-env\fR \fI\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\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: (defaults to the project\*(Aqs default agent) diff --git a/man/am-stats.1 b/man/am-stats.1 new file mode 100644 index 0000000..44d1dfc --- /dev/null +++ b/man/am-stats.1 @@ -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\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) diff --git a/man/am-status.1 b/man/am-status.1 new file mode 100644 index 0000000..bb29a66 --- /dev/null +++ b/man/am-status.1 @@ -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) diff --git a/man/am-stop.1 b/man/am-stop.1 new file mode 100644 index 0000000..d05459e --- /dev/null +++ b/man/am-stop.1 @@ -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\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: diff --git a/man/am-tag.1 b/man/am-tag.1 new file mode 100644 index 0000000..59c7dd9 --- /dev/null +++ b/man/am-tag.1 @@ -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 diff --git a/man/am-tags.1 b/man/am-tags.1 new file mode 100644 index 0000000..8395fe6 --- /dev/null +++ b/man/am-tags.1 @@ -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 diff --git a/man/am-timeline.1 b/man/am-timeline.1 new file mode 100644 index 0000000..c789ca5 --- /dev/null +++ b/man/am-timeline.1 @@ -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\fR +Only activity of this project +.TP +\fB\-\-since\fR \fI\fR +Only activity at or after this date (YYYY\-MM\-DD or RFC 3339) +.TP +\fB\-\-limit\fR \fI\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 diff --git a/man/am-top.1 b/man/am-top.1 new file mode 100644 index 0000000..22b93d2 --- /dev/null +++ b/man/am-top.1 @@ -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\fR +Only events of the last period (7d, 30d, 90d, all) +.TP +\fB\-h\fR, \fB\-\-help\fR +Print help diff --git a/man/am-unfavorite.1 b/man/am-unfavorite.1 new file mode 100644 index 0000000..d85b992 --- /dev/null +++ b/man/am-unfavorite.1 @@ -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 diff --git a/man/am-uninstall.1 b/man/am-uninstall.1 new file mode 100644 index 0000000..d0282be --- /dev/null +++ b/man/am-uninstall.1 @@ -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 diff --git a/man/am-untag.1 b/man/am-untag.1 new file mode 100644 index 0000000..3a9e3ed --- /dev/null +++ b/man/am-untag.1 @@ -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 diff --git a/man/am-update.1 b/man/am-update.1 new file mode 100644 index 0000000..513270b --- /dev/null +++ b/man/am-update.1 @@ -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) diff --git a/man/am-version.1 b/man/am-version.1 new file mode 100644 index 0000000..e0948df --- /dev/null +++ b/man/am-version.1 @@ -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 diff --git a/man/am-watch.1 b/man/am-watch.1 new file mode 100644 index 0000000..e996ef2 --- /dev/null +++ b/man/am-watch.1 @@ -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\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 diff --git a/man/am.1 b/man/am.1 new file mode 100644 index 0000000..77a3a03 --- /dev/null +++ b/man/am.1 @@ -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\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\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 \*(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 diff --git a/packaging/deb/make-deb.sh b/packaging/deb/make-deb.sh new file mode 100644 index 0000000..6323086 --- /dev/null +++ b/packaging/deb/make-deb.sh @@ -0,0 +1,33 @@ +#!/bin/sh +# Builds an am__amd64.deb from dist/am-linux-x86_64. +# Usage: packaging/deb/make-deb.sh [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" < +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" < 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 diff --git a/packaging/scoop/am.json b/packaging/scoop/am.json new file mode 100644 index 0000000..b0e2c11 --- /dev/null +++ b/packaging/scoop/am.json @@ -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" + } + } + } +} diff --git a/packaging/winget/agent-manager.installer.yaml b/packaging/winget/agent-manager.installer.yaml new file mode 100644 index 0000000..c0a2255 --- /dev/null +++ b/packaging/winget/agent-manager.installer.yaml @@ -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 diff --git a/packaging/winget/agent-manager.locale.en-US.yaml b/packaging/winget/agent-manager.locale.en-US.yaml new file mode 100644 index 0000000..90b7d39 --- /dev/null +++ b/packaging/winget/agent-manager.locale.en-US.yaml @@ -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 diff --git a/packaging/winget/agent-manager.yaml b/packaging/winget/agent-manager.yaml new file mode 100644 index 0000000..694ea4d --- /dev/null +++ b/packaging/winget/agent-manager.yaml @@ -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 diff --git a/scripts/build-release.ps1 b/scripts/build-release.ps1 new file mode 100644 index 0000000..06fa0ed --- /dev/null +++ b/scripts/build-release.ps1 @@ -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) +} diff --git a/scripts/render-manifests.ps1 b/scripts/render-manifests.ps1 new file mode 100644 index 0000000..1ad9334 --- /dev/null +++ b/scripts/render-manifests.ps1 @@ -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" diff --git a/src/cli.rs b/src/cli.rs index 1059411..e9afd0f 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -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 ' 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, + }, + /// 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, + }, + /// 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, + }, + /// 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, + /// Write the page(s) to this directory instead of stdout + #[arg(long, value_name = "DIR")] + output: Option, + }, + /// 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, /// Restrict to this category #[arg(long, value_name = "CATEGORY")] category: Option, + /// Only agents carrying this personal tag + #[arg(long, value_name = "TAG")] + tag: Option, }, /// 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, +} + +/// 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. diff --git a/src/commands/agents_cmd.rs b/src/commands/agents_cmd.rs new file mode 100644 index 0000000..bdd1e4c --- /dev/null +++ b/src/commands/agents_cmd.rs @@ -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 { + let mut names: Vec = 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 { + for n in agent_names(app, installed) { + println!("{n}"); + } + Ok(0) +} diff --git a/src/commands/annotations_cmd.rs b/src/commands/annotations_cmd.rs new file mode 100644 index 0000000..223359a --- /dev/null +++ b/src/commands/annotations_cmd.rs @@ -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, + tags: Vec, +} + +/// 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 { + 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 { + 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 { + 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 {} ' 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 { + if words.is_empty() { + bail!("usage: am 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 { + 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 { + 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> = 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 = 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 ' 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 { + 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 { + 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() +} + diff --git a/src/commands/completion_cmd.rs b/src/commands/completion_cmd.rs index d634de9..1d4fa5e 100644 --- a/src/commands/completion_cmd.rs +++ b/src/commands/completion_cmd.rs @@ -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 { +pub fn run(shell: Shell, installed: bool) -> Result { let mut cmd = Cli::command(); - generate(shell, &mut cmd, "am", &mut std::io::stdout()); + let mut buf: Vec = 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 = 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 ")); + } +} diff --git a/src/commands/dashboard_cmd.rs b/src/commands/dashboard_cmd.rs new file mode 100644 index 0000000..1a03cf2 --- /dev/null +++ b/src/commands/dashboard_cmd.rs @@ -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 { + 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 { + 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 = 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 = 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 = 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 = 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> = 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 = 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 { + 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) +} diff --git a/src/commands/export_import.rs b/src/commands/export_import.rs index 3395c41..7fcdd6b 100644 --- a/src/commands/export_import.rs +++ b/src/commands/export_import.rs @@ -78,6 +78,7 @@ pub fn import_cmd(app: &App, file: &Path) -> Result { 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()))?; diff --git a/src/commands/info_cmd.rs b/src/commands/info_cmd.rs index f604729..a70c02a 100644 --- a/src/commands/info_cmd.rs +++ b/src/commands/info_cmd.rs @@ -20,6 +20,12 @@ struct InfoJson { pid: Option, installable: bool, note: Option, + /// Personal note (issue #39). + personal_note: Option, + /// Personal tags (issue #39). + personal_tags: Vec, + /// Favorite (issue #39). + favorite: bool, platforms: Vec, run: Option, args: Vec, @@ -83,6 +89,9 @@ pub fn run(app: &App, name: &str) -> Result { 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 { 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::>() + .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 { + app.state.annotation(name).ok().and_then(|a| a.note) +} +fn annotations_tags(app: &App, name: &str) -> Vec { + 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 { let first = agent.first_token()?; which::which(first).ok() diff --git a/src/commands/list_cmd.rs b/src/commands/list_cmd.rs index 240594e..ab06661 100644 --- a/src/commands/list_cmd.rs +++ b/src/commands/list_cmd.rs @@ -22,6 +22,8 @@ struct AgentRow { pid: Option, installable: bool, note: Option, + /// 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), } } diff --git a/src/commands/man_cmd.rs b/src/commands/man_cmd.rs new file mode 100644 index 0000000..887909d --- /dev/null +++ b/src/commands/man_cmd.rs @@ -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 ' prints one +//! page; '--output DIR' writes am.1 plus one am-.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 { + 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(()) +} diff --git a/src/commands/mod.rs b/src/commands/mod.rs index bb8ce74..e8cc59a 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -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 { 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 { } => 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 { 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), diff --git a/src/commands/profile_cmd.rs b/src/commands/profile_cmd.rs new file mode 100644 index 0000000..4086c67 --- /dev/null +++ b/src/commands/profile_cmd.rs @@ -0,0 +1,214 @@ +//! profile: environment profiles (issue #40) — a named set of +//! agent + env + args, defined in the config, applied with +//! 'am start --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, + env: BTreeMap, + args: Vec, +} + +pub fn run(app: &App, cmd: &ProfileCmd) -> Result { + match cmd { + ProfileCmd::List => run_list(app), + ProfileCmd::Show { name } => run_show(app, name), + } +} + +pub fn run_list(app: &App) -> Result { + 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 = 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::>() + .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 { + 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::>().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, +) -> Result<(Vec, BTreeMap)> { + 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> { + 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()); + } +} diff --git a/src/commands/run_cmd.rs b/src/commands/run_cmd.rs index ac01fe9..231d3c8 100644 --- a/src/commands/run_cmd.rs +++ b/src/commands/run_cmd.rs @@ -28,12 +28,47 @@ pub fn start(app: &App, opts: &StartArgs) -> Result { 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, +) -> Result<(Vec, BTreeMap)> { + 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 { 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) -> Result { 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) - 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) - } 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) } diff --git a/src/commands/search_cmd.rs b/src/commands/search_cmd.rs index de01a96..6c8bf36 100644 --- a/src/commands/search_cmd.rs +++ b/src/commands/search_cmd.rs @@ -13,31 +13,73 @@ struct SearchRow { description: Option, website: Option, tags: Vec, + /// Personal tags (issue #39). + personal_tags: Vec, + favorite: bool, } -pub fn run(app: &App, keyword: &str, category: Option<&str>) -> Result { - let hits = app.catalog.search(keyword, category); +pub fn run(app: &App, keyword: Option<&str>, category: Option<&str>, tag: Option<&str>) -> Result { + 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 = hits .iter() - .map(|a| SearchRow { - name: a.name.clone(), - display_name: a.title().to_string(), - category: a.category.clone(), - installable: a.installable, - description: a.description.clone(), - website: a.website.clone(), - tags: a.tags.clone(), + .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(), + installable: a.installable, + 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 { 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 diff --git a/src/commands/self_update.rs b/src/commands/self_update.rs index a2cd43b..dca6279 100644 --- a/src/commands/self_update.rs +++ b/src/commands/self_update.rs @@ -13,7 +13,10 @@ pub fn run(app: &App, check: bool, to: Option<&Path>) -> Result { ); }; 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 { diff --git a/src/commands/status_cmd.rs b/src/commands/status_cmd.rs index 63ce858..3940ccb 100644 --- a/src/commands/status_cmd.rs +++ b/src/commands/status_cmd.rs @@ -40,7 +40,13 @@ fn status_one(app: &App, name: &str, probe: &ExternalInfo) -> Result { } 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 { 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()), diff --git a/src/config.rs b/src/config.rs index 0a086b8..f4e0a2c 100644 --- a/src/config.rs +++ b/src/config.rs @@ -38,6 +38,27 @@ pub struct Config { /// Per-project profiles: root, default agent, env and hooks. #[serde(default)] pub projects: BTreeMap, + /// Environment profiles: a reusable set of agent + env + args + /// (issue #40) - 'am start --profile dev'. + #[serde(default)] + pub profiles: BTreeMap, +} + +/// 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, + /// Environment variables injected when launching with this profile. + #[serde(default)] + pub env: BTreeMap, + /// Extra arguments appended to the run command. + #[serde(default)] + pub args: Vec, } 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, + /// 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, /// 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>, + /// Default environment profile applied when launching the default + /// agent (issue #40). + #[serde(default)] + pub profile: Option, } 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. diff --git a/src/dashboard.rs b/src/dashboard.rs new file mode 100644 index 0000000..961162c --- /dev/null +++ b/src/dashboard.rs @@ -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, + pub pid: Option, + pub uptime_s: Option, + pub favorite: bool, +} + +#[derive(Debug, Clone, Serialize)] +pub struct ActivityRow { + pub ts: String, + pub kind: String, + pub agent: Option, + 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, +} + +#[derive(Debug, Clone, Serialize)] +pub struct SessionRow { + pub id: String, + pub kind: String, + pub agent: Option, + pub project: Option, + pub started_at: String, + pub status: String, + pub duration_s: Option, +} + +#[derive(Debug, Clone, Default, Serialize)] +pub struct DashCounts { + pub installed: usize, + pub running: usize, + pub sessions_count: u64, + pub last_used: Option, +} + +#[derive(Debug, Clone, Default, Serialize)] +pub struct DashData { + pub counts: DashCounts, + pub overview: Vec, + pub activity: Vec, + pub stats: Vec, + pub sessions: Vec, + pub projects: Vec, +} + +/// Read uptime from a running entry. +pub fn uptime_s(entry: &crate::state::InstalledEntry) -> Option { + 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 = 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 = 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 = 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 = 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); + } +} diff --git a/src/download.rs b/src/download.rs index 1b3e909..c28fdc3 100644 --- a/src/download.rs +++ b/src/download.rs @@ -150,19 +150,28 @@ fn github_auth_header() -> Option { } pub fn latest_release(repo: &str) -> Result { - 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 { + 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 { - let url = format!("https://api.github.com/repos/{repo}/releases/latest"); +fn latest_release_api(repo: &str, api_base: Option<&str>) -> Result { + 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); diff --git a/src/events.rs b/src/events.rs index 9d27ffc..759cf6f 100644 --- a/src/events.rs +++ b/src/events.rs @@ -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", } } } diff --git a/src/help.rs b/src/help.rs index af8da92..a80f382 100644 --- a/src/help.rs +++ b/src/help.rs @@ -429,10 +429,11 @@ pub static HELP_SPECS: &[HelpSpec] = &[ name: "search", category: "Commands", usage: "search {flags} ", - 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} ", - 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} ", - 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", 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} ", + 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} ", + 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} [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} ...", + 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} ", + 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} [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-.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", diff --git a/src/lib.rs b/src/lib.rs index 0a911b4..1b93b25 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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)] diff --git a/src/repl.rs b/src/repl.rs index 1f39604..2db525a 100644 --- a/src/repl.rs +++ b/src/repl.rs @@ -46,8 +46,12 @@ pub struct AmCompleter { gateway_shells: Vec<&'static str>, options: Vec<&'static str>, agents: Vec, + /// Whole catalog (install/info/search only). + catalog_agents: Vec, aliases: Vec, groups: Vec, + /// 'profile' subcommands. + profile_sub: Vec<&'static str>, /// Short descriptions shown next to candidates in the Tab menu /// (Nushell-style). descriptions: BTreeMap, @@ -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 = 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, groups: &BTreeMap>, + installed: Option<&std::collections::BTreeSet>, ) -> Self { let mut agents: Vec = 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 = catalog + .agents() + .iter() + .filter(|a| !a.hidden) + .map(|a| a.name.clone()) + .collect(); let mut alias_list: Vec = aliases.keys().cloned().collect(); alias_list.sort(); let mut group_list: Vec = 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 {}", + 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(" "), - category: None, - }, + "search" => { + let words: Vec = 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 { diff --git a/src/state.rs b/src/state.rs index 1c102c0..f199ab0 100644 --- a/src/state.rs +++ b/src/state.rs @@ -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, + /// Personal annotations per agent: favorite, note, tags (issue #39). + #[serde(default)] + pub annotations: BTreeMap, +} + +/// 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, + /// Personal tags, filterable with 'am search --tag'. + #[serde(default)] + pub tags: Vec, } 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> { + Ok(self.load()?.annotations) + } + + /// The annotation block of one agent (defaults to empty). + pub fn annotation(&self, name: &str) -> Result { + 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 { + 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] diff --git a/tests/annotations_test.rs b/tests/annotations_test.rs new file mode 100644 index 0000000..c3e1ab3 --- /dev/null +++ b/tests/annotations_test.rs @@ -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}"); +} diff --git a/tests/completion_man_test.rs b/tests/completion_man_test.rs new file mode 100644 index 0000000..b801290 --- /dev/null +++ b/tests/completion_man_test.rs @@ -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 = 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:?}"), + } +} diff --git a/tests/dashboard_test.rs b/tests/dashboard_test.rs new file mode 100644 index 0000000..570fcf4 --- /dev/null +++ b/tests/dashboard_test.rs @@ -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) { + 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"); +} diff --git a/tests/profiles_test.rs b/tests/profiles_test.rs new file mode 100644 index 0000000..20cd954 --- /dev/null +++ b/tests/profiles_test.rs @@ -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:?}"), + } +}