Reference · Steward
The Steward's command line and local API
Every command the Steward takes in a terminal, with its options, and the local addresses its page answers for scripts.
- Article
- 1310
- Applies to
- Steward 0.35.0
- Last reviewed
- For
- For developers
Running a command#
Every command is run with the Node.js that Castellan installed, and the Steward's cli.ts:
node $HOME\.steward\app\src\cli.ts <command>In a Command Prompt, write %USERPROFILE% in place of $HOME. An option it doesn't know is refused, so a mistyped --yes never merges.
Versions and vouching#
| Command | What it does |
|---|---|
claim-version <repo> --branch <b> --for "<what>" | Hands out the next free version for that work. --minor for a minor step, --by <who>, --json. See Versions claimed up front. |
release-version <repo> <version> | Gives a claimed version back. |
claims | Lists the versions claimed and not yet landed. --json for scripts. |
vouch | Runs the tests at this clone's HEAD and, when they pass, vouches for the commit on GitHub. vouch <number> names the pull request. See Vouching, and pull requests the Steward opens. |
<repo> is a repository's id, its name, or owner/name.
Merging and releasing#
| Command | What it does |
|---|---|
round | One round now, as Run now does, on duty or not, looking at every repository. |
merge --team | Lists your team's open pull requests, with their checks and whether they merge. |
merge --yes --team | Merges the ones that are ready, in the repositories where merging is allowed, then does what each asks for after. |
release | Releases each repository whose branch has a version with no release yet. |
staff | The Your repositories table, in text. --json for scripts; --no-fetch to use what it last saw. |
--employees a,b limits round, merge and release to the repositories with those ids.
Duty and its page#
| Command | What it does |
|---|---|
start | On duty, and its page up: Castellan's Start. |
stop | Off duty: Castellan's Stop. The page stays up. |
open | Makes sure its page is up, without changing duty. |
shutdown | Ends its page's process. |
status | Exits 0 when on duty and working, 3 when not. --json prints what Castellan reads. |
serve | Runs the page in this window. |
Installing#
| Command | What it does |
|---|---|
install | Installs the release it's run from. --no-start installs without starting it; --dry-run says what it would do. |
uninstall | Ends its page, deletes its sign-in task and removes the program. --purge removes its data too, with its work folder. --dry-run says what it would do. |
allow-update <version> | Allows a version that was rolled back to be installed again. See The Steward's alarms. |
Castellan installs and updates the Steward for you: you won't usually need these.
The local API#
The page answers only to its own host names, at http://steward.localhost:19494/. Reading needs nothing; its buttons need the token from the page itself.
| Address | What it answers |
|---|---|
GET /api/ping | Its version, whether it's on duty (running), a one-line summary, and busy while a round or button runs. |
GET /api/alarms | The open alarms, as Castellan reads them. |
GET /api/versions | The versions claimed, as claims lists them. |
GET /api/tested | For each repository, the last 20 commits whose tests passed here, newest first. |
Related articles
Is this page right?
If something on it is wrong or out of date, tell us and we'll fix the page.
Still stuck? Write to support@castellan-software.com and mention article 1310. Every version of Steward, and what changed in it, is in its release notes.