Skip to content

Use rtree api-key and canonical API-key routes - #105

Merged
rmorehig merged 1 commit into
mainfrom
rafa/api-key-command
Nov 17, 2026
Merged

rmorehig merged 1 commit into
mainfrom
rafa/api-key-command

Conversation

@rmorehig

@rmorehig rmorehig commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Rename rtree key to rtree api-key for list, create, and delete. API-key management and login validation use /v1/api-keys. Deletion accepts a UUID parsed by Clap before authentication or HTTP requests, and JSON output returns id instead of id_or_token. The old command name and token deletion have no compatibility aliases.

This follows the merged platform change https://github.com/rawtreedb/rawtree-platform/pull/2021. Publish the CLI only after the backend serving it supports the canonical routes. The README, CLI help, request-contract tests, login tests, and live Platform test use the new contract.

Validation: cargo fmt --all -- --check and cargo test --locked passed (304 tests; 11 live Platform tests ignored locally). A deliberate UUID-validation bypass caused the rejection test to fail; it passes after restoration. Quality, simplification, and independent review through P3 found no new issues. The live Compose suite will run in CI.

An additional strict Clippy check reports existing warnings in unchanged tests/storage_contracts.rs, src/client/routing_tests.rs, src/commands/insert.rs, and src/commands/query.rs; those files match main.


Note

Medium Risk
Breaking CLI/API contract: old commands and token-based delete no longer work, and the CLI must ship with a backend that serves /v1/api-keys.

Overview
Renames the CLI surface from rtree key to rtree api-key and drops aliases for key, keys, and api-keys. List, create, delete, and API-key login validation now call /v1/api-keys instead of /v1/keys.

api-key delete takes a UUID only (uuid is a runtime dependency); Clap rejects tokens and malformed IDs before auth or HTTP. Delete JSON returns id rather than id_or_token, and the README documents the new contract. Tests and live Platform coverage were updated to match.

Reviewed by Cursor Bugbot for commit 7827508. Bugbot is set up for automated code reviews on this repo. Configure here.

The companion docs and dashboard prompt update is https://github.com/rawtreedb/rawtree-platform/pull/2107; deploy it after publishing this CLI.

@rmorehig
rmorehig merged commit e3ea0c1 into main Nov 17, 2026
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