SkillAgentSearch skills...

Tbdflow

tbdflow is a command-line tool designed to streamline and safeguard your Git workflow for Trunk-Based Development.

Install / Use

/learn @cladam/Tbdflow

README

<div align="center"> <p align="center"> <img src="assets/tbdflow-logo.png" alt="tbdflow logo" width="200"/> </p> <p align="center"> <i><b>Keep your code flowing</b></i><br/> </p>

Crates.io Downloads

</div>

The problem

Many teams say they practise Trunk-Based Development but in day2day reality things deviate:

  • Commit messages become inconsistent. Everyone formats them a little differently.
  • Branches that were meant to live for hours stick around for days.
  • Merging back to main turns into a manual sequence people half-remember.
  • Two people change the same file and nobody notices until a push fails.
  • The Definition of Done exists, but it lives in a document no one looks at during the work.

None of this breaks the build immediately, but it makes integration harder than it needs to be, and the trunk stops feeling safe to work in.

The solution

tbdflow is a lightweight CLI that codifies your team's Trunk-Based workflow and makes the safe path the easiest path.

cargo install tbdflow

tbdflow is a lightweight command-line tool that helps you (and your team) stay in flow with Trunk-Based Development ( TBD).

A terminal running the command tbdflow

What it does

| Pain point | How tbdflow helps | |--------------------------------|----------------------------------------------------------------------------| | Inconsistent commits | tbdflow commit enforces Conventional Commits with built-in linting | | Long-lived branches | tbdflow branch + tbdflow complete with stale-branch warnings | | "Did I pull before pushing?" | tbdflow sync + auto-rebase before every commit to main | | Pulling a broken trunk | tbdflow sync pre-flight CI check warns before pulling a red build | | Merge conflicts you didn't see | tbdflow radar shows who else is touching the same files, before you push |

Philosophy

This tool is built around a specific philosophy of Trunk-Based Development:

  • Main is the default. The commit command is your everyday go-to. It automates pulling the latest changes, committing, and pushing directly to main, promoting small, frequent integrations.
  • Branches are the exception. While branches are supported, they’re treated as short-lived exceptions and not the norm.
  • Cleanup is automatic. The complete command enforces branch short-livedness by merging and automatically tagging ( release) and deleting completed branches, helping keep your repo tidy.
  • Conventional Commits encouraged. Commit messages follow Conventional Commits for clarity and consistency.
  • Collaboration is visible. The radar command shows who else is touching the same files, turning potential merge conflicts into conversations before they become problems.

Why not just use Git?

This CLI isn’t a replacement for Git. You’ll still reach for raw git when doing advanced work like rebasing, cherry-picking, or running git bisect.

This tool is as a workflow assistant, tbdflow encapsulates a repeatable, opinionated process to support your day-to-day development.

It offers three main benefits:

  1. Consistency across the team Everyone follows the same steps for common tasks. Commits, branches, and releases are handled the same way every time, keeping your Git history clean and predictable.

  2. Less to remember No need to recall the exact flags or sequences (like pull --rebase, merge --no-ff, or commit message formats). The CLI handles that, so you can stay focused on writing code.

  3. It supports "the TBD way" This tool makes the preferred approach easy by providing a smooth, safe, and efficient path for 80% of everyday tasks. For the other 20%, you can always use Git directly.

Installation

You need Rust and Cargo installed.

Installing from crates.io

The easiest way to install tbdflow is to download it from crates.io. You can do it using the following command:

cargo install tbdflow

If you want to update tbdflow to the latest version, execute the following command:

tbdflow update

Building from source

Alternatively you can build tbdflow from source using Cargo:

git clone https://github.com/cladam/tbdflow.git
cd tbdflow
sudo cargo install --path . --root /usr/local

Monorepo Support

tbdflow is "monorepo-aware." It understands that in a monorepo, you often want commands to be scoped to a specific project or subdirectory.

