@thecorporation/cli 26.3.21 → 26.3.22

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 CHANGED
@@ -15,24 +15,47 @@ npm install -g @thecorporation/cli
15
15
  ## Quick Start
16
16
 
17
17
  ```bash
18
- corp setup # authenticate via magic link
18
+ corp setup # choose local, cloud, or self-hosted
19
19
  corp status # workspace summary
20
20
  corp chat # AI assistant with full tool access
21
21
  corp form --type llc --name "Acme" # form a new entity
22
22
  ```
23
23
 
24
- ## Authentication
24
+ ## Setup & Hosting Modes
25
25
 
26
- `corp setup` authenticates via magic link:
26
+ `corp setup` walks you through configuration. After entering your name and email, you choose a hosting mode:
27
27
 
28
- 1. Enter your name and email
29
- 2. Check your email for a sign-in link from TheCorporation
30
- 3. Copy the code from the link URL and paste it into the terminal
31
- 4. Credentials are saved to `~/.corp/config.json`
28
+ ### Local (your machine)
29
+
30
+ Everything runs on your machine — no server, no cloud. Data is stored in `~/.corp/data` (configurable). Each CLI command invokes the Rust binary directly (~6ms per call).
31
+
32
+ 1. Choose "Local (your machine)"
33
+ 2. Confirm data directory (default `~/.corp/data`)
34
+ 3. A workspace is provisioned automatically
35
+ 4. Credentials and server secrets are saved to `~/.corp/auth.json`
36
+
37
+ ```bash
38
+ corp setup # select "Local"
39
+ corp status # verify — all local, no network
40
+ ```
41
+
42
+ ### TheCorporation cloud
43
+
44
+ Hosted by TheCorporation. Authenticates via magic link:
45
+
46
+ 1. Choose "TheCorporation cloud"
47
+ 2. Check your email for a sign-in link
48
+ 3. Paste the code from the link URL
32
49
 
33
50
  Your workspace is shared across the CLI, [MCP server](https://www.npmjs.com/package/@thecorporation/mcp-server), and [chat](https://humans.thecorporation.ai/chat) — all keyed on your email.
34
51
 
35
- For self-hosted setups (`CORP_API_URL` pointing to your own server), `corp setup` provisions a workspace directly without requiring a magic link.
52
+ ### Self-hosted server
53
+
54
+ Point to your own API server:
55
+
56
+ 1. Choose "Self-hosted server (custom URL)"
57
+ 2. Enter the server URL
58
+ 3. A workspace is provisioned directly (no magic link needed)
36
59
 
37
60
  ## Commands
38
61
 
@@ -217,11 +240,23 @@ Inside `corp chat`, these slash commands are available:
217
240
 
218
241
  ## Configuration
219
242
 
220
- Config is stored at `~/.corp/config.json`. `corp setup` populates it via magic link auth. You can also set values manually:
243
+ Config is stored at `~/.corp/config.json`. Credentials are in `~/.corp/auth.json`. `corp setup` populates both.
244
+
245
+ ### Hosting mode config
246
+
247
+ | Key | Values | Description |
248
+ |---|---|---|
249
+ | `hosting_mode` | `local`, `cloud`, `self-hosted` | How the CLI connects to the API |
250
+ | `api_url` | URL or `process://` | `process://` for local, HTTPS for cloud/self-hosted |
251
+ | `data_dir` | path | Data directory (local mode only, default `~/.corp/data`) |
252
+
253
+ ### Manual configuration
221
254
 
222
255
  ```bash
223
- corp config set api_url https://api.thecorporation.ai
224
- corp config set api_key sk_...
256
+ corp config set api_url https://api.thecorporation.ai # cloud
257
+ corp config set api_url process:// --force # local
258
+ corp config set data_dir ~/.corp/data
259
+ corp config set api_key sk_... --force
225
260
  corp config set workspace_id ws_...
226
261
  ```
227
262