petdex 1.3.2 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # petdex - Agent Guide
2
2
 
3
- `petdex` is the catalog CLI for [Petdex](https://petdex.dev): browse, install, submit, and edit animated pixel-art pets (mascots) for coding agents, from the terminal. It installs pets into `~/.petdex/pets/` and `~/.codex/pets/`, and submits new pets to the gallery. The floating mascot itself ships as the separate **Petdex Desktop app** (petdex.dev/download), which installs agent hooks from its own Settings window and updates itself; this CLI is the catalog client. Reach for it when a user wants to install a pet, publish a pet they created, or edit one they own.
3
+ `petdex` is the catalog CLI for [Petdex](https://petdex.dev): browse, install, submit, edit, and organize animated pixel-art pets (mascots) for coding agents, from the terminal. It installs pets into `~/.petdex/pets/` and `~/.codex/pets/`, submits new pets to the gallery, and manages personal collections of approved pets. The floating mascot itself ships as the separate **Petdex Desktop app** (petdex.dev/download), which installs agent hooks from its own Settings window and updates itself; this CLI is the catalog client. Reach for it when a user wants to install a pet, publish a pet they created, edit one they own, or group their approved pets.
4
4
 
5
5
  ## Install
6
6
 
@@ -25,6 +25,10 @@ The published name is plain `petdex` (unscoped, no `@crafter/` prefix). Requires
25
25
  | `petdex whoami` | Show signed-in user |
26
26
  | `petdex submit <path> [--force]` | Submit a pet folder, zip, or parent folder of pets (bulk) |
27
27
  | `petdex edit <slug>` | Edit a pet you own: `--desc "..."`, `--displayName "..."`, `--sprite <file>`, `--meta <pet.json>`, `--zip <file>` |
28
+ | `petdex collection list` | List your collections (`--json` for machine output) |
29
+ | `petdex collection create` | Create a collection with `--title`, `--desc`, `--pets`, `--cover`, `--external-url`, or `--all-approved` |
30
+ | `petdex collection edit <id-or-slug>` | Partially update a personal collection; omitted fields are preserved |
31
+ | `petdex collection delete <id-or-slug> --yes` | Delete a personal collection after explicit confirmation |
28
32
  | `petdex telemetry [on\|off\|status]` | Manage anonymous usage telemetry |
29
33
  | `petdex version` (or `--version`, `-v`) | Print the CLI version |
30
34
 
@@ -49,7 +53,13 @@ Removed in v1.0.0: `init`, `up`, `down`, `toggle`, `desktop`, `update`, `doctor`
49
53
  ```bash
50
54
  petdex edit boba --desc "A tiny otter sipping bubble tea" --sprite ./new.webp
51
55
  ```
52
- 4. Check identity / sign out:
56
+ 4. Organize approved pets into a collection:
57
+ ```bash
58
+ petdex collection create --title "Desk crew" --pets boba,mochi --cover boba
59
+ petdex collection list # the new collection's slug is generated; copy it here
60
+ petdex collection edit <slug> --desc "Small companions for focused work"
61
+ ```
62
+ 5. Check identity / sign out:
53
63
  ```bash
54
64
  petdex whoami
55
65
  petdex logout
@@ -63,6 +73,7 @@ Removed in v1.0.0: `init`, `up`, `down`, `toggle`, `desktop`, `update`, `doctor`
63
73
  | Get a pet onto this machine | `petdex install <slug>` (deduped, multiple slugs OK) |
64
74
  | Publish/share a pet | `petdex login`, then `petdex submit <path>` |
65
75
  | Update a published pet's text or sprite | `petdex edit <slug> [flags]` |
76
+ | Group approved pets | `petdex collection create|edit|delete ...` |
66
77
  | Show/hide the mascot, wire agent hooks, diagnose | Not this CLI: use the Petdex Desktop app (petdex.dev/download); its Settings installs hooks per agent |
67
78
  | Choose the active mascot | Petdex Desktop Settings (hover the pet, Cmd+,) |
68
79
  | Create a brand-new pet | Not this CLI: type `/pet` in the ChatGPT desktop app, then `petdex submit` the export |
@@ -74,5 +85,6 @@ Removed in v1.0.0: `init`, `up`, `down`, `toggle`, `desktop`, `update`, `doctor`
74
85
  - Wrong: `petdex init` / `petdex doctor` / `petdex hooks install` / `petdex select` from pre-1.0 docs. Those commands were removed in v1.0.0; mascot lifecycle and hooks live in the Petdex Desktop app.
75
86
  - Wrong: running on Node < 20 (npm engine error). Correct: upgrade Node (`nvm install 20`).
76
87
  - Wrong: `petdex submit` in a headless/CI session without prior auth. `petdex login` needs a browser for the OAuth callback; sign in interactively first (tokens persist in the OS keychain, service `petdex-cli`).
88
+ - Collection commands require login and allow at most 10 personal collections per account. The 24-pet limit bounds growth rather than the stored row, so a collection created before it existed can still be renamed or shrunk, but not grown. Use comma-separated slugs with `--pets`; `--all-approved` on `create` fails when more than 24 pets are approved, and deletion requires `--yes`. `--cover` must name a member of the collection; pass `--cover ""` to clear the cover (an omitted `--cover` leaves it alone).
77
89
  - Wrong: submitting a folder without `pet.json` + `spritesheet.webp` (or `.png`) at its root, or a sprite that is not an 8x9 grid (1536x1872) or v2 8x11 grid (1536x2288, the ChatGPT export shape), or a clean scale of either. The register step rejects it (`invalid_spritesheet`).
78
90
  - Note: submissions are rate-limited to 10 per 24h per user. Slugs auto-deduplicate on collision (`boba` -> `boba-2`). Point at non-production deployments with `PETDEX_URL`, and `CLERK_ISSUER` + `CLERK_OAUTH_CLIENT_ID` together.
package/CLAUDE.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # petdex
2
2
 
3
- Catalog CLI for Petdex: browse, install, submit, and edit animated pixel-art mascots for coding agents (`npx -y petdex install <slug>`); the mascot itself runs in the Petdex Desktop app.
3
+ Catalog CLI for Petdex: browse, install, submit, edit, and organize animated pixel-art mascots for coding agents (`npx -y petdex install <slug>`); the mascot itself runs in the Petdex Desktop app.
4
4
 
5
5
  See AGENTS.md for complete usage documentation for this package.
package/README.md CHANGED
@@ -31,6 +31,8 @@ petdex submit ~/.petdex/pets/boba # share a single pet
31
31
  petdex submit ~/.petdex/pets # bulk submit every subfolder
32
32
  petdex whoami # confirm signed-in identity
33
33
  petdex logout # clear stored credentials
34
+ petdex collection list # list your collections
35
+ petdex collection create --title "My pets" --pets boba,mochi
34
36
  ```
35
37
 
36
38
  After installing a pet, pick the active mascot in Petdex Desktop: hover the pet and
@@ -53,9 +55,46 @@ The `init`, `up`, `down`, `toggle`, `desktop`, `update`, `doctor`, and `hooks` c
53
55
  | `petdex install <slug>` | Install a pet into `~/.petdex/pets/<slug>/` and `~/.codex/pets/<slug>/`. |
54
56
  | `petdex submit <path>` | Submit a pet folder, zip, or parent of pets (bulk). |
55
57
  | `petdex edit <slug>` | Edit a pet you own (`--desc`, `--displayName`, `--sprite`, `--meta`, `--zip`). |
58
+ | `petdex collection list` | List your collections (`--json` for machine output). |
59
+ | `petdex collection create` | Create a personal collection (`--title`, `--desc`, `--pets`, `--cover`, `--external-url`, `--all-approved`). |
60
+ | `petdex collection edit <id-or-slug>` | Partially update a personal collection. The reference can be the collection id or slug. |
61
+ | `petdex collection delete <id-or-slug>` | Delete a personal collection; requires `--yes`. |
56
62
  | `petdex telemetry [on\|off\|status]` | Manage anonymous usage telemetry. |
57
63
  | `petdex --version` | Print the CLI version. |
58
64
 
65
+ ## Collection management
66
+
67
+ Collections group approved pets on your profile. All collection commands
68
+ require `petdex login` first, and all support `--json` for machine-readable
69
+ output.
70
+
71
+ ```sh
72
+ petdex collection list --json
73
+ petdex collection create --title "My pets" --pets boba,mochi --cover boba
74
+ petdex collection list # copy the slug from here
75
+ petdex collection edit <slug> --desc "A small desk crew" --external-url https://example.com
76
+ petdex collection edit <slug> --all-approved
77
+ petdex collection delete <slug> --yes
78
+ ```
79
+
80
+ `collection edit` and `collection delete` take either the collection id or its
81
+ slug. New collections get a generated slug (`collection-<32 hex chars>`);
82
+ there is no flag to set one, so read it from `petdex collection list` first.
83
+
84
+ `--pets` takes a comma-separated list of pet slugs. `collection edit` accepts
85
+ any subset of the update flags, so omitted fields are preserved. `--all-approved`
86
+ selects every approved pet owned by you; on `create`, use it only when that set
87
+ has 24 or fewer pets. If you pass both `--all-approved` and `--pets`, `--all-approved`
88
+ wins and the explicit list is ignored. Each account can have up to 10 personal
89
+ collections, and `--cover` must name a pet in the collection — with an explicit
90
+ `--pets`, that means the cover has to appear in the list. Pass `--cover ""` to
91
+ clear the cover; with no `--pets` the collection keeps its members and shows
92
+ none as the cover. `--external-url`
93
+ accepts safe HTTPS links only. The 24-pet limit bounds growth: a collection that
94
+ already exceeds it — one created before the limit existed — can still be renamed
95
+ or shrunk, but not grown. An empty member list is refused, because it would
96
+ remove every member; delete the collection instead.
97
+
59
98
  ## How `submit` works
60
99
 
61
100
  The CLI accepts three input shapes: