@typeship-ax/cli 0.8.0 → 0.9.1

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 (106) hide show
  1. package/AGENTS.md +31 -0
  2. package/README.md +26 -9
  3. package/api.json +1875 -684
  4. package/api.md +352 -500
  5. package/dist/api-identity.d.ts +40 -0
  6. package/dist/api-identity.d.ts.map +1 -0
  7. package/dist/api-identity.js +128 -0
  8. package/dist/auth-profiles.d.ts +30 -0
  9. package/dist/auth-profiles.d.ts.map +1 -0
  10. package/dist/auth-profiles.js +138 -0
  11. package/dist/cli.js +522 -355
  12. package/dist/console-login-check.d.ts +21 -0
  13. package/dist/console-login-check.d.ts.map +1 -0
  14. package/dist/console-login-check.js +107 -0
  15. package/dist/console-login-contract.d.ts +45 -0
  16. package/dist/console-login-contract.d.ts.map +1 -0
  17. package/dist/console-login-contract.js +40 -0
  18. package/dist/core/http.d.ts +17 -2
  19. package/dist/core/http.d.ts.map +1 -1
  20. package/dist/core/http.js +78 -17
  21. package/dist/credential-storage.d.ts +24 -0
  22. package/dist/credential-storage.d.ts.map +1 -0
  23. package/dist/credential-storage.js +207 -0
  24. package/dist/docs.d.ts +25 -0
  25. package/dist/docs.d.ts.map +1 -1
  26. package/dist/docs.js +144 -0
  27. package/dist/errors.d.ts +18 -10
  28. package/dist/errors.d.ts.map +1 -1
  29. package/dist/errors.js +24 -14
  30. package/dist/index.d.ts +10 -3
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +20 -4
  33. package/dist/named-credentials.d.ts +21 -0
  34. package/dist/named-credentials.d.ts.map +1 -0
  35. package/dist/named-credentials.js +86 -0
  36. package/dist/oauth-login.d.ts +39 -0
  37. package/dist/oauth-login.d.ts.map +1 -0
  38. package/dist/oauth-login.js +171 -0
  39. package/dist/oauth-request.d.ts +21 -0
  40. package/dist/oauth-request.d.ts.map +1 -0
  41. package/dist/oauth-request.js +119 -0
  42. package/dist/oauth-session.d.ts +106 -0
  43. package/dist/oauth-session.d.ts.map +1 -0
  44. package/dist/oauth-session.js +244 -0
  45. package/dist/ops.d.ts +14 -1
  46. package/dist/ops.d.ts.map +1 -1
  47. package/dist/ops.js +30 -30
  48. package/dist/polling-login.d.ts +57 -0
  49. package/dist/polling-login.d.ts.map +1 -0
  50. package/dist/polling-login.js +204 -0
  51. package/dist/resources/account.d.ts +2 -2
  52. package/dist/resources/account.d.ts.map +1 -1
  53. package/dist/resources/account.js +1 -0
  54. package/dist/resources/api-keys.d.ts +3 -3
  55. package/dist/resources/api-keys.d.ts.map +1 -1
  56. package/dist/resources/api-keys.js +2 -0
  57. package/dist/resources/definition-revisions.d.ts +5 -5
  58. package/dist/resources/definition-revisions.d.ts.map +1 -1
  59. package/dist/resources/definition-revisions.js +4 -0
  60. package/dist/resources/definitions.d.ts +15 -4
  61. package/dist/resources/definitions.d.ts.map +1 -1
  62. package/dist/resources/definitions.js +11 -2
  63. package/dist/resources/generate.d.ts +14 -3
  64. package/dist/resources/generate.d.ts.map +1 -1
  65. package/dist/resources/generate.js +10 -2
  66. package/dist/resources/generations.d.ts +3 -3
  67. package/dist/resources/generations.d.ts.map +1 -1
  68. package/dist/resources/generations.js +2 -0
  69. package/dist/resources/projects.d.ts +56 -20
  70. package/dist/resources/projects.d.ts.map +1 -1
  71. package/dist/resources/projects.js +40 -4
  72. package/dist/resources/targets.d.ts +20 -9
  73. package/dist/resources/targets.d.ts.map +1 -1
  74. package/dist/resources/targets.js +14 -1
  75. package/dist/schemas.d.ts.map +1 -1
  76. package/dist/schemas.js +38 -22
  77. package/dist/types.d.ts +385 -119
  78. package/dist/types.d.ts.map +1 -1
  79. package/dist/types.js +11 -0
  80. package/package.json +2 -1
  81. package/src/api-identity.ts +98 -0
  82. package/src/auth-profiles.ts +114 -0
  83. package/src/cli.ts +444 -332
  84. package/src/console-login-check.ts +88 -0
  85. package/src/console-login-contract.ts +65 -0
  86. package/src/core/http.ts +88 -19
  87. package/src/credential-storage.ts +183 -0
  88. package/src/docs.ts +138 -0
  89. package/src/errors.ts +26 -15
  90. package/src/index.ts +29 -4
  91. package/src/named-credentials.ts +74 -0
  92. package/src/oauth-login.ts +184 -0
  93. package/src/oauth-request.ts +90 -0
  94. package/src/oauth-session.ts +258 -0
  95. package/src/ops.ts +44 -31
  96. package/src/polling-login.ts +165 -0
  97. package/src/resources/account.ts +3 -0
  98. package/src/resources/api-keys.ts +5 -0
  99. package/src/resources/definition-revisions.ts +9 -0
  100. package/src/resources/definitions.ts +25 -0
  101. package/src/resources/generate.ts +23 -0
  102. package/src/resources/generations.ts +5 -0
  103. package/src/resources/projects.ts +95 -7
  104. package/src/resources/targets.ts +32 -0
  105. package/src/schemas.ts +38 -22
  106. package/src/types.ts +404 -119
package/api.md CHANGED
@@ -1,19 +1,25 @@
1
- # typeship — API reference
1
+ # typeship — CLI reference
2
2
 
3
- API version 1.0.0. Package version 0.8.0. Generated by typeship; regenerate rather than editing.
3
+ API version 1.0.0. Package version 0.9.1. Generated by typeship; regenerate rather than editing.
4
4
 
5
- All methods return `ApiResult<T, E>`: check `result.ok`, or `unwrap(result)` to throw typed errors.
5
+ Run `typeship help --json` for the command index. Path arguments are positional; flags use the names shown below. Arrays accept repeated flags, comma-separated values, or a JSON array; object values use JSON.
6
6
 
7
- For complete input and output schemas, use [`api.json`](./api.json), the machine-readable companion to this reference. Collapsed wire arguments below use API field names for CLI and MCP; SDK calls use the native signature shown in each heading.
7
+ API commands write JSON to stdout. Exit codes: `0` success, `1` request failure, `2` invalid usage. In agent mode, errors are JSON on stderr with `status`, `issues`, and `next_steps`; branch on `issues[].code`. Destructive operations require `--force` without an interactive terminal.
8
+
9
+ Use `--fields id,name` to project response fields. `--base-url <url>` overrides the endpoint. See [`README.md`](./README.md) for local setup and authentication.
10
+
11
+ For complete input and output schemas, use [`api.json`](./api.json), the machine-readable companion to this reference.
8
12
 
9
13
  ## generate
10
14
 
11
- ### `client.generate.run(body)`
15
+ ### `typeship generate run [flags]`
12
16
 
13
17
  Generate one Target from a Definition
14
18
 
