smartcloud command runs the same code as the action on your own machine. Use it to check a config before you push it, convert a v1 config, see what a run would do without doing it, and find out why a repository is not set up right. Nothing it does writes to GitHub.
Install
You need Node 24 or later.- From npm
- From a checkout
From the first v2 release, the CLI and the MCP server are published together as
@resnovas/smartcloud:smartcloud for whichever you use. smartcloud --version prints the version, and smartcloud <command> --help lists a command’s options.
A command that fails prints one line starting smartcloud: on stderr and exits with code 1. Any other result exits with code 0.
validate
.github/smartcloud.yml, .github/smartcloud.yaml and .github/config.json in the current directory.
smartcloud: and exits with code 1.
migrate
.github/config.json) to v2 YAML, and prints a warning for every v1 key it does not carry over. The output starts with a schema hint for editors, and is proven to decode before it is written.
A v2 file given to
migrate is rewritten unchanged. See Migrating from v1 for worked examples.
check-commit
commit-msg hook, so a commit that would fail the pull request check is stopped locally:
.git/hooks/commit-msg
dry-run
Give exactly one of
--pr, --issue or --event.
plan settings
settings section prints no steps. When a run would ignore part of the settings section, such as a merge queue method that conflicts with the rest of the ruleset, the plan lists it after the steps under “Ignored, so not applied”, with the reason.
sync
sync section fails with the config has no sync section. Every file is checked before any is written: one that would land outside the directory, or be written through a symlink inside it, stops the command with nothing written.
doctor
Run it with your own token to check the repository, or with the token a workflow passes to smartcloud to check that token:
uses: of another repository and every secrets.NAME or vars.NAME outside a comment line counts, including one guarded by a condition.
Tokens
dry-run, plan settings, sync and doctor always read GitHub. validate needs a token only to read presets named in extends, so validating a config without presets works offline. When it does need one, it uses GITHUB_TOKEN if set, and otherwise the token of the signed-in GitHub CLI (gh auth token). The token is never printed.