@useorgx/wizard 0.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/README.md +69 -0
- package/dist/cli.js +3799 -0
- package/dist/cli.js.map +1 -0
- package/package.json +52 -0
package/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# @useorgx/wizard
|
|
2
|
+
|
|
3
|
+
One-line CLI onboarding for OrgX surfaces.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm install
|
|
9
|
+
pnpm build
|
|
10
|
+
node dist/cli.js --help
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
For local development, use `pnpm dev -- --help`.
|
|
14
|
+
|
|
15
|
+
## Commands
|
|
16
|
+
|
|
17
|
+
- `setup` configures detected automated surfaces and, when OrgX auth is available in an interactive shell, guides workspace selection or creation.
|
|
18
|
+
- `surface list` shows supported surfaces and current status.
|
|
19
|
+
- `surface add <name>` patches a specific surface.
|
|
20
|
+
- `surface remove <name>` removes OrgX-managed config from a specific surface.
|
|
21
|
+
- `mcp add [surface]` and `mcp remove [surface]` manage Claude, Cursor, Codex, VS Code, Windsurf, and Zed MCP entries.
|
|
22
|
+
- `doctor` verifies local config, hosted MCP reachability, an authenticated hosted MCP `get_setup_status` tool call when OrgX user auth is configured, npm registry readiness, current-workspace connectivity, local OpenClaw health, and optionally the remote setup status API. It exits non-zero when blocking connectivity issues remain.
|
|
23
|
+
- `auth status` shows the resolved OrgX API key source and verifies it against `POST /api/client/sync`.
|
|
24
|
+
- `auth login [--base-url <url>]` starts browser pairing against OrgX, waits for approval, saves the returned per-user key to the wizard auth store, and bootstraps OpenClaw auth if OpenClaw is detected. Use `--api-key <oxk_...>` for CI or blocked-browser fallback.
|
|
25
|
+
- `auth set-key <oxk_...> [--base-url <url>]` verifies a per-user OrgX key, saves it to the wizard auth store, and bootstraps OpenClaw auth if OpenClaw is detected.
|
|
26
|
+
- `auth clear` removes the wizard-local saved OrgX API key.
|
|
27
|
+
- `workspace current`, `workspace list`, `workspace create <name>`, and `workspace set-default <id>` inspect and manage OrgX workspaces.
|
|
28
|
+
- `skills add [pack...]` writes `.cursor/rules/orgx.md`, generates `.claude/skills/orgx/SKILL.md`, and installs the default OrgX Claude skill packs (`morning-briefing`, `initiative-kickoff`, `bulk-create`, `nightly-recap`) from `useorgx/skills`.
|
|
29
|
+
|
|
30
|
+
## CI Mode
|
|
31
|
+
|
|
32
|
+
- `doctor` is CI-friendly: it exits non-zero only when blocking issues remain, and keeps warnings such as an unpublished npm package non-fatal.
|
|
33
|
+
- `auth set-key <oxk_...>` can be driven with `ORGX_BASE_URL` in CI when the target OrgX API is not production.
|
|
34
|
+
- The intended verification baseline for changes is `pnpm test`, `pnpm typecheck`, and `pnpm build`.
|
|
35
|
+
|
|
36
|
+
## Auth Notes
|
|
37
|
+
|
|
38
|
+
- The wizard uses per-user `oxk_...` keys for auth verification and local bootstrap. `auth login` now prefers secure browser pairing and falls back to direct key entry with `--api-key`.
|
|
39
|
+
- When `keytar` is available, the wizard stores the raw API key in the system keychain and keeps only metadata in `auth.json`. If `keytar` is unavailable or disabled, it falls back to file-backed storage in `auth.json`.
|
|
40
|
+
- `doctor` always checks `https://mcp.useorgx.com/health` and, when user auth is configured, initializes an authenticated MCP session against `https://mcp.useorgx.com/mcp` and calls `get_setup_status` before resolving the current workspace through the OrgX API.
|
|
41
|
+
- `doctor` also checks npm registry reachability for `@useorgx/wizard` and reports whether the package is already published.
|
|
42
|
+
- Remote setup status is separate: `doctor` checks `/api/setup/status` only when `ORGX_SERVICE_KEY` is present because that endpoint is still service-key-only.
|
|
43
|
+
- Auth resolution order is `ORGX_API_KEY`, then the wizard auth store, then OpenClaw config.
|
|
44
|
+
|
|
45
|
+
## Workspace Bootstrap
|
|
46
|
+
|
|
47
|
+
- `wizard setup` now opens a guided workspace picker in interactive shells, letting you keep the current default workspace, promote another existing workspace, or create a new one and make it active immediately.
|
|
48
|
+
- `wizard workspace current` reads the current OrgX workspace from `GET /api/v1/workspaces/current`, with a fallback to workspace listing if that route is unavailable.
|
|
49
|
+
- `wizard workspace list` lists all accessible workspaces.
|
|
50
|
+
- `wizard workspace create "Founders" --description "Initial OrgX workspace"` creates a new workspace through `POST /api/entities`.
|
|
51
|
+
- `wizard workspace set-default <id>` updates the default workspace through the generic entity API.
|
|
52
|
+
|
|
53
|
+
## Editor Rules And Skills
|
|
54
|
+
|
|
55
|
+
- `wizard skills add` writes the OrgX Cursor rule file at `.cursor/rules/orgx.md`.
|
|
56
|
+
- `wizard skills add` also generates a hosted OrgX Claude skill at `.claude/skills/orgx/SKILL.md`.
|
|
57
|
+
- The same command installs the four starter OrgX Claude skill packs by pulling their source files from `useorgx/skills`.
|
|
58
|
+
|
|
59
|
+
## Release Flow
|
|
60
|
+
|
|
61
|
+
- GitHub Actions publishes to npm on pushes of version tags matching `v*`.
|
|
62
|
+
- The publish workflow installs dependencies with pnpm, runs `pnpm typecheck`, `pnpm test`, and `pnpm build`, then runs `pnpm publish --no-git-checks --provenance`.
|
|
63
|
+
- The workflow expects an `NPM_TOKEN` repository secret.
|
|
64
|
+
|
|
65
|
+
## Troubleshooting
|
|
66
|
+
|
|
67
|
+
- If `doctor` reports `hosted mcp unreachable`, verify local network access to `https://mcp.useorgx.com/health`.
|
|
68
|
+
- If `doctor` reports `orgx auth invalid`, re-run `wizard auth login` to mint a fresh key or use `wizard auth login --api-key <oxk_...>` / `wizard auth set-key <oxk_...>` for manual fallback.
|
|
69
|
+
- If workspace resolution fails, re-run `wizard workspace list` after verifying the current OrgX base URL and API key.
|