15
19
  `POST /generate`
16
20
 
21
+ Safety: **write** · Authentication: **optional**
22
+
17
23
  Stateless generation: nothing is stored. Returns the full generated
18
24
  package as files. Works without an API key: anonymous calls generate
19
25
  the first 25 operations, rate limited per IP address, and the
@@ -23,32 +29,28 @@ that turns the run into a project once a person signs in. With a key, the free p
23
29
  paid plans generate the complete Definition. A present but invalid key is a
24
30
  401, not a downgrade to anonymous.
25
31
 
26
- Safety: **write** · Authentication: **optional**
27
-
28
- Body: `GenerateRequest` (required)
29
-
30
- Returns: `GenerationResult`
31
- Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `PayloadTooLargeError` (413), `UnprocessableEntityError` (422), `RateLimitedError` (429), `ApiResponseError` (default)
32
+ | Argument or flag | In | Type | Required | Description |
33
+ | --- | --- | --- | --- | --- |
34
+ | `--definition` | body | `json` | yes | A Definition for stateless generation, provided as exactly one URL or inline entrypoint. |
35
+ | `--target` | body | `object` | yes | Stateless generator descriptor; no persisted Target is created. |
36
+ | `--package-name` | body | `string` | no | npm package or Python distribution override. Valid only for the TypeScript and Python SDK targets. |
37
+ | `--module-path` | body | `string` | no | Go module path override. Valid only for the Go SDK. Linked projects derive this from the Go destination repository by default. |
38
+ | `--config` | body | `object` | no | Everything Typeship needs beyond the Definition, in one object: generation customization (globals, retries, pagination, readme) and how the generated tooling behaves (cli, mcp, package, docs_url). Plain configuration. Typeship never requires vendor extensions inside the Definition itself. Stateless generation also accepts GraphQL settings here; stored projects keep those settings on their Definition. |
39
+ | `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated account and operation; account-less generation uses a hashed network identity. Retrying the same method, path, query, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write. |
32
40
 
33
- <details>
34
- <summary>Wire arguments (CLI and MCP)</summary>
41
+ Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
35
42
 
36
- ```json
37
- {
38
- "definition": {
39
- "url": "https://example.com"
40
- },
41
- "target": {
42
- "generator": "typescript-sdk"
43
- }
44
- }
43
+ ```sh
44
+ typeship generate run --definition '{"url":"https://example.com"}' --target '{"generator":"typescript-sdk"}'
45
45
  ```
46
46
 
47
- </details>
47
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
48
+
49
+ Read the full command contract with `typeship docs generate run --json`.
48
50
 
49
51
  ## projects
50
52
 
51
- ### `client.projects.list(params)`
53
+ ### `typeship projects list [flags]`
52
54
 
53
55
  List projects
54
56
 
@@ -56,66 +58,50 @@ List projects
56
58
 
57
59
  Safety: **read** · Authentication: **required**
58
60
 
59
- | Parameter | In | Type | Required | Description |
61
+ | Argument or flag | In | Type | Required | Description |
60
62
  | --- | --- | --- | --- | --- |
61
- | `limit` | query | `number` | no | Maximum number of resources to return. |
62
- | `cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same account, operation, filters, and ordering that issued it. |
63
-
64
- Returns: `PagePromise<ProjectSummary>` — auto-paginating (`for await` walks every page)
65
- Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `RateLimitedError` (429)
66
-
67
- <details>
68
- <summary>Wire arguments (CLI and MCP)</summary>
63
+ | `--limit` | query | `number` | no | Maximum number of resources to return. Default: 20. |
64
+ | `--cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same account, operation, filters, and ordering that issued it. |
69
65
 
70
- ```json
71
- {}
66
+ ```sh
67
+ typeship projects list
72
68
  ```
73
69
 
74
- </details>
70
+ Output: JSON with `items` and `hasMore`; when another page exists, `nextPage` contains its arguments and `nextCommand` contains the command to fetch it. Use `--all` to stream every item from every page as NDJSON.
75
71
 
76
- ### `client.projects.create(body, params)`
72
+ Read the full command contract with `typeship docs projects list --json`.
73
+
74
+ ### `typeship projects create [flags]`
77
75
 
78
76
  Create a project
79
77
 
80
78
  `POST /projects`
81
79
 
82
- Stores a URL- or GitHub-sourced project. Free includes one stored project, every selected target, and the first 25 operations, while keeping manual and automatic regeneration, history, destination pull requests, and preview checks. Stateless POST /generate does not consume this slot. Pro adds projects and generates every operation in the Definition.
83
-
84
80
  Safety: **write** · Authentication: **required**
85
81
 
86
- | Parameter | In | Type | Required | Description |
82
+ Stores a URL- or GitHub-sourced project. Free includes one stored project, every selected target, and the first 25 operations, while keeping manual and automatic regeneration, history, destination pull requests, and preview checks. Stateless POST /generate does not consume this slot. Pro adds projects and generates every operation in the Definition.
83
+
84
+ | Argument or flag | In | Type | Required | Description |
87
85
  | --- | --- | --- | --- | --- |
88
- | `idempotencyKey` | header | `string` | no | Uniquely identifies this creation attempt. Retrying the same request with the same key returns the original response instead of creating another project. Reusing a key with different parameters returns 409. |
89
-
90
- Body: `CreateProjectRequest` (required)
91
-
92
- Returns: `Project`
93
- Errors: `BadRequestError` (400), `UnauthorizedError` (401), `PaymentRequiredError` (402), `ForbiddenError` (403), `ConflictError` (409), `UnprocessableEntityError` (422), `RateLimitedError` (429), `InternalServerError` (500)
94
-
95
- <details>
96
- <summary>Wire arguments (CLI and MCP)</summary>
97
-
98
- ```json
99
- {
100
- "name": "example",
101
- "definition": {
102
- "source": {
103
- "kind": "url",
104
- "url": "https://example.com"
105
- }
106
- },
107
- "targets": [
108
- {
109
- "name": "example",
110
- "generator": "typescript-sdk"
111
- }
112
- ]
113
- }
86
+ | `--name` | body | `string` | yes | — |
87
+ | `--definition` | body | `object` | yes | — |
88
+ | `--targets` | body | `array` | yes | Initial first-class Targets. More than one may use the same generator with different identities or Deliveries. |
89
+ | `--auto-generate` | body | `boolean` | no | Whether Typeship should regenerate automatically when the source changes. Default: false. |
90
+ | `--relay-enabled` | body | `boolean` | no | Enable webhook relay sessions. Requires the CLI target and Pro. Default: false. |
91
+ | `--config` | body | `json` | no | Shared defaults inherited by every Target. GraphQL settings belong in definition.graphql. |
92
+ | `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated account and operation; account-less generation uses a hashed network identity. Retrying the same method, path, query, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write. |
93
+
94
+ Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
95
+
96
+ ```sh
97
+ typeship projects create --name example --definition '{"source":{"kind":"url","url":"https://example.com"}}' --targets '[{"name":"example","generator":"typescript-sdk"}]'
114
98
  ```
115
99
 
116
- </details>
100
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
117
101
 
118
- ### `client.projects.retrieve(projectId)`
102
+ Read the full command contract with `typeship docs projects create --json`.
103
+
104
+ ### `typeship projects retrieve <project_id> [flags]`
119
105
 
120
106
  Retrieve a project
121
107
 
@@ -123,25 +109,21 @@ Retrieve a project
123
109
 
124
110
  Safety: **read** · Authentication: **required**
125
111
 
126
- | Parameter | In | Type | Required | Description |
127
- | --- | --- | --- | --- | --- |
128
- | `projectId` | path | `ProjectId` | yes | — |
129
-
130
- Returns: `Project`
131
- Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
112
+ Returns Project-owned fields only. List Targets separately for Target and Delivery data.
132
113
 
133
- <details>
134
- <summary>Wire arguments (CLI and MCP)</summary>
114
+ | Argument or flag | In | Type | Required | Description |
115
+ | --- | --- | --- | --- | --- |
116
+ | `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
135
117
 
