@greatwait/cli
v0.1.0-alpha.3
Published
The Greatwait command line: sign in, create a destination and a one-shot schedule, and wait for the callback, over the public API.
Maintainers
Readme
@greatwait/cli
The Greatwait command line. Install it, sign in, and reach a first callback against a receiver you control.
npm install --global @greatwait/cli
greatwait login --api-url https://api.greatwait.dev
greatwait journeyWhat it is
A thin executable over the public API — the same operations @greatwait/api-client
exposes and the same contracts the OpenAPI document publishes. It adds no
endpoint, no retry policy and no behaviour of its own: anything you can do here
you can do with curl, and anything you cannot do with curl you cannot do
here.
Signing in
greatwait login uses OAuth: it registers itself with the service, opens your
browser, and receives the answer on a loopback port it has already bound.
Nothing is configured — the endpoints come from the origin's own published
metadata.
greatwait login # opens a browser
greatwait login --no-browser # prints the address to open yourselfFor automation, use a scoped API credential created in the dashboard. It is never taken as a command-line argument, because an argument is visible to every other process on the machine and is written to your shell history:
printf %s "$GREATWAIT_API_KEY" | greatwait login --api-keyor export GREATWAIT_API_KEY and skip signing in altogether.
Credentials are stored per API origin in your platform's configuration directory, readable by you and nobody else. A staging credential is never presented to production, because the two are separate entries rather than one current context.
First value
greatwait journey prints the published first-value sequence — the same nine
steps the website and the quickstarts walk — with the command for each one.
greatwait destinations create --url https://your-receiver.example.com/greatwait
greatwait schedules create --endpoint ep_… --in 30s --data '{"greeting":"first value"}'
greatwait occurrences wait sch_… occ_…
greatwait attempts list sch_… occ_…Output and exit codes
--json is a versioned machine shape, not a serialization of the human text.
The exit status is a class rather than a code per failure:
| code | meaning |
| ---: | ---------------------------------------------------------------------- |
| 0 | it worked |
| 1 | a defect in this command |
| 2 | the command line was wrong |
| 3 | no usable credential — greatwait login |
| 4 | the credential may not do this |
| 5 | the request was refused on its merits |
| 6 | the service could not answer now; the identical request may work later |
| 7 | a deadline passed |
| 130 | interrupted |
The service's own problem code is preserved in --json and in the message, so a
script that already branches on one against the REST surface does not need a
second vocabulary.
License
MIT
