@collective-intelligence/cli 0.1.11 → 0.1.12

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 +61 -0
  2. package/dist/cli.js +20 -9
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -107,6 +107,67 @@ ci logout
107
107
  - `ci apps list|get|rotate-secret|disable` manage existing applications.
108
108
  `list` and `get` show `primaryRedirectUri` beside `redirectUris`.
109
109
 
110
+ ## Create an Organization from a Tenant Session
111
+
112
+ A Tenant Admin can approve `ci login <api-url>` without choosing an Organization.
113
+ Then create a ready-to-use Organization using the installation's configured defaults:
114
+
115
+ ```sh
116
+ ci login <api-url>
117
+ ci orgs create --name "Acme" --defaults --json
118
+ ci whoami
119
+ ```
120
+
121
+ `--defaults` fills omitted choices from the elected model preset, its embedding
122
+ model and the installation storage provider. It reads only configuration needed
123
+ for omitted choices; complete explicit inputs do not require the defaults catalog.
124
+ Missing required defaults stop
125
+ creation with the applicable override flags. Storage secrets remain server-side.
126
+ The command selects the new Organization in the saved Profile used for the CLI
127
+ Session. An explicit `CI_MANAGEMENT_TOKEN` session works unattended and leaves
128
+ Profiles unchanged; Organization API keys cannot authorize tenant creation.
129
+
130
+ Customize with `--preset`, `--storage-provider`, `--embedding-model`, `--slug`,
131
+ `--timezone`, or `--inputs organization.json`. The JSON file accepts the existing
132
+ partial setup body: `organization`, `presetId`, `storage`, `embedding`, and
133
+ `installPackages`. Flags override matching file leaves; `--defaults` fills only
134
+ omissions. Valid explicit nulls are preserved. Unknown structural fields and
135
+ invalid types fail before creation; `storage.settings` and `embedding.options`
136
+ accept provider-specific records. Omitted timezone is UTC; an omitted slug is
137
+ derived from the name. Empty derived slugs require `--slug`; collisions never
138
+ receive an automatic suffix. Without `--defaults`, provide the required preset,
139
+ storage and embedding configuration explicitly.
140
+ `embedding.defaultChunkSize` accepts an integer or `null`; fractional values
141
+ fail preflight with a field-specific error.
142
+
143
+ ```sh
144
+ ci orgs create --inputs organization.json --name "Acme Europe" --defaults --json
145
+ ci orgs create --name "Acme" --preset <preset-id> --storage-provider s3 \
146
+ --embedding-model <model-id> --inputs organization.json --json
147
+ ```
148
+
149
+ JSON mode prints one terminal object. `created` exits 0 and includes the complete
150
+ setup `result` plus `selection` (`selected` or `not_applicable`).
151
+ `created_selection_failed` exits 1 but preserves the full created result and
152
+ provides `ci orgs use <id>` recovery. `failed` exits 1 without a created identity.
153
+ `outcome_unknown` exits 1 when a timeout, lost response or untrustworthy response
154
+ cannot establish the result. Creation is never automatically retried.
155
+ Recovery commands retain the resolved backend URL and applicable Profile without
156
+ credentials. If the slug or Profile cannot be represented safely as an option
157
+ value (including a slug starting with `--`), guidance directs you to inspect
158
+ Organizations in the Dashboard for that backend.
159
+
160
+ ```sh
161
+ ci orgs list --slug acme --json
162
+ ci orgs use <created-organization-id>
163
+ ```
164
+
165
+ Exact-slug lookup uses tenant-read permission (Tenant Admin or Tenant Operator)
166
+ and returns a plain Organization array. A match does not prove that the uncertain
167
+ request created it; an empty result does not prove rollback. Ordinary `ci orgs
168
+ list` continues to list accessible Organizations. Existing `--profile` and
169
+ `--backend-url` options apply; creation requires no Organization selector.
170
+
110
171
  ## Manage Server Credentials and API Keys
111
172
 
112
173
  ```sh