136
- ```json
137
- {
138
- "project_id": "prj_4f8k2m7x9q1v6b3n"
139
- }
118
+ ```sh
119
+ typeship projects retrieve prj_4f8k2m7x9q1v6b3n
140
120
  ```
141
121
 
142
- </details>
122
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
123
+
124
+ Read the full command contract with `typeship docs projects retrieve --json`.
143
125
 
144
- ### `client.projects.delete(projectId)`
126
+ ### `typeship projects delete <project_id> [flags]`
145
127
 
146
128
  Delete a project
147
129
 
@@ -149,25 +131,19 @@ Delete a project
149
131
 
150
132
  Safety: **destructive** · Authentication: **required**
151
133
 
152
- | Parameter | In | Type | Required | Description |
134
+ | Argument or flag | In | Type | Required | Description |
153
135
  | --- | --- | --- | --- | --- |
154
- | `projectId` | path | `ProjectId` | yes | — |
136
+ | `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
155
137
 
156
- Returns: `DeletedProject`
157
- Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
158
-
159
- <details>
160
- <summary>Wire arguments (CLI and MCP)</summary>
161
-
162
- ```json
163
- {
164
- "project_id": "prj_4f8k2m7x9q1v6b3n"
165
- }
138
+ ```sh
139
+ typeship projects delete prj_4f8k2m7x9q1v6b3n --force
166
140
  ```
167
141
 
168
- </details>
142
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
143
+
144
+ Read the full command contract with `typeship docs projects delete --json`.
169
145
 
170
- ### `client.projects.update(projectId, body)`
146
+ ### `typeship projects update <project_id> [flags]`
171
147
 
172
148
  Update a project
173
149
 
@@ -175,144 +151,118 @@ Update a project
175
151
 
176
152
  Safety: **write** · Authentication: **required**
177
153
 
178
- | Parameter | In | Type | Required | Description |
154
+ | Argument or flag | In | Type | Required | Description |
179
155
  | --- | --- | --- | --- | --- |
180
- | `projectId` | path | `ProjectId` | yes | — |
156
+ | `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
157
+ | `--name` | body | `string` | no | — |
158
+ | `--auto-generate` | body | `boolean` | no | — |
159
+ | `--relay-enabled` | body | `boolean` | no | Enable webhook relay sessions. Requires the CLI target and Pro. |
160
+ | `--config` | body | `json` | no | Replaces the Project's shared Target defaults. Send null to clear them. |
181
161
 
182
- Body: `UpdateProjectRequest` (required)
162
+ Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
183
163
 
184
- Returns: `Project`
185
- Errors: `BadRequestError` (400), `UnauthorizedError` (401), `PaymentRequiredError` (402), `ForbiddenError` (403), `NotFoundError` (404), `UnprocessableEntityError` (422), `RateLimitedError` (429)
186
-
187
- <details>
188
- <summary>Wire arguments (CLI and MCP)</summary>
189
-
190
- ```json
191
- {
192
- "project_id": "prj_4f8k2m7x9q1v6b3n"
193
- }
164
+ ```sh
165
+ typeship projects update prj_4f8k2m7x9q1v6b3n
194
166
  ```
195
167
 
196
- </details>
168
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
169
+
170
+ Read the full command contract with `typeship docs projects update --json`.
197
171
 
198
- ### `client.projects.retrieveDiagnostics(projectId)`
172
+ ### `typeship projects retrieve-diagnostics <project_id> [flags]`
199
173
 
200
174
  Analyze a project's latest Definition Revision
201
175
 
202
176
  `GET /projects/{project_id}/diagnostics`
203
177
 
204
- Runs deterministic OpenAPI or GraphQL authorship checks against the latest observed immutable Definition Revision after applying the Definition's existing patches. Diagnostics group every affected location under a stable rule. Exact patches are included only when Typeship can derive the change without inventing API behavior.
205
-
206
178
  Safety: **read** · Authentication: **required**
207
179
 
208
- | Parameter | In | Type | Required | Description |
209
- | --- | --- | --- | --- | --- |
210
- | `projectId` | path | `ProjectId` | yes | — |
211
-
212
- Returns: `DiagnosticReport`
213
- Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
180
+ Runs deterministic OpenAPI or GraphQL authorship checks against the latest observed immutable Definition Revision after applying the Definition's existing patches. Diagnostics group every affected location under a stable rule. Exact patches are included only when Typeship can derive the change without inventing API behavior.
214
181
 
215
- <details>
216
- <summary>Wire arguments (CLI and MCP)</summary>
182
+ | Argument or flag | In | Type | Required | Description |
183
+ | --- | --- | --- | --- | --- |
184
+ | `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
217
185
 
218
- ```json
219
- {
220
- "project_id": "prj_4f8k2m7x9q1v6b3n"
221
- }
186
+ ```sh
187
+ typeship projects retrieve-diagnostics prj_4f8k2m7x9q1v6b3n
222
188
  ```
223
189
 
224
- </details>
190
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
191
+
192
+ Read the full command contract with `typeship docs projects retrieve-diagnostics --json`.
225
193
 
226
- ### `client.projects.refreshDiagnostics(projectId)`
194
+ ### `typeship projects refresh-diagnostics <project_id> [flags]`
227
195
 
228
196
  Refresh a project's Diagnostics from its configured source
229
197
 
230
198
  `POST /projects/{project_id}/diagnostics`
231
199
 
232
- Fetches the complete configured source, records a new immutable revision only when content changed, and returns its Diagnostics. This does not generate targets or consume a metered generation.
233
-
234
200
  Safety: **write** · Authentication: **required**
235
201
 
236
- | Parameter | In | Type | Required | Description |
237
- | --- | --- | --- | --- | --- |
238
- | `projectId` | path | `ProjectId` | yes | — |
239
-
240
- Returns: `DiagnosticReport`
241
- Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `UnprocessableEntityError` (422), `RateLimitedError` (429)
202
+ Fetches the complete configured source, records a new immutable revision only when content changed, and returns its Diagnostics. This does not generate targets or consume a metered generation.
242
203
 
243
- <details>
244
- <summary>Wire arguments (CLI and MCP)</summary>
204
+ | Argument or flag | In | Type | Required | Description |
205
+ | --- | --- | --- | --- | --- |
206
+ | `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
207
+ | `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated account and operation; account-less generation uses a hashed network identity. Retrying the same method, path, query, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write. |
245
208
 
246
- ```json
247
- {
248
- "project_id": "prj_4f8k2m7x9q1v6b3n"
249
- }
209
+ ```sh
210
+ typeship projects refresh-diagnostics prj_4f8k2m7x9q1v6b3n
250
211
  ```
251
212
 
252
- </details>
213
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
253
214
 
254
- ### `client.projects.remediateDiagnostics(projectId, body)`
215
+ Read the full command contract with `typeship docs projects refresh-diagnostics --json`.
216
+
217
+ ### `typeship projects remediate-diagnostics <project_id> [flags]`
255
218
 
