@sorit/cli 0.1.1 → 0.1.2
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 +2 -2
- package/package.json +1 -1
- package/src/cli.ts +0 -2
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ sorit run '<API_ID>' --input @input.json --idempotency-key "$SORIT_REQUEST_KEY"
|
|
|
12
12
|
sorit get '<REQUEST_ID>' --wait
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
Requires Bun 1.2+. The
|
|
15
|
+
Requires Bun 1.2+. The CLI connects to Sorit automatically. Create an API key at https://sorit.dev/app/keys and set `SORIT_API_KEY`. Failures exit with code 1. `run --wait` writes the accepted request ID to stderr before polling, so interrupted waits can be resumed.
|
|
16
16
|
|
|
17
17
|
The CLI is written in TypeScript and runs directly on Bun without a separate build step. Source types cover each command's result, while HTTP response validation checks actual server data. From the repository root, check it independently with `pnpm exec tsc -p packages/cli/tsconfig.json`.
|
|
18
18
|
|
|
@@ -46,4 +46,4 @@ Use `--search` for keyword filtering in English or Chinese. `tools` groups avail
|
|
|
46
46
|
|
|
47
47
|
Calls use your account's credits. `run` sends flat input to `POST /api/v1/run/{api-id}`; `get` reads `GET /api/v1/requests/{request-id}`. Reuse the same idempotency key and input for retries. Paid submissions are never automatically retried; a timeout or invalid submission response may mean the request was accepted, so preserve its identity. A polling timeout does not cancel the request and reports the exact resume command. Keep API keys in the environment; discovery and inspection do not transmit them.
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
Install the [Sorit Skill](https://github.com/sorit-ai/skills) with `npx skills add sorit-ai/skills`. REST reference: https://sorit.dev/en/docs/api/jobs.
|
package/package.json
CHANGED
package/src/cli.ts
CHANGED
|
@@ -83,9 +83,7 @@ function help(command?: CommandName) {
|
|
|
83
83
|
...(!spec ? [section("Commands", rows([...Object.entries(commands).map(([name, value]): [string, string] => [name, value.description]), ["help [command]", "Show help for a command."]]))] : []),
|
|
84
84
|
section("Environment", rows([
|
|
85
85
|
["SORIT_API_KEY", "API key for run, get and balance."],
|
|
86
|
-
["SORIT_URL", "Optional origin override for local deployments."],
|
|
87
86
|
])),
|
|
88
|
-
"API server: https://sorit.dev (default; no configuration required).",
|
|
89
87
|
...(spec?.notes ? [section("Notes", spec.notes.split("\n").map(line => ` ${line}`).join("\n"))] : []),
|
|
90
88
|
section("Examples", (spec?.examples ?? ["sorit discover --tool tiktok", "sorit inspect <api-id>", "sorit run --help"]).map(line => ` ${line}`).join("\n")),
|
|
91
89
|
"Docs: https://sorit.dev/en/docs/integrations",
|