Skip to content

Supported Eco‐Systems and Version File Formats

ComfyHome™ edited this page May 25, 2026 · 2 revisions

ComfyGit reads version fields from many manifest types, bumps them during release workflows, and can auto-detect common files when you run cg init.

For the full list of format values in config, see Format identifiers.


Auto-Detection During cg init

ComfyGit scans the repository root for fixed filenames, root-level globs, and common monorepo / Electron subpaths (see Nested manifests).

File / pattern Format Ecosystem Default key path
Cargo.toml toml Rust package.version
Project.toml toml Julia project.version
pyproject.toml toml Python (PEP 621 / Poetry) project.version
package.json json Node.js / TypeScript version
go.mod go_mod Go comment
pubspec.yaml yaml Dart / Flutter version
Gemfile ruby Ruby (Bundler) version
*.gemspec ruby Ruby gem version
DESCRIPTION r_description R package Version
CMakeLists.txt cmake C/C++ (CMake) project
Makefile makefile Make VERSION
build.gradle gradle Groovy / Android version
build.gradle.kts gradle Kotlin / Android version
project.clj clojure Clojure (Leiningen) defproject
Package.swift swift_package Swift (SwiftPM) version
mix.exs elixir_mix Elixir version
build.sbt scala_sbt Scala (sbt) version
configure.ac autoconf C/C++ (Autotools) AC_INIT
*.cabal cabal Haskell (Cabal) version
*.csproj xml C# / .NET PropertyGroup.Version
*.plist (e.g. Info.plist) plist iOS / macOS CFBundleShortVersionString
setup.cfg ini Python (setuptools) metadata.version
pom.xml xml Java / Maven project.version
Chart.yaml / Chart.yml yaml Helm version
composer.json json PHP (Composer) version
deno.json json Deno version
META.json json Perl (CPAN meta) version
package.yaml yaml Haskell (hpack) version
shard.yml yaml Crystal version
meson.build meson C/C++ (Meson) project
Makefile.PL makefile_pl Perl (ExtUtils::MakeMaker) VERSION
MODULE.bazel bazel Bazel (Bzlmod) module
VERSION / version plain Any (simple file) (empty)
*.nimble nimble Nim version
*.rockspec rockspec Lua (LuaRocks) version

If several manifests exist, cg init asks which one to use.

Nested manifests during cg init

Beyond the root table above, cg init also looks for manifests under:

  • App-style folders: app/, electron/, frontend/, web/, client/, desktop/, mobile/, ui/, server/, api/, …
  • Workspace children: packages/<name>/, apps/<name>/, libs/<name>/, crates/<name>/, modules/<name>/, services/<name>/

Supported nested manifest names include package.json, Cargo.toml, pyproject.toml, go.mod, composer.json, pubspec.yaml, and Gradle build files.

Examples: electron/package.json, packages/web/package.json, app/Cargo.toml.

Hidden directories (node_modules, target, .git, …) are skipped. Deep trees (e.g. packages/a/b/c/package.json) are not scanned — add those paths manually in project settings.

Still not auto-detected: settings.gradle(.kts), GNUmakefile, legacy WORKSPACE (non-Bzlmod), arbitrary deep paths.


Format Identifiers in Config

format value Display name Typical files
auto Auto Detect at read time
json JSON .json, package.json, composer.json, deno.json, META.json
toml TOML .toml, Cargo.toml, pyproject.toml
yaml YAML .yaml, .yml, Chart.yaml, pubspec.yaml, package.yaml, shard.yml
xml XML .xml, .csproj, pom.xml
ini INI setup.cfg
plain Plain version file VERSION, version.txt, …
go_mod Go module go.mod
ruby Ruby Gemfile, *.gemspec
r_description R DESCRIPTION DESCRIPTION
gradle Gradle build.gradle, build.gradle.kts
cmake CMake CMakeLists.txt
makefile Makefile Makefile, GNUmakefile
plist Property list *.plist
clojure Clojure project.clj
swift_package Swift package Package.swift
elixir_mix Elixir mix mix.exs
scala_sbt Scala sbt build.sbt
cabal Haskell Cabal *.cabal
autoconf Autoconf configure.ac
meson Meson meson.build
nimble Nim *.nimble
rockspec LuaRocks *.rockspec
makefile_pl Perl Makefile.PL Makefile.PL
bazel Bazel Bzlmod MODULE.bazel