256
219
  Apply exact, reviewed diagnostic remediations
257
220
 
258
221
  `POST /projects/{project_id}/diagnostics/remediations`
259
222
 
260
- Applies only deterministic patches. Repository sources receive an updateable source pull request; URL sources receive project overlays. Diagnostics that require API-owner intent return 422 and include an authoring_brief in the Diagnostic instead.
261
-
262
223
  Safety: **write** · Authentication: **required**
263
224
 
264
- | Parameter | In | Type | Required | Description |
265
- | --- | --- | --- | --- | --- |
266
- | `projectId` | path | `ProjectId` | yes | — |
267
-
268
- Body: `DiagnosticRemediationRequest` (required)
225
+ Applies only deterministic patches. Repository sources receive an updateable source pull request; URL sources receive project overlays. Diagnostics that require API-owner intent return 422 and include an authoring_brief in the Diagnostic instead.
269
226
 
270
- Returns: `DiagnosticRemediation`
271
- Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `UnprocessableEntityError` (422), `RateLimitedError` (429)
227
+ | Argument or flag | In | Type | Required | Description |
228
+ | --- | --- | --- | --- | --- |
229
+ | `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
230
+ | `--diagnostic-ids` | body | `array` | yes | Stable IDs of current diagnostics whose exact patches should be reviewed and applied. |
231
+ | `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated account and operation; account-less generation uses a hashed network identity. Retrying the same method, path, query, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write. |
272
232
 
273
- <details>
274
- <summary>Wire arguments (CLI and MCP)</summary>
233
+ Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
275
234
 
276
- ```json
277
- {
278
- "project_id": "prj_4f8k2m7x9q1v6b3n",
279
- "diagnostic_ids": [
280
- "value"
281
- ]
282
- }
235
+ ```sh
236
+ typeship projects remediate-diagnostics prj_4f8k2m7x9q1v6b3n --diagnostic-ids '["value"]'
283
237
  ```
284
238
 
285
- </details>
239
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
240
+
241
+ Read the full command contract with `typeship docs projects remediate-diagnostics --json`.
286
242
 
287
- ### `client.projects.retrieveIntegrationHealth(projectId)`
243
+ ### `typeship projects retrieve-integration-health <project_id> [flags]`
288
244
 
289
245
  Diagnose a project's repository integrations
290
246
 
291
247
  `GET /projects/{project_id}/integration-health`
292
248
 
293
- Returns provider-neutral, machine-actionable source and destination access, Definition readability, source-approval label setup, required status names, and the latest durable webhook delivery. The Console renders this same result.
294
-
295
249
  Safety: **read** · Authentication: **required**
296
250
 
297
- | Parameter | In | Type | Required | Description |
298
- | --- | --- | --- | --- | --- |
299
- | `projectId` | path | `ProjectId` | yes | — |
300
-
301
- Returns: `RepositoryIntegrationHealth`
302
- Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
251
+ Returns provider-neutral, machine-actionable source and destination access, Definition readability, source-approval label setup, required status names, and the latest durable webhook delivery. The Console renders this same result.
303
252
 
304
- <details>
305
- <summary>Wire arguments (CLI and MCP)</summary>
253
+ | Argument or flag | In | Type | Required | Description |
254
+ | --- | --- | --- | --- | --- |
255
+ | `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
306
256
 
307
- ```json
308
- {
309
- "project_id": "prj_4f8k2m7x9q1v6b3n"
310
- }
257
+ ```sh
258
+ typeship projects retrieve-integration-health prj_4f8k2m7x9q1v6b3n
311
259
  ```
312
260
 
313
- </details>
261
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
262
+
263
+ Read the full command contract with `typeship docs projects retrieve-integration-health --json`.
314
264
 
315
- ### `client.projects.listGenerations(projectId, params)`
265
+ ### `typeship projects list-generations <project_id> [flags]`
316
266
 
317
267
  List a project's generations
318
268
 
@@ -320,33 +270,29 @@ List a project's generations
320
270
 
321
271
  Safety: **read** · Authentication: **required**
322
272
 
323
- | Parameter | In | Type | Required | Description |
273
+ | Argument or flag | In | Type | Required | Description |
324
274
  | --- | --- | --- | --- | --- |
325
- | `projectId` | path | `ProjectId` | yes | — |
326
- | `limit` | query | `number` | no | Maximum number of resources to return. |
327
- | `cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same account, operation, filters, and ordering that issued it. |
328
- | `targetId` | query | `TargetId` | no | Only generations for this persisted Target. |
329
-
330
- Returns: `PagePromise<Generation>` — auto-paginating (`for await` walks every page)
331
- Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
275
+ | `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
276
+ | `--limit` | query | `number` | no | Maximum number of resources to return. Default: 20. |
277
+ | `--cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same account, operation, filters, and ordering that issued it. |
278
+ | `--target-id` | query | `string` | no | Only generations for this persisted Target. |
332
279
 
333
- <details>
334
- <summary>Wire arguments (CLI and MCP)</summary>
335
-
336
- ```json
337
- {
338
- "project_id": "prj_4f8k2m7x9q1v6b3n"
339
- }
280
+ ```sh
281
+ typeship projects list-generations prj_4f8k2m7x9q1v6b3n
340
282
  ```
341
283
 
342
- </details>
284
+ Output: JSON with `items` and `hasMore`; when another page exists, `nextPage` contains its arguments and `nextCommand` contains the command to fetch it. Use `--all` to stream every item from every page as NDJSON.
285
+
286
+ Read the full command contract with `typeship docs projects list-generations --json`.
343
287
 
344
- ### `client.projects.generate(projectId)`
288
+ ### `typeship projects generate <project_id> [flags]`
345
289
 
346
290
  Generate targets and open pull requests
347
291
 
348
292
  `POST /projects/{project_id}/generations`
349
293
 
294
+ Safety: **write** · Authentication: **required**
295
+
350
296
  Resolves the project's URL or GitHub source, generates every
351
297
  configured delivery package, stores each result in the project's history,
352
298
  and attempts to open a pull request in every configured destination.
@@ -355,29 +301,22 @@ commit, branch, or pull request is created and that generation reports
355
301
  `pr_status: no_changes`. This is the same pipeline automatic
356
302
  regeneration runs after a source change.
357
303
 
358
- Safety: **write** · Authentication: **required**
359
-
360
- | Parameter | In | Type | Required | Description |
304
+ | Argument or flag | In | Type | Required | Description |
361
305
  | --- | --- | --- | --- | --- |
362
- | `projectId` | path | `ProjectId` | yes | — |
363
-
364
- Returns: `GenerationBatch`
365
- Errors: `UnauthorizedError` (401), `PaymentRequiredError` (402), `ForbiddenError` (403), `NotFoundError` (404), `UnprocessableEntityError` (422), `RateLimitedError` (429), `InternalServerError` (500)
306
+ | `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
307
+ | `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated account and operation; account-less generation uses a hashed network identity. Retrying the same method, path, query, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write. |
366
308
 
367
- <details>
368
- <summary>Wire arguments (CLI and MCP)</summary>
369
-
370
- ```json
371
- {
372
- "project_id": "prj_4f8k2m7x9q1v6b3n"
373
- }
309
+ ```sh
310
+ typeship projects generate prj_4f8k2m7x9q1v6b3n
374
311
  ```
375
312
 
376
- </details>
313
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
314
+
315
+ Read the full command contract with `typeship docs projects generate --json`.
377
316
 
