@zoahhq/cli 0.1.6 → 0.1.8

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.
Files changed (3) hide show
  1. package/README.md +29 -1
  2. package/dist/cli.mjs +9775 -7916
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -41,8 +41,13 @@ Reads always check local first; falls back to global.
41
41
  zoah login # global default
42
42
  zoah login --local # project-specific override
43
43
  zoah login --base-url https://zoah.example.com
44
+ zoah login --organization acme # skip the organization list
44
45
  ```
45
46
 
47
+ After you sign in, the CLI asks which organization to work in. Your active organization in the web app is first and selected. Use the arrow keys to choose another, then press Enter. An account with one organization skips the question.
48
+
49
+ The CLI keeps this choice. Changing organizations in the web app does not change it. New projects from `zoah import` go into this organization. A repo that already has `.zoah/config.json` keeps updating its own project.
50
+
46
51
  The CLI uses `ZOAH_BASE_URL` when it is set. Otherwise, it uses `https://zoah.com`. `OPACITY_BASE_URL` remains a compatibility fallback.
47
52
 
48
53
  ### `zoah logout`
@@ -56,15 +61,27 @@ To clear both, run logout twice.
56
61
 
57
62
  ### `zoah whoami`
58
63
 
59
- Prints the active user, the source credentials file, and the base URL. Use this when project credentials hide the global token.
64
+ Prints the active user, the source credentials file, the base URL, and the organization the CLI works in. Use this when project credentials hide the global token.
60
65
 
61
66
  ```bash
62
67
  zoah whoami
63
68
  # Signed in as you@example.com (global).
64
69
  # Source: ~/.zoah/credentials.json
65
70
  # Base URL: https://zoah.com
71
+ # Organization: Acme (acme)
66
72
  ```
67
73
 
74
+ ### `zoah organization`
75
+
76
+ ```bash
77
+ zoah organization list # your organizations; * marks the CLI's
78
+ zoah organization switch # choose from the list with the arrow keys
79
+ zoah organization switch acme # or name one by slug, name or id
80
+ zoah organization create "Acme" # create one; switch to it to work there
81
+ ```
82
+
83
+ `switch` changes the organization for the credential it came from, so a `--local` login keeps its own organization. The MCP server uses the same organization unless `connect` names another.
84
+
68
85
  ### `zoah mcp`
69
86
 
70
87
  Runs the Zoah MCP server over stdio so a coding agent (Claude Code, Codex,
@@ -245,6 +262,9 @@ zoah swap --print-issues warn # print issue details
245
262
 
246
263
  The dry-run mode is the safe way to preview what swap will do before letting it touch your source tree.
247
264
 
265
+ React wrappers preserve root HTML props and use `elementProps` for supported nested form controls.
266
+ See [native HTML elements](docs/native-elements.md) for the supported tags, examples, and limits.
267
+
248
268
  #### Authenticated installs (`.npmrc` management)
249
269
 
250
270
  Published packages carry the project's privacy. CLI imports are private by
@@ -252,6 +272,14 @@ default, so the install needs credentials. When the repo's `.npmrc` (and your
252
272
  `~/.npmrc`) has no token for the Zoah registry host, swap mints a registry
253
273
  API key for the project's organization and manages the file for you:
254
274
 
275
+ - A key reads only its own organization's packages. When `.npmrc` already has
276
+ a key, swap asks the registry whether that key can read this package. If the
277
+ registry refuses it (401 or 403), for example because the key came from a
278
+ project in another organization, swap replaces it with a key for this
279
+ project and says so. `.npmrc` holds one key per registry host, so a repo
280
+ that installs packages from two organizations needs a key that can read
281
+ both.
282
+
255
283
  - The key is requested through the authenticated import API, requires write
256
284
  access in the project's organization, and is **reused** on repeat runs (one
257
285
  key per project + user, not one per invocation). It appears in Project