Skip to content

feat: add catalogs command for the public catalog-pages API - #238

Merged
jeff-schnitter merged 3 commits into
mainfrom
345-catalogs-command
Sep 29, 2026
Merged

jeff-schnitter merged 3 commits into
mainfrom
345-catalogs-command

Conversation

@jeff-schnitter

Copy link
Copy Markdown
Collaborator

Summary

Deliverable 3 of 3 for [CD-345]. Adds a catalogs sub-command that wraps the new public catalog-pages API in brain-backend (PRs cortexapps/brain-backend#17183 + #17185).

Command Verb / path
cortex catalogs list GET /api/v1/catalog-pages (auto-paginated; --page/--page-size, --table/--csv)
cortex catalogs get -s <slug> GET /api/v1/catalog-pages/{slug}
cortex catalogs create -f <file> POST /api/v1/catalog-pages — create or replace (upsert)
cortex catalogs delete -s <slug> DELETE /api/v1/catalog-pages/{slug}

Modeled on commands/scaffolders.py. create accepts a JSON or YAML definition and always sends it as JSON (the endpoint is JSON-only). Registered alphabetically after catalog in cli.py.

Naming

Named catalogs (the UI feature name), and it targets /api/v1/catalog-pages — distinct from the existing catalog command, which manages catalog entities at /api/v1/catalog. Same entity-vs-page split the backend makes.

Test plan

  • Added tests/test_catalogs.py (list + full CRUD round-trip, including upsert-replace and delete), following the test_scaffolders.py real-API + skip-guard pattern, plus data/import/catalogs/cli-test-catalog.json.
  • ⚠️ Not run in my dev sandbox — this environment has no network access to PyPI, so poetry install (and therefore pytest / poetry run cortex) can't run here. New files byte-compile (py_compile) and the fixture is valid JSON. Please let CI (test-pr.yml) exercise the suite against the test tenant, or I can run it once deps are available.

Depends on the backend endpoints from cortexapps/brain-backend#17183 and #17185 being deployed to the target tenant; until then the tests skip via the _api_enabled() guard.

🤖 Generated with Claude Code

jeff-schnitter and others added 3 commits August 28, 2026 17:27
Add a `catalogs` sub-command that wraps the new public catalog-pages API
(cortexapps/brain-backend CD-345):

- cortex catalogs list           GET    /api/v1/catalog-pages
- cortex catalogs get -s <slug>  GET    /api/v1/catalog-pages/{slug}
- cortex catalogs create -f <f>  POST   /api/v1/catalog-pages (create or replace)
- cortex catalogs delete -s <slug> DELETE /api/v1/catalog-pages/{slug}

Modeled on the scaffolders command. `create` accepts a JSON or YAML
definition and always sends it as JSON. Named `catalogs` (the UI feature
name); it targets `/api/v1/catalog-pages`, distinct from the existing
`catalog` command for catalog entities.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ndles

- backup export/import support for catalog pages (catalogs type)
- solutions install/uninstall support for catalogs/ resource directories
- catalog page bundles for ai-agents, ai-skills, and environments solutions
- test fixture and tests for catalogs CRUD
- README next-steps: catalog link is now first item for all three solutions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jeff-schnitter
jeff-schnitter marked this pull request as ready for review September 29, 2026 16:06
@jeff-schnitter
jeff-schnitter merged commit c3a3c29 into main Sep 29, 2026
7 of 8 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.

1 participant