378
317
  ## definitions
379
318
 
380
- ### `client.definitions.retrieve(definitionId)`
319
+ ### `typeship definitions retrieve <definition_id> [flags]`
381
320
 
382
321
  Retrieve a Definition
383
322
 
@@ -385,57 +324,50 @@ Retrieve a Definition
385
324
 
386
325
  Safety: **read** · Authentication: **required**
387
326
 
388
- | Parameter | In | Type | Required | Description |
327
+ | Argument or flag | In | Type | Required | Description |
389
328
  | --- | --- | --- | --- | --- |
390
- | `definitionId` | path | `DefinitionId` | yes | — |
391
-
392
- Returns: `Definition`
393
- Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
329
+ | `<definition_id>` | path | `string` | yes | — |
394
330
 
395
- <details>
396
- <summary>Wire arguments (CLI and MCP)</summary>
397
-
398
- ```json
399
- {
400
- "definition_id": "def_2p8m4q7k1v9d6h3c"
401
- }
331
+ ```sh
332
+ typeship definitions retrieve def_2p8m4q7k1v9d6h3c
402
333
  ```
403
334
 
404
- </details>
335
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
336
+
337
+ Read the full command contract with `typeship docs definitions retrieve --json`.
405
338
 
406
- ### `client.definitions.update(definitionId, body)`
339
+ ### `typeship definitions update <definition_id> [flags]`
407
340
 
408
341
  Update and resolve a Definition
409
342
 
410
343
  `PATCH /definitions/{definition_id}`
411
344
 
412
- Resolves the complete document graph and records a new immutable revision before saving.
413
-
414
345
  Safety: **write** · Authentication: **required**
415
346
 
416
- | Parameter | In | Type | Required | Description |
417
- | --- | --- | --- | --- | --- |
418
- | `definitionId` | path | `DefinitionId` | yes | — |
419
-
420
- Body: `DefinitionUpdateRequest` (required)
347
+ Resolves the complete document graph and records a new immutable revision before saving.
421
348
 
422
- Returns: `Definition`
423
- Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `UnprocessableEntityError` (422), `RateLimitedError` (429)
349
+ | Argument or flag | In | Type | Required | Description |
350
+ | --- | --- | --- | --- | --- |
351
+ | `<definition_id>` | path | `string` | yes | — |
352
+ | `--source` | body | `json` | no | — |
353
+ | `--patches` | body | `array` | no | — |
354
+ | `--graphql` | body | `json` | no | — |
355
+ | `--diagnostic-policy` | body | `object` | no | Source pull-request enforcement threshold, new-versus-complete baseline, and explicitly reviewed rule or location exceptions. |
356
+ | `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated account and operation; account-less generation uses a hashed network identity. Retrying the same method, path, query, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write. |
424
357
 
425
- <details>
426
- <summary>Wire arguments (CLI and MCP)</summary>
358
+ Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
427
359
 
428
- ```json
429
- {
430
- "definition_id": "def_2p8m4q7k1v9d6h3c"
431
- }
360
+ ```sh
361
+ typeship definitions update def_2p8m4q7k1v9d6h3c
432
362
  ```
433
363
 
434
- </details>
364
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
365
+
366
+ Read the full command contract with `typeship docs definitions update --json`.
435
367
 
436
368
  ## targets
437
369
 
438
- ### `client.targets.list(projectId, params)`
370
+ ### `typeship targets list <project_id> [flags]`
439
371
 
440
372
  List a project's Targets
441
373
 
@@ -443,60 +375,55 @@ List a project's Targets
443
375
 
444
376
  Safety: **read** · Authentication: **required**
445
377
 
446
- | Parameter | In | Type | Required | Description |
378
+ | Argument or flag | In | Type | Required | Description |
447
379
  | --- | --- | --- | --- | --- |
448
- | `projectId` | path | `ProjectId` | yes | — |
449
- | `limit` | query | `number` | no | Maximum number of resources to return. |
450
- | `cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same account, operation, filters, and ordering that issued it. |
451
-
452
- Returns: `PagePromise<Target>` — auto-paginating (`for await` walks every page)
453
- Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
454
-
455
- <details>
456
- <summary>Wire arguments (CLI and MCP)</summary>
380
+ | `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
381
+ | `--limit` | query | `number` | no | Maximum number of resources to return. Default: 20. |
382
+ | `--cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same account, operation, filters, and ordering that issued it. |
457
383
 
458
- ```json
459
- {
460
- "project_id": "prj_4f8k2m7x9q1v6b3n"
461
- }
384
+ ```sh
385
+ typeship targets list prj_4f8k2m7x9q1v6b3n
462
386
  ```
463
387
 
464
- </details>
388
+ Output: JSON with `items` and `hasMore`; when another page exists, `nextPage` contains its arguments and `nextCommand` contains the command to fetch it. Use `--all` to stream every item from every page as NDJSON.
465
389
 
466
- ### `client.targets.create(projectId, body)`
390
+ Read the full command contract with `typeship docs targets list --json`.
391
+
392
+ ### `typeship targets create <project_id> [flags]`
467
393
 
468
394
  Create an independently configured Target
469
395
 
470
396
  `POST /projects/{project_id}/targets`
471
397
 
472
- Several Targets may use the same generator with distinct configuration, Deliveries, and release streams.
473
-
474
398
  Safety: **write** · Authentication: **required**
475
399
 
476
- | Parameter | In | Type | Required | Description |
477
- | --- | --- | --- | --- | --- |
478
- | `projectId` | path | `ProjectId` | yes | — |
479
-
480
- Body: `TargetFields` (required)
481
-
482
- Returns: `TargetResponse`
483
- Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `ConflictError` (409), `UnprocessableEntityError` (422), `RateLimitedError` (429)
484
-
485
- <details>
486
- <summary>Wire arguments (CLI and MCP)</summary>
400
+ Several Targets may use the same generator with distinct configuration, Deliveries, and release streams.
487
401
 
488
- ```json
489
- {
490
- "project_id": "prj_4f8k2m7x9q1v6b3n",
491
- "name": "example",
492
- "definition_id": "def_2p8m4q7k1v9d6h3c",
493
- "generator": "typescript-sdk"
494
- }
402
+ | Argument or flag | In | Type | Required | Description |
403
+ | --- | --- | --- | --- | --- |
404
+ | `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
405
+ | `--name` | body | `string` | yes | — |
406
+ | `--definition-id` | body | `string` | yes | Unique identifier for a project's logical API Definition. |
407
+ | `--generator` | body | `string` | yes | Generator implementation selected by a Target. This is configuration, not identity; several Targets may use the same generator. |
408
+ | `--state` | body | `string` | no | Default: "active". |
409
+ | `--edition` | body | `string` | no | Default: "2026-08-24". |
410
+ | `--release-channel` | body | `string` | no | Default: "stable". |
411
+ | `--proposed-version` | body | `string` | no | Optional larger or prerelease SemVer for the next reviewed release. |
412
+ | `--config` | body | `json` | no | Target-specific overrides merged over Project.config. GraphQL settings are rejected here and belong to the Definition. |
413
+ | `--deliveries` | body | `array` | no | — |
414
+ | `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated account and operation; account-less generation uses a hashed network identity. Retrying the same method, path, query, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write. |
415
+
416
+ Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
417
+
418
+ ```sh
419
+ typeship targets create prj_4f8k2m7x9q1v6b3n --name example --definition-id def_2p8m4q7k1v9d6h3c --generator typescript-sdk
495
420
  ```
