Skip to content

Local vs CI

Contractual is git-agnostic by design. The CLI never commits, tags, or pushes. You control your git history. The GitHub Action handles release automation.


Other tools in this space take different approaches:

ToolGit OperationsPhilosophy
LernaCLI does commits, tags, pushCLI owns the workflow
ChangesetsCLI creates intent files onlyGitHub Action executes
ContractualCLI is git-agnosticClear separation of concerns

Contractual takes the Changesets approach: the CLI is purely for local work. All git and GitHub operations happen through the Action.


The CLI handles spec governance and change description:

CommandPurpose
contractual lintValidate specs against linters
contractual diffShow changes vs. last snapshot
contractual breakingCheck for breaking changes (CI gate)
contractual changesetCreate a changeset file
contractual versionBump versions and update files
contractual statusShow current versions and pending changes

All of these commands read and write local files only. None of them:

  • Run git commit
  • Run git tag
  • Run git push
  • Create GitHub Releases
  • Post PR comments

The CLI explicitly avoids git operations:

OperationWho does it
Commit changesYou (git commit)
Push to remoteYou (git push)
Create PRsYou (GitHub UI or gh pr create)
Create git tagsGitHub Action
Create GitHub ReleasesGitHub Action
Post PR commentsGitHub Action

The Action handles automation and GitHub integration:

ModeTriggerWhat it does
pr-checkPR opened/updatedLint, diff, post comment
releasePush to mainCreate Version PR if changesets exist
releaseVersion PR mergedCreate tags and GitHub Releases

No surprise git operations. When you run contractual version, it updates files but doesn’t commit them. You decide when to commit.

Works with any git workflow:

  • Trunk-based development
  • Gitflow
  • GitHub Flow
  • Any branching strategy

The CLI doesn’t care about your branches or merge strategy.

All version changes go through PRs:

  • Feature PRs contain spec changes + changesets
  • Version PRs contain version bumps + changelog updates

Both are reviewable before merge.

You own your git history:

  • Squash commits? Up to you.
  • Rebase before merge? Your choice.
  • Amend commit messages? Go ahead.

Contractual doesn’t fight your git preferences.


Because git workflows vary. Some teams squash, some merge, some rebase. Some require signed commits. Some have pre-commit hooks. The CLI can’t know your git requirements, so it stays out of the way.

Can I use Contractual without the GitHub Action?

Section titled “Can I use Contractual without the GitHub Action?”

Yes. The CLI works standalone:

Terminal window
# Local workflow without Action
contractual lint
contractual diff
contractual changeset
# ... manually commit and push ...
contractual version
# ... manually commit, tag, and push ...

You lose the automation (PR comments, Version PRs, auto-tags), but the core governance works.

That’s not Contractual’s philosophy. If you want a tool that commits, consider Lerna or semantic-release. Contractual is for teams who want to control their git history.

Does the Action require special permissions?

Section titled “Does the Action require special permissions?”

The Action needs:

  • contents: write - to create Version PRs and tags
  • pull-requests: write - to post comments

For creating Version PRs, it needs a Personal Access Token (PAT) to trigger downstream workflows.