Skip to content

feat(cli): add ao project ls/get/rm (#90)#91

Merged
harshitsinghbhandari merged 5 commits into
mainfrom
feat/issue-90-project-cli
Jun 2, 2026
Merged

feat(cli): add ao project ls/get/rm (#90)#91
harshitsinghbhandari merged 5 commits into
mainfrom
feat/issue-90-project-cli

Conversation

@harshitsinghbhandari
Copy link
Copy Markdown
Collaborator

Closes #90.

Summary

  • Added ao project ls / ao project list with table output, deterministic ID sorting, degraded status display, empty-state hint, and --json.
  • Added ao project get <id> with human-readable details and --json.
  • Added ao project rm <id> with exact-ID confirmation, --yes/-y, --json, and support for both the documented {ok,id} and current backend remove envelopes.
  • Extended the shared CLI daemon client with GET and DELETE helpers.
  • Recreated .github/agent-ci.Dockerfile with gcc/g++ installed for Go -race runs.

Intentionally skipped

  • ao project set-default from the TypeScript CLI, because the Go rewrite has no default-project domain concept yet.

Validation

  • cd backend && go vet ./... && go build ./...
  • cd backend && PATH=/usr/bin:/bin:/usr/sbin:/sbin /opt/homebrew/bin/go test -race ./...
  • npx @redwoodjs/agent-ci run --all could not run locally because /var/run/docker.sock is unavailable in this session.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds missing ao project read/delete commands to the Go CLI, aligning it with the daemon’s existing projects API and improving the shared CLI↔daemon client to support additional HTTP verbs.

Changes:

  • Added ao project ls|list, ao project get <id>, and ao project rm <id> with human-readable output and --json support.
  • Extended the CLI daemon client with getJSON and deleteJSON helpers via a generalized doJSON request path.
  • Added unit tests covering project list/get/remove behaviors (table output, sorting, degraded display, confirmation flow, and error envelopes).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
backend/internal/cli/project.go Implements project ls/get/rm, output formatting, and confirmation prompt logic.
backend/internal/cli/project_test.go Adds HTTP-stubbed CLI tests for the new project commands.
backend/internal/cli/client.go Generalizes daemon JSON calls and adds GET/DELETE helpers for new CLI commands.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread backend/internal/cli/client.go
Comment thread backend/internal/cli/project.go
Comment thread backend/internal/cli/project.go
Comment thread backend/internal/cli/project.go Outdated
@harshitsinghbhandari harshitsinghbhandari merged commit ae9fa0e into main Jun 2, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port missing CLI commands from original AO (read + lifecycle surface)

2 participants