496
421
 
497
- </details>
422
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
423
+
424
+ Read the full command contract with `typeship docs targets create --json`.
498
425
 
499
- ### `client.targets.retrieve(targetId)`
426
+ ### `typeship targets retrieve <target_id> [flags]`
500
427
 
501
428
  Retrieve a Target
502
429
 
@@ -504,53 +431,41 @@ Retrieve a Target
504
431
 
505
432
  Safety: **read** · Authentication: **required**
506
433
 
507
- | Parameter | In | Type | Required | Description |
434
+ | Argument or flag | In | Type | Required | Description |
508
435
  | --- | --- | --- | --- | --- |
509
- | `targetId` | path | `TargetId` | yes | — |
436
+ | `<target_id>` | path | `string` | yes | — |
510
437
 
511
- Returns: `TargetResponse`
512
- Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
513
-
514
- <details>
515
- <summary>Wire arguments (CLI and MCP)</summary>
516
-
517
- ```json
518
- {
519
- "target_id": "tgt_5m8q2v7k1p9d4h6c"
520
- }
438
+ ```sh
439
+ typeship targets retrieve tgt_5m8q2v7k1p9d4h6c
521
440
  ```
522
441
 
523
- </details>
442
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
443
+
444
+ Read the full command contract with `typeship docs targets retrieve --json`.
524
445
 
525
- ### `client.targets.delete(targetId)`
446
+ ### `typeship targets delete <target_id> [flags]`
526
447
 
527
448
  Delete an unused Target
528
449
 
529
450
  `DELETE /targets/{target_id}`
530
451
 
531
- Targets with Generation or release history, or an active release candidate, must be disabled instead.
532
-
533
452
  Safety: **destructive** · Authentication: **required**
534
453
 
535
- | Parameter | In | Type | Required | Description |
536
- | --- | --- | --- | --- | --- |
537
- | `targetId` | path | `TargetId` | yes | — |
538
-
539
- Returns: `DeletedTarget`
540
- Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `ConflictError` (409), `RateLimitedError` (429)
454
+ Targets with Generation or release history, or an active release candidate, must be disabled instead.
541
455
 
542
- <details>
543
- <summary>Wire arguments (CLI and MCP)</summary>
456
+ | Argument or flag | In | Type | Required | Description |
457
+ | --- | --- | --- | --- | --- |
458
+ | `<target_id>` | path | `string` | yes | — |
544
459
 
545
- ```json
546
- {
547
- "target_id": "tgt_5m8q2v7k1p9d4h6c"
548
- }
460
+ ```sh
461
+ typeship targets delete tgt_5m8q2v7k1p9d4h6c --force
549
462
  ```
550
463
 
551
- </details>
464
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
465
+
466
+ Read the full command contract with `typeship docs targets delete --json`.
552
467
 
553
- ### `client.targets.update(targetId, body)`
468
+ ### `typeship targets update <target_id> [flags]`
554
469
 
555
470
  Update a Target, its Deliveries, or its next reviewed version
556
471
 
@@ -558,27 +473,28 @@ Update a Target, its Deliveries, or its next reviewed version
558
473
 
559
474
  Safety: **write** · Authentication: **required**
560
475
 
561
- | Parameter | In | Type | Required | Description |
476
+ | Argument or flag | In | Type | Required | Description |
562
477
  | --- | --- | --- | --- | --- |
563
- | `targetId` | path | `TargetId` | yes | — |
564
-
565
- Body: `TargetUpdateRequest` (required)
566
-
567
- Returns: `TargetResponse`
568
- Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `ConflictError` (409), `UnprocessableEntityError` (422), `RateLimitedError` (429)
569
-
570
- <details>
571
- <summary>Wire arguments (CLI and MCP)</summary>
572
-
573
- ```json
574
- {
575
- "target_id": "tgt_5m8q2v7k1p9d4h6c"
576
- }
478
+ | `<target_id>` | path | `string` | yes | — |
479
+ | `--name` | body | `string` | no | — |
480
+ | `--state` | body | `string` | no | — |
481
+ | `--edition` | body | `string` | no | — |
482
+ | `--release-channel` | body | `string` | no | — |
483
+ | `--proposed-version` | body | `string` | no | — |
484
+ | `--config` | body | `json` | no | Target-specific overrides merged over Project.config. GraphQL settings are rejected here and belong to the Definition. |
485
+ | `--deliveries` | body | `array` | no | — |
486
+
487
+ Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
488
+
489
+ ```sh
490
+ typeship targets update tgt_5m8q2v7k1p9d4h6c
577
491
  ```
578
492
 
579
- </details>
493
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
494
+
495
+ Read the full command contract with `typeship docs targets update --json`.
580
496
 
581
- ### `client.targets.listReleases(targetId, params)`
497
+ ### `typeship targets list-releases <target_id> [flags]`
582
498
 
583
499
  List immutable releases for a Target
584
500
 
@@ -586,27 +502,21 @@ List immutable releases for a Target
586
502
 
587
503
  Safety: **read** · Authentication: **required**
588
504
 
589
- | Parameter | In | Type | Required | Description |
505
+ | Argument or flag | In | Type | Required | Description |
590
506
  | --- | --- | --- | --- | --- |
591
- | `targetId` | path | `TargetId` | yes | — |
592
- | `limit` | query | `number` | no | Maximum number of resources to return. |
593
- | `cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same account, operation, filters, and ordering that issued it. |
594
-
595
- Returns: `PagePromise<TargetRelease>` — auto-paginating (`for await` walks every page)
596
- Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
507
+ | `<target_id>` | path | `string` | yes | — |
508
+ | `--limit` | query | `number` | no | Maximum number of resources to return. Default: 20. |
509
+ | `--cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same account, operation, filters, and ordering that issued it. |
597
510
 
598
- <details>
599
- <summary>Wire arguments (CLI and MCP)</summary>
600
-
601
- ```json
602
- {
603
- "target_id": "tgt_5m8q2v7k1p9d4h6c"
604
- }
511
+ ```sh
512
+ typeship targets list-releases tgt_5m8q2v7k1p9d4h6c
605
513
  ```
606
514
 
607
- </details>
515
+ Output: JSON with `items` and `hasMore`; when another page exists, `nextPage` contains its arguments and `nextCommand` contains the command to fetch it. Use `--all` to stream every item from every page as NDJSON.
516
+
517
+ Read the full command contract with `typeship docs targets list-releases --json`.
608
518
 
609
- ### `client.targets.retrieveRelease(targetReleaseId)`
519
+ ### `typeship targets retrieve-release <target_release_id> [flags]`
610
520
 
611
521
  Retrieve an immutable Target release
612
522
 
@@ -614,173 +524,136 @@ Retrieve an immutable Target release
614
524
 
615
525
  Safety: **read** · Authentication: **required**
616
526
 
617
- | Parameter | In | Type | Required | Description |
527
+ | Argument or flag | In | Type | Required | Description |
618
528
  | --- | --- | --- | --- | --- |
619
- | `targetReleaseId` | path | `TargetReleaseId` | yes | — |
529
+ | `<target_release_id>` | path | `string` | yes | — |
620
530
 
