[package]
name = "padz"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
description = "An ergonomic, context-aware scratch pad for the terminal — a good Unix citizen"
keywords = ["cli", "notes", "scratchpad", "productivity", "terminal"]
categories = ["command-line-utilities"]
readme = "README.md"

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

[dependencies]
padzapp = { version = "1.4.2", path = "../padzapp" }
chrono = { version = "0.4.42", features = ["serde"] }
clap = { version = "4.5.53", features = ["derive"] }
clapfig = "0.9.2"
clap_complete = { version = "4.5", features = ["unstable-dynamic"] }
console = "0.15"
directories = "6.0.0"
dark-light = "0.2"
once_cell = "1.19"
standout = "6.2.0"
standout-macros = "6.2.0"
standout-dispatch = "6.2.0"
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.9"
terminal_size = "0.4"
unicode-width = "0.2.2"
anyhow = "1.0"

[dev-dependencies]
assert_cmd = "2.0.16"
predicates = "3.1.2"
tempfile = "3.10.1"

# cargo-deb configuration. Driven by `cargo deb -p padz` in CI.
# Completions are generated at install time by the postinst maintainer
# script (it invokes `padz completion --shell X print`) rather than
# shipped as static assets, because clap_complete bakes the absolute
# binary path into the script and we can't know /usr/bin/padz at build
# time for a cross-compiled artifact.
[package.metadata.deb]
maintainer = "Arthur Debert <debert@gmail.com>"
copyright = "2025-2026, Arthur Debert <debert@gmail.com>"
license-file = ["../../LICENSE", "0"]
extended-description = """
padz is a scratch-pad / note-taking CLI that adapts to its context.
Notes are scoped to the current project (via .padz/) or globally, with
automatic discovery, todo tracking, tags, archive/restore, and import/
export. Designed as a good Unix citizen: predictable output, pipes
cleanly, and composes with standard tooling.
"""
section = "utility"
priority = "optional"
depends = "$auto"
assets = [
    # cargo-deb rewrites `target/release/` to `target/<triple>/release/`
    # automatically when `--target` is passed (as CI does), so this path
    # works for both native and cross-compiled builds.
    ["target/release/padz", "usr/bin/", "755"],
    ["../../README.md", "usr/share/doc/padz/README.md", "644"],
    ["../../CHANGELOG.md", "usr/share/doc/padz/CHANGELOG.md", "644"],
]
maintainer-scripts = "debian/"

# CI builds each architecture separately with --target, so cargo-deb
# picks up the binary from target/<triple>/release/. The workspace
# rewrite pattern handles the asset path override.
[package.metadata.deb.variants.amd64]
[package.metadata.deb.variants.arm64]
