Add local collections support with GUI, CLI, and publishing workflow

Features:
- Local collection definitions stored in ~/.cmdforge/collections/
- CLI commands: create, show, add, remove, delete, publish, status
- GUI Collections page with local and registry tabs
- Collection publishing with tool resolution and visibility checks
- New API endpoints: GET /api/v1/me, GET /api/v1/tools/.../approved,
  POST /api/v1/collections
- RegistryClient methods: get_me(), has_approved_public_tool(),
  publish_collection()

Implementation:
- collection.py: Collection dataclass, resolve_tool_references(),
  classify_tool_reference(), ToolResolutionResult
- collections_page.py: GUI with background workers for install/publish
- collections_commands.py: Full CLI command implementations
- registry/app.py: New authenticated endpoints with validation

Tests:
- test_collection.py: 27 unit tests for collection module
- test_collection_api.py: 20 tests (8 client, 12 API with Flask skip)

Documentation updated: README, CHANGELOG, CLAUDE.md, tests/README

Co-Authored-By: Claude Opus 4.5 <[email protected]>
This commit is contained in:
rob
2026-01-26 16:50:19 -04:00
co-authored by Claude Opus 4.5
parent 37e74bf339
commit 29869ef59f
14 changed files with 2917 additions and 27 deletions
+85 -6
View File
@@ -146,9 +146,17 @@ cmdforge registry status # Check moderation status
cmdforge registry my-tools # List your published tools
# Collections (curated tool bundles)
cmdforge collections list # List available collections
cmdforge collections list # List registry collections
cmdforge collections list --local # List your local collections
cmdforge collections info starter # View collection details
cmdforge collections install starter # Install all tools in a collection
cmdforge collections create my-tools # Create local collection
cmdforge collections show my-tools # View local collection
cmdforge collections add my-tools summarize # Add tool to collection
cmdforge collections remove my-tools summarize # Remove tool
cmdforge collections delete my-tools # Delete local collection
cmdforge collections publish my-tools # Publish to registry
cmdforge collections status my-tools # Check tool statuses
# Project Dependencies
cmdforge init # Create cmdforge.yaml manifest
@@ -444,10 +452,14 @@ This ensures all required tools are available before running your project's scri
## Collections
Collections are curated bundles of related tools. Install an entire workflow with one command:
Collections are curated bundles of related tools. Install an entire workflow with one command.
### Registry Collections
Browse and install collections from the CmdForge registry:
```bash
# List available collections
# List available collections from registry
cmdforge collections list
# View what's in a collection
@@ -461,7 +473,59 @@ cmdforge collections info starter
cmdforge collections install starter
```
### Available Collections
### Local Collections
Create and manage your own collections locally:
```bash
# List your local collections
cmdforge collections list --local
# Create a new local collection
cmdforge collections create my-toolkit
# View collection details
cmdforge collections show my-toolkit
# Add tools to the collection
cmdforge collections add my-toolkit summarize
cmdforge collections add my-toolkit official/translate
# Remove tools from the collection
cmdforge collections remove my-toolkit summarize
# Delete a collection
cmdforge collections delete my-toolkit
```
### Publishing Collections
Share your collections with the community:
```bash
# Check collection status before publishing
cmdforge collections status my-toolkit
# Shows: tool visibility, approval status, any issues
# Publish to registry (requires account)
cmdforge collections publish my-toolkit
# Dry run to see what would be published
cmdforge collections publish my-toolkit --dry-run
# Force publish even with warnings
cmdforge collections publish my-toolkit --force
# Continue publishing after fixing issues
cmdforge collections publish my-toolkit --continue
```
**Publishing requirements:**
- All tools must be public (not private visibility)
- All tools must have an approved version in the registry
- Local tools will be prefixed with your username (e.g., `summarize` → `yourname/summarize`)
### Available Registry Collections
| Collection | Description | Tools |
|------------|-------------|-------|
@@ -567,6 +631,20 @@ The graphical interface provides a modern desktop experience:
- Create new tools with the built-in Tool Builder
- Connect to the registry to publish your tools
### Collections Page
- **Local Collections**: Create and manage your own tool bundles
- Create new collections with display name and description
- Add/remove tools from collections
- View collection details and tool lists
- **Registry Collections**: Browse collections from the registry
- Search and filter available collections
- View collection contents before installing
- One-click install for all tools in a collection
- **Publish Collections**: Share your collections with the community
- Automatic tool resolution (local names → registry references)
- Visibility and approval status checks
- Options to publish tools first, skip unpublished, or cancel
### Tool Builder
- Visual form for creating and editing tools
- Add arguments with flags and default values
@@ -609,8 +687,9 @@ The graphical interface provides a modern desktop experience:
| `Ctrl+R` | Refresh current page |
| `Ctrl+1` | Go to My Tools |
| `Ctrl+2` | Go to Registry |
| `Ctrl+3` | Go to Providers |
| `Ctrl+4` | Go to Profiles |
| `Ctrl+3` | Go to Collections |
| `Ctrl+4` | Go to Providers |
| `Ctrl+5` | Go to Profiles |
| `Escape` | Close tool builder |
| `Ctrl+Q` | Quit application |