When you run tbdflow commit, tbdflow sync or tbdflow status from the root of a configured monorepo, the tool will intelligently ignore project subdirectories, making sure you only commit changes to root-level files (like README.md, LICENSE, or CI configuration). When run from within a project subdirectory, the commands are automatically scoped to just that directory (N.B. you need to run tbdflow init from within the subdirectory for this to work).

This is configured in your root .tbdflow.yml file:

# in .tbdflow.yml
monorepo:
enabled: true
  # A list of all directories that are self-contained projects.
  # These will be excluded from root-level commits and status checks.
  project_dirs:
    - "frontend"
    - "backend-api"
    - "infra"

For an overview and to inspect your current configuration, you can run tbdflow info.

Handling Cross-Cutting Changes

For "vertical slice" changes that intentionally touch multiple project directories, you can use the --include-projects flag. This flag overrides the default safety mechanism and stages all changes from all directories, allowing you to create a single, cross-cutting commit.

Interactive Wizard Mode

To make tbdflow even more user-friendly, the core commands (branch, commit, complete, changelog) now feature an interactive "wizard" mode.

If you run one of these commands without providing the required flags, tbdflow will automatically launch a step-by-step guide. This is perfect for new users who are still learning the workflow, or for complex commits where you want to be sure you've covered all the options.

For power users, the original flag-based interface is still available for a faster, scripted experience.

Configuration

tbdflow is configurable via two optional files in the root of your repository. To get started quickly, run tbdflow init to generate default versions of these files.

.tbdflow.yml This file controls the core workflow of the tool. You can customise:

  • The name of your main branch (e.g. main, trunk).
  • Allowed branch types and their prefixes (e.g feat/, chore/)
  • A strategy for handling issue references ("branch-name" or "commit-scope")
  • The threshold for stale branch warnings.
  • Automatic tagging formats.
  • Commit message linting rules.

Note: main_branch_name configures which branch is your trunk (typically main or master). tbdflow assumes this branch accepts direct commits. For protected branches, use short-lived feature branches with tbdflow branch.

.dod.yml This file controls the interactive Definition of Done checklist for the commit command.

Features

The Definition of Done (DoD) Check

To move beyond just automating process, tbdflow integrates an optional pre-commit quality check. If a .dod.yml file is present in your repository, the commit command will present an interactive checklist to ensure your work meets the team's agreed-upon standards.

Example .dod.yml:

# .dod.yml in your project root
checklist:
  - "All relevant automated tests pass successfully."
  - "New features or fixes are covered by new tests."
  - "Security implications of this change have been considered."
  - "Relevant documentation (code comments, READMEs) is updated."

If you try to proceed without checking all items, the tool will offer to add a TODO list to your commit message footer, ensuring the incomplete work is tracked directly in your Git history.

Commit Message Linting

If a .tbdflow.yml file is present and contains a lint section, the commit command will automatically validate your commit message against the configured rules before the DoD check. This provides immediate feedback on stylistic and structural conventions.

Default linting rules:

lint:
  conventional_commit_type:
    enabled: true
    allowed_types:
      - build
      - chore
      - ci
      - docs
      - feat
      - fix
      - perf
      - refactor
      - revert
      - style
      - test
  issue_key_missing:
    enabled: false
    pattern: ^[A-Z]+-\d+$
  scope:
    enabled: true
    enforce_lowercase: true
  subject_line_rules:
    max_length: 72
    enforce_lowercase: true
    no_period: true
  body_line_rules:
    max_line_length: 80
    leading_blank: true

Global options

| Flag | Description | Required | |-----------|----------------------------------------------------------|----------| | --verbose | Prints the underlying Git commands as they are executed. | No | | --dry-run | Simulate the command without making any changes. | No |

Commands

1. commit

This is the primary command for daily work.

Commits staged changes using a Conventional Commits message. This command is context-aware:

  • On main: It runs the full TBD workflow: pulls the latest changes with rebase, commits, and pushes.
  • On any other branch: It simply commits and p

Related Skills

View on GitHub
GitHub Stars40
CategoryDevelopment
Updated1d ago
Forks2

Languages

Rust

Security Score

95/100

Audited on Mar 23, 2026

No findings