Repository navigation
Scripting
Felipe Inoue edited this page Nov 3, 2026
·
2 revisions
-
Results go to stdout.
crower listwrites the table and nothing else. - Diagnostics go to stderr. Prompts, status lines, warnings and errors.
# Only the list reaches the file
crower list > commands.txt
# The result, with the status lines left behind
greeting="$(crower execute greet)"| Exit | Meaning |
|---|---|
0 |
It happened β or you answered no to a confirmation, because declining is a choice |
1 |
It did not happen; the reason is one line on stderr, prefixed error:
|
crower --no-input delete old-command || exit 1With --no-input, or with stdin closed, a command that needs an answer fails
with a message instead of asking again:
if ! crower --no-input import team.toml; then
echo "import needs a decision; run it by hand" >&2
exit 1
fi--config points a run at another configuration file, so a script does not touch
your personal list:
export CROWER_CI_CONFIG="$PWD/.ci-crower/crower.yaml"
crower --config "$CROWER_CI_CONFIG" create lint "golangci-lint run"
crower --config "$CROWER_CI_CONFIG" execute lint- name: Provision project commands
run: |
crower --config .ci/crower.yaml import .ci/commands.toml --overwrite
crower --config .ci/crower.yaml --no-input execute buildWarning
A command that prompts will not wait under --no-input β it exits 1 with a
message on stderr. Check the exit status; a command that "did nothing" is
usually a declined prompt.
{1}, {2}, β¦ are substituted and quoted before they reach the shell, so a
value containing spaces or ; stays a value:
crower create find "grep -rn {1} {2}"
cr find "TODO" "internal/"Β© 2025 Felipe Inoue Β· crower is MIT licensed Β· third-party notices