Skip to content
Castellan
Steward's icon

Reference · Steward

Read as

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
Written for Steward 0.35.0. Steward is at 0.35.1 now (1 small release since: what changed).

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#

CommandWhat 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.
claimsLists the versions claimed and not yet landed. --json for scripts.
vouchRuns 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#

CommandWhat it does
roundOne round now, as Run now does, on duty or not, looking at every repository.
merge --teamLists your team's open pull requests, with their checks and whether they merge.
merge --yes --teamMerges the ones that are ready, in the repositories where merging is allowed, then does what each asks for after.
releaseReleases each repository whose branch has a version with no release yet.
staffThe 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#

CommandWhat it does
startOn duty, and its page up: Castellan's Start.
stopOff duty: Castellan's Stop. The page stays up.
openMakes sure its page is up, without changing duty.
shutdownEnds its page's process.
statusExits 0 when on duty and working, 3 when not. --json prints what Castellan reads.
serveRuns the page in this window.

Installing#

CommandWhat it does
installInstalls the release it's run from. --no-start installs without starting it; --dry-run says what it would do.
uninstallEnds 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.

AddressWhat it answers
GET /api/pingIts version, whether it's on duty (running), a one-line summary, and busy while a round or button runs.
GET /api/alarmsThe open alarms, as Castellan reads them.
GET /api/versionsThe versions claimed, as claims lists them.
GET /api/testedFor each repository, the last 20 commits whose tests passed here, newest first.

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.