petdex 1.0.1 → 1.1.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 ADDED
@@ -0,0 +1,78 @@
1
+ # petdex - Agent Guide
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.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ # One-shot via npx (-y skips npx's own install confirmation prompt)
9
+ npx -y petdex --help
10
+
11
+ # Or install globally
12
+ npm install -g petdex
13
+ ```
14
+
15
+ The published name is plain `petdex` (unscoped, no `@crafter/` prefix). Requires Node.js 20+ (also runs on Bun). Single bundled JS file, no native dependencies.
16
+
17
+ ## Commands
18
+
19
+ | Command | Description |
20
+ |---------|-------------|
21
+ | `petdex list` | List approved pets in the gallery |
22
+ | `petdex install <slug...>` | Install one or more pets into `~/.petdex/pets/<slug>/` and `~/.codex/pets/<slug>/` |
23
+ | `petdex login` | Sign in with Clerk OAuth + PKCE (opens browser, localhost callback; tokens in OS keychain) |
24
+ | `petdex logout` | Clear stored credentials |
25
+ | `petdex whoami` | Show signed-in user |
26
+ | `petdex submit <path> [--force]` | Submit a pet folder, zip, or parent folder of pets (bulk) |
27
+ | `petdex edit <slug>` | Edit a pet you own: `--desc "..."`, `--displayName "..."`, `--sprite <file>`, `--meta <pet.json>`, `--zip <file>` |
28
+ | `petdex telemetry [on\|off\|status]` | Manage anonymous usage telemetry |
29
+ | `petdex version` (or `--version`, `-v`) | Print the CLI version |
30
+
31
+ Internal commands (invoked by tooling, not by hand): `petdex bubble <pre|post|stop>` is the hot-path hook runner agents call on tool events, and `petdex mcp-server` is the MCP server subprocess for Antigravity. Both bypass help/telemetry output on purpose.
32
+
33
+ Removed in v1.0.0: `init`, `up`, `down`, `toggle`, `desktop`, `update`, `doctor`, `hooks`, and `install desktop`. Running them prints a pointer to the Petdex Desktop app, which now owns hooks, lifecycle, and updates. `select` is gone too (pick the active mascot in the desktop app's Settings).
34
+
35
+ ## Usage patterns
36
+
37
+ 1. Install pets:
38
+ ```bash
39
+ npx -y petdex install boba
40
+ npx -y petdex install boba doraemon mochi
41
+ ```
42
+ 2. Submit a pet (requires login, which opens a browser):
43
+ ```bash
44
+ petdex login
45
+ petdex submit ~/.petdex/pets/boba # single folder
46
+ petdex submit ~/.petdex/pets # bulk: every subfolder with pet.json
47
+ ```
48
+ 3. Fix metadata or the sprite of a pet you already submitted:
49
+ ```bash
50
+ petdex edit boba --desc "A tiny otter sipping bubble tea" --sprite ./new.webp
51
+ ```
52
+ 4. Check identity / sign out:
53
+ ```bash
54
+ petdex whoami
55
+ petdex logout
56
+ ```
57
+
58
+ ## Decision guide
59
+
60
+ | Task | Use |
61
+ |------|-----|
62
+ | Browse available pets | `petdex list` |
63
+ | Get a pet onto this machine | `petdex install <slug>` (deduped, multiple slugs OK) |
64
+ | Publish/share a pet | `petdex login`, then `petdex submit <path>` |
65
+ | Update a published pet's text or sprite | `petdex edit <slug> [flags]` |
66
+ | 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
+ | Choose the active mascot | Petdex Desktop Settings (hover the pet, Cmd+,) |
68
+ | Create a brand-new pet | Not this CLI: type `/pet` in the ChatGPT desktop app, then `petdex submit` the export |
69
+
70
+ ## Common mistakes
71
+
72
+ - Wrong: `npm install @crafter/petdex` or `npm install petdex-cli`. Correct: `npm install -g petdex` (the package is unscoped `petdex`).
73
+ - Wrong: treating the npx confirmation `Need to install the following packages: petdex@x` as a hang. Correct: use `npx -y petdex ...` in scripts and agent runs.
74
+ - 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
+ - Wrong: running on Node < 20 (npm engine error). Correct: upgrade Node (`nvm install 20`).
76
+ - 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`).
77
+ - 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
+ - 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 ADDED
@@ -0,0 +1,5 @@
1
+ # petdex
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.
4
+
5
+ See AGENTS.md for complete usage documentation for this package.