621
- Returns: `TargetReleaseResponse`
622
- Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
623
-
624
- <details>
625
- <summary>Wire arguments (CLI and MCP)</summary>
626
-
627
- ```json
628
- {
629
- "target_release_id": "rel_7m2q8v4k1p9d5h6c"
630
- }
531
+ ```sh
532
+ typeship targets retrieve-release rel_7m2q8v4k1p9d5h6c
631
533
  ```
632
534
 
633
- </details>
535
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
536
+
537
+ Read the full command contract with `typeship docs targets retrieve-release --json`.
634
538
 
635
539
  ## generations
636
540
 
637
- ### `client.generations.retrieve(generationId)`
541
+ ### `typeship generations retrieve <generation_id> [flags]`
638
542
 
639
543
  Retrieve a generation
640
544
 
641
545
  `GET /generations/{generation_id}`
642
546
 
643
- Includes the generated files when the generation succeeded.
644
-
645
547
  Safety: **read** · Authentication: **required**
646
548
 
647
- | Parameter | In | Type | Required | Description |
648
- | --- | --- | --- | --- | --- |
649
- | `generationId` | path | `GenerationId` | yes | — |
650
-
651
- Returns: `GenerationResponse`
652
- Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
549
+ Includes the generated files when the generation succeeded.
653
550
 
654
- <details>
655
- <summary>Wire arguments (CLI and MCP)</summary>
551
+ | Argument or flag | In | Type | Required | Description |
552
+ | --- | --- | --- | --- | --- |
553
+ | `<generation_id>` | path | `string` | yes | — |
656
554
 
657
- ```json
658
- {
659
- "generation_id": "gen_7h2p5d9c3m8w1k6q"
660
- }
555
+ ```sh
556
+ typeship generations retrieve gen_7h2p5d9c3m8w1k6q
661
557
  ```
662
558
 
663
- </details>
559
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
664
560
 
665
- ### `client.generations.retrieveFile(generationId, params)`
561
+ Read the full command contract with `typeship docs generations retrieve --json`.
562
+
563
+ ### `typeship generations retrieve-file <generation_id> [flags]`
666
564
 
667
565
  Fetch one file from a generation
668
566
 
669
567
  `GET /generations/{generation_id}/file`
670
568
 
671
- Raw file content, for generations whose target was too large to inline (files_omitted true). The generation's files_index lists valid paths.
672
-
673
569
  Safety: **read** · Authentication: **required**
674
570
 
675
- | Parameter | In | Type | Required | Description |
676
- | --- | --- | --- | --- | --- |
677
- | `generationId` | path | `GenerationId` | yes | — |
678
- | `path` | query | `string` | yes | Repo-relative path inside the generated package. |
679
-
680
- Returns: `string`
681
- Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
571
+ Raw file content, for generations whose target was too large to inline (files_omitted true). The generation's files_index lists valid paths.
682
572
 
683
- <details>
684
- <summary>Wire arguments (CLI and MCP)</summary>
573
+ | Argument or flag | In | Type | Required | Description |
574
+ | --- | --- | --- | --- | --- |
575
+ | `<generation_id>` | path | `string` | yes | — |
576
+ | `--path` | query | `string` | yes | Repo-relative path inside the generated package. |
685
577
 
686
- ```json
687
- {
688
- "generation_id": "gen_7h2p5d9c3m8w1k6q",
689
- "path": "openapi.yaml"
690
- }
578
+ ```sh
579
+ typeship generations retrieve-file gen_7h2p5d9c3m8w1k6q --path openapi.yaml
691
580
  ```
692
581
 
693
- </details>
582
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
583
+
584
+ Read the full command contract with `typeship docs generations retrieve-file --json`.
694
585
 
695
586
  ## definitionRevisions
696
587
 
697
- ### `client.definitionRevisions.list(definitionId, params)`
588
+ ### `typeship definition-revisions list <definition_id> [flags]`
698
589
 
699
590
  List Definition Revisions
700
591
 
701
592
  `GET /definitions/{definition_id}/revisions`
702
593
 
703
- Immutable snapshots of the complete resolved document graph this Definition observed, newest first. Content is available from the revision and document endpoints and is never embedded in a list response.
704
-
705
594
  Safety: **read** · Authentication: **required**
706
595
 
707
- | Parameter | In | Type | Required | Description |
708
- | --- | --- | --- | --- | --- |
709
- | `definitionId` | path | `DefinitionId` | yes | — |
710
- | `limit` | query | `number` | no | Maximum number of resources to return. |
711
- | `cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same account, operation, filters, and ordering that issued it. |
712
-
713
- Returns: `PagePromise<DefinitionRevision>` — auto-paginating (`for await` walks every page)
714
- Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
596
+ Immutable snapshots of the complete resolved document graph this Definition observed, newest first. Content is available from the revision and document endpoints and is never embedded in a list response.
715
597
 
716
- <details>
717
- <summary>Wire arguments (CLI and MCP)</summary>
598
+ | Argument or flag | In | Type | Required | Description |
599
+ | --- | --- | --- | --- | --- |
600
+ | `<definition_id>` | path | `string` | yes | — |
601
+ | `--limit` | query | `number` | no | Maximum number of resources to return. Default: 20. |
602
+ | `--cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same account, operation, filters, and ordering that issued it. |
718
603
 
719
- ```json
720
- {
721
- "definition_id": "def_2p8m4q7k1v9d6h3c"
722
- }
604
+ ```sh
605
+ typeship definition-revisions list def_2p8m4q7k1v9d6h3c
723
606
  ```
724
607
 
725
- </details>
608
+ Output: JSON with `items` and `hasMore`; when another page exists, `nextPage` contains its arguments and `nextCommand` contains the command to fetch it. Use `--all` to stream every item from every page as NDJSON.
609
+
610
+ Read the full command contract with `typeship docs definition-revisions list --json`.
726
611
 
727
- ### `client.definitionRevisions.retrieve(definitionRevisionId)`
612
+ ### `typeship definition-revisions retrieve <definition_revision_id> [flags]`
728
613
 
729
614
  Retrieve a Definition Revision
730
615
 
731
616
  `GET /definition_revisions/{definition_revision_id}`
732
617
 
733
- Metadata for one immutable resolved document graph. Fetch its canonical content or individual source documents from the content endpoints.
734
-
735
618
  Safety: **read** · Authentication: **required**
736
619
 
737
- | Parameter | In | Type | Required | Description |
738
- | --- | --- | --- | --- | --- |
739
- | `definitionRevisionId` | path | `DefinitionRevisionId` | yes | — |
740
-
741
- Returns: `DefinitionRevisionResponse`
742
- Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
620
+ Metadata for one immutable resolved document graph. Fetch its canonical content or individual source documents from the content endpoints.
743
621
 
744
- <details>
745
- <summary>Wire arguments (CLI and MCP)</summary>
622
+ | Argument or flag | In | Type | Required | Description |
623
+ | --- | --- | --- | --- | --- |
624
+ | `<definition_revision_id>` | path | `string` | yes | — |
746
625
 