Supported File Formats (read / write rules)

JSON (json)

  • Key path: dot-separated (version, package.version, …)
  • Example (package.json):
{
  "name": "my-app",
  "version": "1.2.3"
}

Also works for composer.json (PHP), deno.json, and META.json (Perl) — same key paths as Node (version, …).

TOML (toml)

  • Key path: dot-separated (package.version, project.version, workspace.package.version, …)
  • Rust (Cargo.toml):
[package]
version = "1.2.3"
  • Python (pyproject.toml):
[project]
version = "1.2.3"
  • Julia (Project.toml):
[project]
version = "1.2.3"

YAML (yaml)

  • Key path: dot-separated (version, appVersion, …)
  • Helm (Chart.yaml), Dart (pubspec.yaml), Haskell hpack (package.yaml), Crystal (shard.yml)

XML (xml)

  • Key path: dot-separated element paths (not attributes)
  • If the first segment matches the document root tag (e.g. project in pom.xml), it is skipped automatically
  • Maven (pom.xml): project.version or version
  • .NET (*.csproj): PropertyGroup.Version, PropertyGroup.PackageVersion

INI (ini)

  • Key path: section.key (e.g. metadata.version for setup.cfg)

Plain (plain)

  • Files: VERSION, version, version.txt, .version, version.md
  • Key path: leave empty — the file body is the version string

Go module (go_mod)

Go has no standard in-file module version. ComfyGit supports:

Key path Meaning
comment // version 1.2.3 (inserted after module if missing)
require.<module> Version in a require directive for that module path

Ruby (ruby)

Key path Meaning
version s.version = '…' in .gemspec, or VERSION = '…' / version = '…' in Gemfile
gem.<name> Version in gem 'name', '1.2.3'

Many Gemfiles only reference a gemspec — use the .gemspec target in that case.

R DESCRIPTION (r_description)

Package: mypkg
Version: 1.2.3

Key path: Version

Gradle (gradle)

Key path Example
version version = "1.2.3" or Groovy version "1.2.3"
versionName Android versionName = "1.2.3"
versionCode Android build number (numeric)

CMake (cmake)

Key path Example
project project(demo VERSION 1.2.3)
VERSION, PROJECT_VERSION, … set(VERSION 1.2.3)

Makefile (makefile)

Key path Example
VERSION VERSION := 1.2.3 or VERSION = 1.2.3

GNUmakefile works the same when configured manually.

Property list (plist)

Key path Use
CFBundleShortVersionString User-facing app version
CFBundleVersion Build number
<key>CFBundleShortVersionString</key>
<string>1.2.3</string>

Clojure (clojure)

Key path Example
defproject (defproject demo "1.2.3" …)
version :version "1.2.3"

Swift package (swift_package)

Key path Example
version let version = "1.2.3"
packageVersion let packageVersion = "1.2.3"
comment // version: 1.2.3

Elixir mix (elixir_mix)

Key path Example
version version: "1.2.3" in the project/0 keyword list

Scala sbt (scala_sbt)

Key path Example
version version := "1.2.3"
ThisBuild / version ThisBuild / version := "1.2.3"

Haskell Cabal (cabal)

Top-level field lines only (not folded multi-line Cabal fields):

version: 1.2.3

Key path: version

Meson (meson)

Key path Example
project project('demo', 'c', version: '1.2.3')
version Same as project — first version: line in meson.build
project('demo', 'c',
  version : '1.2.3',
)

Nim (.nimble, nimble)

Key path Example
version version = "1.2.3"

LuaRocks (.rockspec, rockspec)

Key path Example
version version = "1.2.3-1"

Perl Makefile.PL (makefile_pl)

Key path Example
VERSION VERSION => '1.2.3' in WriteMakefile(...)
version version => '1.2.3' or $VERSION = '1.2.3'

Bazel (bazel)

Key path Example
module version = "1.2.3" inside module(...) in MODULE.bazel
version Same as module — first version = "…" line
module(
    name = "demo",
    version = "1.2.3",
)

Autoconf (autoconf)

Key path Example
AC_INIT Second argument of AC_INIT is the version
AC_INIT([myapp], [1.2.3], [bug@example.com])
AC_INIT(myapp, 1.2.3)

TUI Key Path Presets

When you set a target path in the TUI, press Left/Right on the key field to cycle presets (or enable Custom).

