@go-labs-sg/registration 1.0.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/README.md ADDED
@@ -0,0 +1,86 @@
1
+ # Registration CLI (`reg`)
2
+
3
+ Command-line access to Registration organizations, events, forms, and attendee registrations. Responses use deterministic JSON envelopes for scripts and agent tools.
4
+
5
+ ## Runtime and installation
6
+
7
+ The CLI requires [Bun](https://bun.com/docs/installation) 1.4.0 or newer. npm distributes the package, while the installed command runs under Bun.
8
+
9
+ Check whether a compatible Bun version is already available:
10
+
11
+ ```bash
12
+ bun --version
13
+ ```
14
+
15
+ If Bun is missing, install it for the current operating system:
16
+
17
+ **macOS (Homebrew)**
18
+
19
+ ```bash
20
+ brew install oven-sh/bun/bun
21
+ ```
22
+
23
+ **Windows (PowerShell)**
24
+
25
+ ```powershell
26
+ powershell -c "irm bun.sh/install.ps1|iex"
27
+ ```
28
+
29
+ **Linux**
30
+
31
+ ```bash
32
+ curl -fsSL https://bun.com/install | bash
33
+ ```
34
+
35
+ If Bun is installed but older than 1.4.0, run `bun upgrade`. Open a new terminal if the installer changes `PATH`, then verify `bun --version` again. Installation agents should skip the platform installer when Bun 1.4.0 or newer is already available.
36
+
37
+ Install and verify the CLI:
38
+
39
+ ```bash
40
+ bun add --global @go-labs-sg/registration
41
+ reg version
42
+ ```
43
+
44
+ ## Authentication
45
+
46
+ ```bash
47
+ reg auth login
48
+ reg auth status
49
+ reg auth whoami
50
+ ```
51
+
52
+ `reg auth login` opens Registration in the system browser. Sign in through the normal Google-backed web flow if needed, confirm that the code and device match your terminal, and click **Authorize CLI**. An existing browser session skips another Google login but never skips explicit authorization.
53
+
54
+ The CLI polls automatically and stores only Registration-issued credentials through `Bun.secrets`. It does not store Google credentials and has no API-key or environment-variable fallback. Use `reg auth logout` to revoke the remote session and remove its local credential. For SSH and containers, pass `--no-browser` and open the printed URL on another device.
55
+
56
+ The CLI uses `https://registration.getout.events` by default. Set `REG_API_URL` or pass `--api-url` for staging or local development. Overrides must use HTTPS, except `http://localhost` and `http://127.0.0.1`.
57
+
58
+ ## Commands
59
+
60
+ ```bash
61
+ reg organization list --input '{}'
62
+ reg event list --input '{"organizationId":"..."}'
63
+ reg form list --input '{"eventId":"..."}'
64
+ reg registration check-in --input '{"registrationId":"..."}'
65
+ reg email list --input '{"eventId":"...","page":1,"perPage":25}'
66
+ ```
67
+
68
+ Run `reg help` for every option. Lists support archived records where relevant. Registration lists also support pagination, form, text-search, and status filters.
69
+
70
+ ## Mutation safety
71
+
72
+ State-changing commands describe the exact target and require typing `CONFIRM` in an interactive terminal. Non-interactive automation must pass an explicit `--target` description and every applicable granular effect flag: `--allow-state-change`, `--allow-email`, `--allow-external-write`, `--allow-delete`, and/or `--allow-financial-write`.
73
+
74
+ Reads that expose attendee, team, email, or user records require `--ack-sensitive-data`. For mutations, `--target` must exactly match an affected identifier in the validated `--input '<json-object>'`. The API authorizes the browser-authenticated CLI user against the target organization and resource.
75
+
76
+ Email delivery and arbitrary attachment URLs remain browser-session-only. The CLI exposes authorized email reads, while sends stay in the web app because they create irreversible external communications. Public registration and payment callback flows are intentionally excluded.
77
+
78
+ ## Monorepo development
79
+
80
+ ```bash
81
+ bun --filter @go-labs-sg/registration typecheck
82
+ bun --filter @go-labs-sg/registration build
83
+ bun run golabs -- reg version
84
+ ```
85
+
86
+ Pushing a matching `registration-cli-v<version>` tag runs the release workflow, verifies the packed artifact under Bun 1.4, and publishes it to npm.