mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #89] [MERGED] feat(cli): add shell completion scaffolding #172
Labels
No labels
bug
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/AgentENV#172
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/AgentENV/pull/89
Author: @rbalachandar
Created: 7/30/2026
Status: ✅ Merged
Merged: 8/6/2026
Merged by: @LSX-s-Software
Base:
main← Head:cli/shell-completion📝 Commits (10+)
b4d6b81feat(cli): add shell completion scaffolding25562c4fix(cli): harden completion output and tests6a17694Update crates/aenv/src/commands/completion.rs81cb641test(cli): validate completion features via Cli metadatabe16e95test(cli): cover completion write branches and add error context55124bddocs(cli): document shell completionf8751d8docs(cli): correct shell-completion install pathsd13bc78feat(cli): install shell-completion loaders via the installers205223dUpdate .github/workflows/ci.yml08be532Update .github/workflows/ci.yml📊 Changes
8 files changed (+319 additions, -10 deletions)
View changed files
📝
Cargo.lock(+12 -2)📝
crates/aenv/Cargo.toml(+1 -0)➕
crates/aenv/src/commands/completion.rs(+229 -0)📝
crates/aenv/src/commands/mod.rs(+1 -0)📝
crates/aenv/src/commands/snapshot.rs(+1 -1)📝
crates/aenv/src/commands/template.rs(+2 -2)📝
crates/aenv/src/main.rs(+8 -5)📝
docs/src/getting-started/aenv-cli.md(+65 -0)📄 Description
Splits #37 into a static-first scaffolding change. This adds the
aenv completion <shell>command and the static completion surface; dynamic resource completion and automatic installer integration are deferred to follow-up work.What it does
aenv completion bash|zsh|fishemits a static completion script viaclap_complete. The command tree is rebuilt from theCliderive spec (crate::Cli::command()), so the generated script always reflects the real CLI. There is no separate completion definition to keep in sync.--output table|jsonenum, and local path arguments such as the Dockerfile passed toaenv build.fpathguidance and one-session activation commands.Behavior change worth calling out
The command aliases
cn,ls,rm,snap,templatesand thesnapshot/templatesubcommand aliases usevisible_alias.clap_completeemits only visible aliases, so this is required for alias completion to work. The visible side effect is that these aliases now also appear in--help. Runtime parsing is unchanged; the aliases were already accepted as input.Dependency
Adds
clap_complete = "4", matching the existingclap = "4"major.Testing
cargo test -p aenv --bin aenv commands::completion— 11 completion tests covering Bash, Zsh, Fish, aliases, the--outputenum, nested subcommands, and output/flush error handling.cargo fmt --all -- --checkpasses.cargo check -p aenv --bin aenvpasses.The workspace-wide
make fmt/make clippyalso build the server and storage crates, which require Linux and/dev/kvm, so only theaenv-scoped checks were run here. No integration tests apply to this CLI-only change.Out of scope
Dynamic resource completion (sandbox IDs filtered by command-applicable state, template/snapshot names, and the
aenv start --coldOCI-ref exception) and automatic completion installation/removal. The installer work will be handled separately using standard completion directories without modifying shell startup files.Refs #37 - static scaffolding portion; dynamic completion and installer integration remain separate follow-up work.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.