File Presets (first = default)
Cargo.toml package.version, workspace.package.version, version
pyproject.toml project.version, tool.poetry.version, version
Project.toml project.version, version
package.json / .json version, package.version, …
.yaml / pubspec.yaml version, appVersion, chart.version
.csproj / .xml PropertyGroup.Version, project.version, version
setup.cfg metadata.version, version
go.mod comment, require. (+ module path)
Gemfile / .gemspec version, gem. (+ name)
DESCRIPTION Version
CMakeLists.txt project, VERSION, PROJECT_VERSION
Makefile VERSION
Gradle scripts version, versionName, versionCode
.plist CFBundleShortVersionString, CFBundleVersion
project.clj defproject, version
Package.swift version, packageVersion, comment
mix.exs version
build.sbt version, ThisBuild / version
*.cabal version, name
configure.ac AC_INIT
meson.build project, version
composer.json / deno.json / META.json version, package.version
package.yaml / shard.yml version
*.nimble / *.rockspec version
Makefile.PL VERSION, version
MODULE.bazel module, version
Plain version files (empty), ., @

Ecosystem Coverage Summary

Ecosystem Manifest(s) Format
Rust Cargo.toml TOML
Julia Project.toml TOML
Node / TypeScript package.json JSON
PHP composer.json JSON
Deno deno.json JSON
Perl META.json, Makefile.PL JSON, Makefile.PL
Bazel MODULE.bazel Bazel
Go go.mod Go module
Python pyproject.toml, setup.cfg TOML, INI
Java / Maven pom.xml XML
C# / .NET *.csproj XML
Kotlin / Android build.gradle.kts Gradle
Groovy / Android build.gradle Gradle
Scala build.sbt Scala sbt
Swift Package.swift Swift package
Elixir mix.exs Elixir mix
Ruby Gemfile, *.gemspec Ruby
R DESCRIPTION R DESCRIPTION
Haskell *.cabal, package.yaml Cabal, YAML
Clojure project.clj Clojure
Dart / Flutter pubspec.yaml YAML
Crystal shard.yml YAML
Nim *.nimble Nimble
Lua *.rockspec LuaRocks rockspec
iOS / macOS Info.plist Plist
Kubernetes / Helm Chart.yaml YAML
C/C++ CMakeLists.txt, Makefile, configure.ac, meson.build CMake, Makefile, Autoconf, Meson
Any VERSION Plain

Manual Targets

Use the project editor (E) or .comfygit/config.toml:

[[projects.targets]]
label = "Android app module"
path = "app/build.gradle.kts"
key_path = "versionName"
format = "gradle"

[[projects.targets]]
label = "Meson"
path = "meson.build"
key_path = "project"
format = "meson"

You can define multiple targets in one project (e.g. package.json + root VERSION).


Format Auto-Detection (format: auto)

  1. Known plain version filenames
  2. Special filenames (go.mod, DESCRIPTION, Package.swift, mix.exs, …)
  3. File extension (.json, .toml, .yaml, .xml, .cfg, .cabal, …)
  4. Probe parsers until one succeeds

Limitations

  • Version values must be readable as strings (YAML numbers are written back as strings when bumped)
  • XML uses nested elements, not attributes
  • Go — use comment or require.<module>; there is no standard module version field in go.mod
  • Ruby Gemfile — needs VERSION = '…', a .gemspec, or gem.<name>
  • Gradle — common top-level assignments only; nested Android blocks may need manual paths
  • Cabal — top-level field: value lines; folded multi-line fields are not supported
  • Plist<key> followed by <string> pairs
  • setup.py inline version= — not auto-detected; use pyproject.toml, setup.cfg, or a manual target
  • Monorepo depthcg init scans one level under common workspace folders; deeper paths need manual targets
  • BazelMODULE.bazel (Bzlmod) only; legacy WORKSPACE files are not parsed
  • Makefile.PLWriteMakefile hash keys and $VERSION; exotic version discovery (e.g. version_from) may need manual config

C/C++ Build Systems

Build system Manifest Format cg init
CMake CMakeLists.txt cmake Yes
Make Makefile makefile Yes
Autotools configure.ac autoconf Yes
Plain VERSION plain Yes
Meson meson.build meson Yes
Bazel Bzlmod MODULE.bazel bazel Yes
Bazel legacy WORKSPACE No
Ninja various No

Requesting More Languages

Open a discussion or issue with the manifest filename, an example file snippet, and how your ecosystem expects versions to be bumped.