747
- ```json
748
- {
749
- "definition_revision_id": "drev_6m1q8v4k2p9d7h3c"
750
- }
626
+ ```sh
627
+ typeship definition-revisions retrieve drev_6m1q8v4k2p9d7h3c
751
628
  ```
752
629
 
753
- </details>
630
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
754
631
 
755
- ### `client.definitionRevisions.retrieveContent(definitionRevisionId)`
632
+ Read the full command contract with `typeship docs definition-revisions retrieve --json`.
633
+
634
+ ### `typeship definition-revisions retrieve-content <definition_revision_id> [flags]`
756
635
 
757
636
  Retrieve a Definition Revision's canonical content
758
637
 
759
638
  `GET /definition_revisions/{definition_revision_id}/content`
760
639
 
761
- Returns the exact canonical resolved content identified by the revision's graph digest, suitable for saving or piping into a diff.
762
-
763
640
  Safety: **read** · Authentication: **required**
764
641
 
765
- | Parameter | In | Type | Required | Description |
766
- | --- | --- | --- | --- | --- |
767
- | `definitionRevisionId` | path | `DefinitionRevisionId` | yes | — |
768
-
769
- Returns: `string`
770
- Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
642
+ Returns the exact canonical resolved content identified by the revision's graph digest, suitable for saving or piping into a diff.
771
643
 
772
- <details>
773
- <summary>Wire arguments (CLI and MCP)</summary>
644
+ | Argument or flag | In | Type | Required | Description |
645
+ | --- | --- | --- | --- | --- |
646
+ | `<definition_revision_id>` | path | `string` | yes | — |
774
647
 
775
- ```json
776
- {
777
- "definition_revision_id": "drev_6m1q8v4k2p9d7h3c"
778
- }
648
+ ```sh
649
+ typeship definition-revisions retrieve-content drev_6m1q8v4k2p9d7h3c
779
650
  ```
780
651
 
781
- </details>
652
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
782
653
 
783
- ### `client.definitionRevisions.retrieveDocumentContent(definitionRevisionId, documentId)`
654
+ Read the full command contract with `typeship docs definition-revisions retrieve-content --json`.
655
+
656
+ ### `typeship definition-revisions retrieve-document-content <definition_revision_id> <document_id> [flags]`
784
657
 
785
658
  Retrieve one source document from a Definition Revision
786
659
 
@@ -788,104 +661,83 @@ Retrieve one source document from a Definition Revision
788
661
 
789
662
  Safety: **read** · Authentication: **required**
790
663
 
791
- | Parameter | In | Type | Required | Description |
664
+ | Argument or flag | In | Type | Required | Description |
792
665
  | --- | --- | --- | --- | --- |
793
- | `definitionRevisionId` | path | `DefinitionRevisionId` | yes | — |
794
- | `documentId` | path | `DefinitionDocumentId` | yes | — |
795
-
796
- Returns: `string`
797
- Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
798
-
799
- <details>
800
- <summary>Wire arguments (CLI and MCP)</summary>
666
+ | `<definition_revision_id>` | path | `string` | yes | — |
667
+ | `<document_id>` | path | `string` | yes | — |
801
668
 
802
- ```json
803
- {
804
- "definition_revision_id": "drev_6m1q8v4k2p9d7h3c",
805
- "document_id": "doc_8q2m5v1k9p4d7h3c"
806
- }
669
+ ```sh
670
+ typeship definition-revisions retrieve-document-content drev_6m1q8v4k2p9d7h3c doc_8q2m5v1k9p4d7h3c
807
671
  ```
808
672
 
809
- </details>
673
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
674
+
675
+ Read the full command contract with `typeship docs definition-revisions retrieve-document-content --json`.
810
676
 
811
677
  ## account
812
678
 
813
- ### `client.account.retrieve()`
679
+ ### `typeship account retrieve [flags]`
814
680
 
815
681
  The account behind the presented credentials
816
682
 
817
683
  `GET /me`
818
684
 
819
- Returns the account that owns the presented API key. This is also the
820
- identity endpoint the generated typeship CLI's `whoami` calls.
821
-
822
685
  Safety: **read** · Authentication: **required**
823
686
 
824
- Returns: `Account`
825
- Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `RateLimitedError` (429)
826
-
827
- <details>
828
- <summary>Wire arguments (CLI and MCP)</summary>
687
+ Returns the account that owns the presented API key. This is also the
688
+ identity endpoint the generated typeship CLI's `whoami` calls.
829
689
 
830
- ```json
831
- {}
690
+ ```sh
691
+ typeship account retrieve
832
692
  ```
833
693
 
834
- </details>
694
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
695
+
696
+ Read the full command contract with `typeship docs account retrieve --json`.
835
697
 
836
698
  ## apiKeys
837
699
 
838
- ### `client.apiKeys.list(params)`
700
+ ### `typeship api-keys list [flags]`
839
701
 
840
702
  List API keys
841
703
 
842
704
  `GET /api_keys`
843
705
 
844
- Keys are never returned in full — only their identity and last four. Creation stays in the console deliberately: a leaked key that can mint more keys is a leaked account.
845
-
846
706
  Safety: **read** · Authentication: **required**
847
707
 
848
- | Parameter | In | Type | Required | Description |
849
- | --- | --- | --- | --- | --- |
850
- | `limit` | query | `number` | no | Maximum number of resources to return. |
851
- | `cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same account, operation, filters, and ordering that issued it. |
852
-
853
- Returns: `PagePromise<ApiKey>` — auto-paginating (`for await` walks every page)
854
- Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `RateLimitedError` (429)
708
+ Keys are never returned in full — only their identity and last four. Creation stays in the console deliberately: a leaked key that can mint more keys is a leaked account.
855
709
 
856
- <details>
857
- <summary>Wire arguments (CLI and MCP)</summary>
710
+ | Argument or flag | In | Type | Required | Description |
711
+ | --- | --- | --- | --- | --- |
712
+ | `--limit` | query | `number` | no | Maximum number of resources to return. Default: 20. |
713
+ | `--cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same account, operation, filters, and ordering that issued it. |
858
714
 
859
- ```json
860
- {}
715
+ ```sh
716
+ typeship api-keys list
861
717
  ```
862
718
 
863
- </details>
719
+ Output: JSON with `items` and `hasMore`; when another page exists, `nextPage` contains its arguments and `nextCommand` contains the command to fetch it. Use `--all` to stream every item from every page as NDJSON.
720
+
721
+ Read the full command contract with `typeship docs api-keys list --json`.
864
722
 
865
- ### `client.apiKeys.revoke(apiKeyId)`
723
+ ### `typeship api-keys revoke <api_key_id> [flags]`
866
724
 
867
725
  Revoke an API key
868
726
 
869
727
  `DELETE /api_keys/{api_key_id}`
870
728
 
871
- Idempotent: revoking an already-revoked key returns the same body, so a rotation script that re-runs does not have to special-case having already succeeded. An OAuth member may revoke a key they created; an organization admin may revoke any key. Organization API keys retain account-wide authority.
872
-
873
729
  Safety: **destructive** · Authentication: **required**
874
730
 
875
- | Parameter | In | Type | Required | Description |
876
- | --- | --- | --- | --- | --- |
877
- | `apiKeyId` | path | `string` | yes | — |
878
-
879
- Returns: `ApiKeyResponse`
880
- Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
731
+ Idempotent: revoking an already-revoked key returns the same body, so a rotation script that re-runs does not have to special-case having already succeeded. An OAuth member may revoke a key they created; an organization admin may revoke any key. Organization API keys retain account-wide authority.
881
732
 
882
- <details>
883
- <summary>Wire arguments (CLI and MCP)</summary>
733
+ | Argument or flag | In | Type | Required | Description |
734
+ | --- | --- | --- | --- | --- |
735
+ | `<api_key_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via api_keys_list). IDs come from api_keys_list. |
884
736
 
885
- ```json
886
- {
887
- "api_key_id": "api_key_123"
888
- }
737
+ ```sh
738
+ typeship api-keys revoke api_key_123 --force
889
739
  ```
890
740
 
891
- </details>
741
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
742
+
743
+ Read the full command contract with `typeship docs api-keys revoke --json`.