Skip to content

Presets

forge ships built-in presets for common project types. Use them with forge init --preset NAME.

Available presets

PresetTools configured
gogofmt, go vet, commit-msg policy
phpecs (PHP-CS-Fixer via ECS), commit-msg policy
nodeprettier, eslint, commit-msg policy
php-nodeecs, prettier, eslint, commit-msg policy
minimalcommit-msg policy only

List presets

sh
forge init --list-presets

go

sh
forge init --preset go

Generated forge.toml includes:

  • gofmt -w on .go files with restage = true
  • go vet ./... with pass_files = false
  • Conventional Commits policy

php

sh
forge init --preset php

Includes:

  • vendor/bin/ecs check --fix on .php files with restage = true
  • Conventional Commits policy

node

sh
forge init --preset node

Includes:

  • prettier --write --ignore-unknown on .js/.ts/.json/.md/.yml/.yaml with restage = true
  • eslint --fix on .js/.jsx/.ts/.tsx/.vue with restage = true
  • Conventional Commits policy with append_ticket_footer = true

php-node

sh
forge init --preset php-node

Combines php and node presets.

minimal

sh
forge init --preset minimal

Includes only the commit-msg hook with Conventional Commits policy.

See also

Released under the MIT License.