Skip to content

feat: Add .gtrconfig file for declarative configuration #34

@K9i-0

Description

@K9i-0

Summary

Add support for a .gtrconfig file that allows all gtr settings to be declared in a single file and committed to the repository.

Motivation

Currently, most settings require running git gtr config commands manually. This creates friction for team usage - each developer must set up hooks, excludes, etc. individually.

While .worktreeinclude (#28) allows sharing copy patterns via the repository, other settings still require manual setup:

Setting Config commands File-based
gtr.copy.include .worktreeinclude
gtr.copy.exclude
gtr.copy.includeDirs / excludeDirs
gtr.hook.postCreate / postRemove
gtr.editor.default / gtr.ai.default

Proposal

A .gtrconfig file that covers all settings:

copy:
  include:
    - "**/.env.example"
    - "*.md"
  exclude:
    - "**/.env"
  includeDirs:
    - node_modules
  excludeDirs:
    - node_modules/.cache

hooks:
  postCreate:
    - "pnpm install"

defaults:
  editor: cursor
  ai: claude

This allows teams to commit configuration and share it across developers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions