The mycli API server provides REST endpoints for authentication, command management, library browsing, and catalog syncing.
| Method | Path | Description |
|---|
POST | /v1/auth/device/start | Start device auth flow |
POST | /v1/auth/device/token | Poll for device token |
POST | /v1/auth/device/resend | Resend OTP |
POST | /v1/auth/verify-code | Verify OTP code |
POST | /v1/auth/refresh | Refresh access token |
GET | /v1/auth/verify | Verify magic link |
POST | /v1/auth/web/login | Start web auth flow |
POST | /v1/auth/web/verify | Verify web auth |
GET | /v1/usernames/{username}/available | Check username availability |
GET | /device | Device verification page |
POST | /device | Device verification submit |
GET | /health | Health check |
| Method | Path | Description |
|---|
GET | /v1/libraries | Search libraries |
GET | /v1/libraries/{owner}/{slug} | Library detail |
GET | /v1/libraries/{owner}/{slug}/releases | List releases |
GET | /v1/libraries/{owner}/{slug}/releases/{version} | Get a release |
GET | /v1/libraries/{owner}/{slug}/commands/{commandSlug} | Get a command |
GET | /v1/libraries/{owner}/{slug}/commands/{commandSlug}/versions | List command versions |
All authenticated endpoints require a valid JWT in the Authorization: Bearer <token> header.
| Method | Path | Description |
|---|
GET | /v1/me | Current user info |
PATCH | /v1/me/username | Set username |
GET | /v1/sessions | List sessions |
DELETE | /v1/sessions/{id} | Revoke a session |
DELETE | /v1/sessions | Revoke all sessions |
| Method | Path | Description |
|---|
GET | /v1/me/sync-summary | Sync summary |
POST | /v1/commands | Create a command |
GET | /v1/commands | List commands |
GET | /v1/commands/{id} | Get a command |
DELETE | /v1/commands/{id} | Delete a command (soft delete) |
POST | /v1/commands/{id}/versions | Publish a version |
GET | /v1/commands/{id}/versions/{version} | Get a specific version |
GET | /v1/catalog | Get synced catalog (supports ETag / If-None-Match) |
POST | /v1/libraries/{slug}/releases | Create a release |
POST | /v1/libraries/{owner}/{slug}/install | Install a library |
DELETE | /v1/libraries/{owner}/{slug}/install | Uninstall a library |
All entity IDs use prefixed UUIDs:
| Prefix | Entity |
|---|
usr_ | User |
cmd_ | Command |
cv_ | Command version |
ml_ | Mailing list |
lib_ | Library |