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.36.139
Last reviewed
For
For developers
Written for Steward 0.36.139. Steward is at 0.36.354 now (40 small releases 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, and the command doesn't run.

The commands that work on your repositories work only while one of the developers' staff is hired in Castellan. While none is, each answers with one line saying so.

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. In a repository that keeps its changelog entries in a changes/ folder, it claims nothing, and names the file to write instead. 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 for your work.

<repo> is a repository's id, its name, or owner/name.

Building and releasing#

There's no command to merge: you merge your own pull requests. See You merge, it builds.

CommandWhat it does
roundOne round now, as Run now does, on duty or not, looking at every repository. Between builds a round only looks.
buildA build now, as at a build time: each repository's newest commit tested once, unless a vouch covers it, and its new version released. Only at a console: it asks you to type build first, and a script or a coding session can't run it.
releaseReleases each repository whose branch has a version with no release yet, at once, as Release on its page does.
staffThe Your repositories table, in text. --json for scripts; --no-fetch to use what it last saw.

--employees a,b limits round, build 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/pipelineThe build times and days, the next build, whether one is under way, and the last one.
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.