worktrunk 0.2.0

A Git worktree manager for trunk-based development
Documentation
[workspace]
members = ["tests/helpers/setup-select-test", "tests/helpers/dev-detach"]
# Include dev-detach so `cargo test` builds its binary (via its integration test)
default-members = [".", "tests/helpers/dev-detach"]

[package]
name = "worktrunk"
version = "0.2.0"
edition = "2024"
rust-version = "1.89"
build = "build.rs"
repository = "https://github.com/max-sixty/worktrunk"
description = "A Git worktree manager for trunk-based development"
license = "MIT OR Apache-2.0"
default-run = "wt"

[package.metadata.release]
# Allow releases from any branch (GitHub Actions uses detached HEAD)
allow-branch = ["*"]
consolidate-commits = true

[features]
# Disabled: Enable testing for shells that require extra installation steps (nushell, powershell, elvish, xonsh, oil)
# tier-2-integration-tests = []
# Enable syntax highlighting for bash commands in output (requires tree-sitter)
# This is optional to avoid C compilation issues on some platforms
default = ["syntax-highlighting"]
syntax-highlighting = ["dep:tree-sitter", "dep:tree-sitter-bash", "dep:tree-sitter-highlight"]
# Enable shell/PTY integration tests (requires bash, zsh, fish installed on system)
# Includes: shell wrapper tests, PTY-based approval prompts, TUI select, progressive rendering
# These tests can cause nextest to suspend due to terminal foreground pgrp issues.
# When enabled, run with NEXTEST_NO_INPUT_HANDLER=1 to avoid suspension.
# See CLAUDE.md "Nextest Terminal Suspension" section for details.
shell-integration-tests = []

[lib]
name = "worktrunk"
path = "src/lib.rs"

[[bin]]
name = "wt"
path = "src/main.rs"

# Also install as git-wt so `git wt <command>` works as a git subcommand.
# Primarily useful on Windows where `wt` conflicts with Windows Terminal.
# See: https://github.com/max-sixty/worktrunk/issues/133
[[bin]]
name = "git-wt"
path = "src/git_wt.rs"


[dependencies]
anyhow = "1.0"
anstream = "0.6"
anstyle = "1.0"
ansi-str = "0.9"
color-print = "0.3"
askama = { version = "0.14", default-features = false, features = ["derive", "std"] }
chrono = "0.4"
clap = { version = "4.5", features = ["derive", "unstable-ext", "wrap_help"] }
clap_complete = { version = "4.5", features = ["unstable-dynamic"] }
config = { version = "0.15", features = ["convert-case"] }
crossbeam-channel = "0.5"
crossterm = "0.29"
env_logger = "0.11"
indexmap = { version = "2.12", features = ["serde"] }
etcetera = "0.11"
log = "0.4"
minijinja = "2.13"
rayon = "1.11"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
shell-escape = "0.1"
shellexpand = "3.1"
strum = { version = "0.27", features = ["derive"] }
synoptic = "2"
terminal_size = "0.4"
toml = { version = "0.9", features = ["preserve_order"] }
toml_edit = "0.23"
# All three crates must use the same version series to avoid native library conflicts
# These are optional dependencies controlled by the "syntax-highlighting" feature.
# To build without C compilation requirements, use: cargo install worktrunk --no-default-features
tree-sitter = { version = "0.25", optional = true }
tree-sitter-bash = { version = "0.25", optional = true }
tree-sitter-highlight = { version = "0.25", optional = true }
unicode-width = "0.2"
wrap-ansi = "0.1"
osc8 = "0.1.0"
home = "0.5.12"
dirs = "6.0"
normalize-path = "0.2.1"
which = "7.0"
# Cross-platform path canonicalization that avoids Windows verbatim paths (\\?\)
# which external tools like git cannot handle. On Unix, it's a no-op wrapper.
dunce = "1.0"

[target.'cfg(unix)'.dependencies]
skim = "0.20"
nix = { version = "0.29", default-features = false, features = ["process", "signal"] }
signal-hook = { version = "0.3.17", default-features = false, features = ["iterator"] }

[target.'cfg(unix)'.dev-dependencies]
# Match version used by portable-pty to avoid compiling multiple nix versions
nix = { version = "0.29", default-features = false, features = ["signal"] }

[build-dependencies]
vergen-gitcl = { version = "1.0.8", features = ["build"] }

[dev-dependencies]
insta = { version = "1.44.3", features = ["yaml", "redactions", "filters"] }
insta-cmd = "0.6"
rstest = "0.26"
tempfile = "3.23"
toml = "0.9"
criterion = "0.8"
portable-pty = "0.9"
regex = "1.12"
vt100 = "0.16"
ansi-to-html = "0.2.2"

[[bench]]
name = "completion"
harness = false

[[bench]]
name = "list"
harness = false

[lints.rust]
unsafe_code = "forbid"

# The profile that 'dist' will build with
[profile.dist]
inherits = "release"
lto = "thin"