Skip to content

feat: add Project management commands (list, duplicate, delete)#172

Open
milesapnash wants to merge 1 commit into
mainfrom
feat/project-mgmt
Open

feat: add Project management commands (list, duplicate, delete)#172
milesapnash wants to merge 1 commit into
mainfrom
feat/project-mgmt

Conversation

@milesapnash
Copy link
Copy Markdown
Contributor

Summary

Add poly project list, poly project delete, and poly project duplicate commands using the public Agents API endpoints.

Motivation

The ADK only supported poly project create. Users had no way to list, delete, or duplicate projects from the CLI.

Changes

  • Add list_agents, get_agents, delete_project, duplicate_project to PlatformAPIHandler and AgentStudioInterface, hitting the public /v1/agents/ endpoints
  • Handle HTTP 204 No Content in make_request (required by the DELETE endpoint)
  • Add poly project list — displays agents in a table with ID, name, last updated, and branch count
  • Add poly project delete — with --force flag and interactive confirmation (auto_enter=False)
  • Add poly project duplicate — prompts for new name and optional ID
  • All three commands support --json mode and interactive region/account/agent selection
  • Use the public list-agents endpoint for agent selection so that slug-form agentId values are passed to the public API (the internal /adk/v1/ endpoint returns PROJECT-xxx IDs which the public endpoints don't accept)
  • Add print_agents table helper in console.py
  • Add 10 tests across DeleteProjectTest and DuplicateProjectTest

Test strategy

  • Added/updated unit tests
  • Manual CLI testing (poly project list, poly project delete, poly project duplicate)
  • Tested against a live Agent Studio project
  • N/A (docs, config, or trivial change)

Checklist

  • ruff check . and ruff format --check . pass
  • pytest passes (672 tests)
  • No breaking changes to the poly CLI interface (or migration path documented)
  • Commit messages follow conventional commits

@milesapnash milesapnash requested review from a team and Ruari-Phipps June 3, 2026 14:28
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

Coverage Report

Base (main) PR Change
69.6% 68.7% -1.0% ⚠️

Changed file coverage

File Coverage Change
poly/output/console.py 23.8% -0.4% ⚠️
poly/handlers/platform_api.py 32.4% +0.1% ✅
poly/handlers/interface.py 43.4% +1.6% ✅
poly/cli.py 51.0% -2.0% ⚠️

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.

1 participant