Skip to main content

Configuration

Configuration

Stable

Configure default versioning behavior through config.toml.

Commandcusty version

Category

Versioning

Quick Command

custy version update

configurationversion

Overview​

Custy allows projects to define their preferred versioning behavior inside config.toml.

These settings become the default values used whenever the corresponding command-line options are omitted.


Version Configuration

config.toml Properties

Configuration fields controlling default version generation.

PropertyTypeDescriptionDefaultRequired
strategysemver | pep440 | commitizen | date | gitcountDefault versioning strategy used to generate the next version.semverNo
bumpauto | patch | minor | majorDefault bump level when generating the next version.autoNo

Version File

Version metadata detection is configured separately.

The generated and recommended configuration is:

Terminal
bash
version_file = "auto"

Custy detects an existing Python version module, static pyproject.toml version, or Node.js package.json version. Projects without supported metadata remain valid and use tag-only versioning. Set an explicit path only when the project owns a different metadata file; explicit paths must exist.


Default Versioning Strategy

When no strategy is specified on the command line, Custy uses the configured default strategy.

Example:

Terminal
bash
[tool.custy.cli.versioning]

strategy = "semver"

If the strategy configuration is omitted, Custy can automatically detect an appropriate strategy based on the project type.


Default Bump Level

The configured bump level determines how the next version should be generated.

Available values include:

  • auto
  • patch
  • minor
  • major

Example:

Terminal
bash
bump = "auto"

The exact behavior depends on the selected versioning strategy.



Configuration Resolution

Custy resolves version settings using the following priority:

  1. Command-line arguments.
  2. Project configuration (config.toml).
  3. Automatic project detection (when applicable).
  4. Built-in defaults.

This layered approach provides predictable behavior while allowing individual commands to override project defaults.


What's Next?

Continue to Versioning Strategies to learn how each supported strategy generates version numbers and when each approach is most appropriate.