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.36.139
- 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, 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#
| 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. 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. |
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 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.
| Command | What it does |
|---|---|
round | One round now, as Run now does, on duty or not, looking at every repository. Between builds a round only looks. |
build | A 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. |
release | Releases each repository whose branch has a version with no release yet, at once, as Release on its page does. |
staff | The 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#
| 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/pipeline | The build times and days, the next build, whether one is under way, and the last one. |
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.