Getting started
Requirements
Section titled “Requirements”- npm 11.15.0 or later (for
npm trustwith--allow-publish/--allow-stage-publish) - Node 22.14.0 or later
trustci checks both versions before doing anything else. On a real run an older
version is an error; with --dry-run it is only a warning, because npm is not
invoked.
# Preview the commands without running anything (recommended first step)npx trustci --dry-run --provider github --repo me/repo --file release.yml --allow-publish
# Actually register (asks for confirmation unless -y)npx trustci --provider github --repo me/repo --file release.yml --allow-publish
# List current trusted publishers for every public packagenpx trustci listRun trustci from the repository root: workspace detection starts from the current directory.
trust is an optional leading subcommand: trustci --provider … and
trustci trust --provider … are equivalent.
At least one of --allow-publish / --allow-stage-publish is required.
What a run does
Section titled “What a run does”- Finds the workspace packages and drops private ones and those filtered out by
--only/--exclude(see Workspace detection). - With
--dry-run, prints onenpm trust <provider> <package> …command per package and stops. The registry is not checked and nothing is executed. The last line is thetrustcicommand for the real run: the flags you passed, without--dry-run, plus-y. Values trustci resolved itself (CircleCI UUIDs,--vcs-origin) are left out and resolved again, and--circle-tokenis dropped so the token is never printed. - Otherwise, checks each package with
npm view <package> version. Packages that are not published yet (registry 404) are skipped with a warning. Any other registry error stops the run. - Lists the packages it will register and asks
Proceed? [y/N]. Pass-yto skip the prompt; it is required when stdin is not a terminal (for example in CI). - Runs
npm trustfor each package. The exit code is non-zero if any package failed.
trustci list
Section titled “trustci list”npx trustci list # every public workspace packagenpx trustci list my-package # one packagenpx trustci list --dry-run # print the npm trust list commands onlyRuns npm trust list <package> for each target.
Agent skill
Section titled “Agent skill”The repository ships an Agent Skill at
skills/trustci/SKILL.md
that teaches coding agents (Claude Code, Codex, Cursor, …) to run trustci safely:
dry-run first, then a real run only after you confirm. Install it with the
skills CLI:
npx skills add hideokamoto/trustciThis site also serves it over HTTP at /skill.md, listed in the
Agent Skills discovery index, and an
llms.txt for the whole documentation.
Next steps
Section titled “Next steps”- Provider-specific flags: GitHub Actions, GitLab CI/CD, CircleCI
- All options
- How packages are found