@zoahhq/cli 0.1.7 → 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.
- package/README.md +26 -1
- package/dist/cli.mjs +2303 -1610
- 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
|
|
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)
|
|
72
|
+
```
|
|
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
|
|
66
81
|
```
|
|
67
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,
|
|
@@ -255,6 +272,14 @@ default, so the install needs credentials. When the repo's `.npmrc` (and your
|
|
|
255
272
|
`~/.npmrc`) has no token for the Zoah registry host, swap mints a registry
|
|
256
273
|
API key for the project's organization and manages the file for you:
|
|
257
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
|
+
|
|
258
283
|
- The key is requested through the authenticated import API, requires write
|
|
259
284
|
access in the project's organization, and is **reused** on repeat runs (one
|
|
260
285
|
key per project + user, not one per invocation). It appears in Project
|