@sr-connect/cli 0.1.1 → 0.1.3
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 +6 -1
- package/dist/index.js +15 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
A CLI to work with [ScriptRunner Connect](https://scriptrunnerconnect.com). Run it with nothing but a verb and it asks for what it needs. Run it with flags and `--agent` and it never asks, which is what scripts and AI agents want.
|
|
4
4
|
|
|
5
|
+
Driving it from an agent? Install the companion [skill](https://www.skills.sh/adaptavist/scriptrunner-skills/sr-connect), which teaches the product behind the commands. See [For agents](#for-agents).
|
|
6
|
+
|
|
5
7
|
```sh
|
|
6
8
|
npx @sr-connect/cli # no install; lists the command groups
|
|
7
9
|
npm i -g @sr-connect/cli # then: sr-connect
|
|
8
10
|
npx @sr-connect/cli cli get-readme # prints this document from the installed copy
|
|
9
11
|
```
|
|
10
12
|
|
|
11
|
-
Node 22 or newer. An older runtime gets one warning line per run and most commands still work, but live log streaming does not. Every example below spells the CLI as `npx @sr-connect/cli
|
|
13
|
+
Node 22 or newer. An older runtime gets one warning line per run and most commands still work, but live log streaming does not. Every example below spells the CLI as `npx @sr-connect/cli`. For daily use install it globally: `npx` spends most of a second resolving the package before the CLI starts, the installed `sr-connect` answers in a fraction of that, and a global install refers to itself as `sr-connect` in its own hints rather than telling you to run `npx`.
|
|
12
14
|
|
|
13
15
|
## Getting started
|
|
14
16
|
|
|
@@ -57,6 +59,8 @@ Commands that change something the clone contains also keep the clone current. S
|
|
|
57
59
|
|
|
58
60
|
**Pass `--agent` on every call, or set `SR_CONNECT_CLI_AGENT=1` once.** That is the whole of it: `--agent` switches off every question on its own, so anything missing becomes exit 2 instead of a hang, and it tells the API that an agent is driving. You do not also need `--no-prompts`, which is the same prompt switch without the declaration and is there for scripts that are not agents. `--agent` does not change what stdout looks like — pair it with `--raw`, or set `SR_CONNECT_CLI_RAW=1` beside the other one.
|
|
59
61
|
|
|
62
|
+
**There is a companion skill.** [`sr-connect`](https://www.skills.sh/adaptavist/scriptrunner-skills/sr-connect) teaches an agent the product behind the commands: what a workspace, connector, event listener and scheduled trigger are, what the runtime can and cannot do, and how to drive this CLI to build any of it. Install it wherever your agent reads skills from. This document is orientation for the CLI, and `--explain` answers for a single verb; the skill is the part neither of them covers.
|
|
63
|
+
|
|
60
64
|
- **Ask a verb what it takes before calling it — this is the fastest thing in the CLI, and it is where the per-verb documentation lives.** Every verb takes `--explain`: on stdout the example `--input` body where the verb has one and `{}` where it does not, and on stderr a sentence per parameter plus notes on everything the parameters do not cover — outcomes, exit codes, the shape of the document it answers with. Exit 0, no credentials, no scope, no request. This document does not repeat any of it, so `--explain` is the answer rather than a second opinion. Run it before a flags-only call too: a body key is a flag under another spelling, and the rule says which (`version` is `--package-version`, `eventListenerTypeId` is `--listener-type-id`, `waitForResponse` is `--wait`).
|
|
61
65
|
|
|
62
66
|
```sh
|
|
@@ -545,6 +549,7 @@ npx @sr-connect/cli event-listener update --explain
|
|
|
545
549
|
- `workspace get` — Get a single workspace
|
|
546
550
|
- `workspace update` — Update a workspace
|
|
547
551
|
- `workspace delete` — Delete a workspace
|
|
552
|
+
- `workspace check-package-versions` — Check the packages a workspace depends on against the versions NPM publishes
|
|
548
553
|
|
|
549
554
|
### workspace-lock (wl)
|
|
550
555
|
|