[package]
name = "destructive_command_guard"
version = "0.4.2"
edition = "2024"
resolver = "2"
authors = [
"Jeffrey Emanuel <jeff@jeffreyemanuel.dev>",
"Dowwie <dowwie@gmail.com>"
]
description = "A Claude Code hook that blocks destructive commands before they execute"
repository = "https://github.com/Dicklesworthstone/destructive_command_guard"
homepage = "https://github.com/Dicklesworthstone/destructive_command_guard"
license = "MIT"
keywords = ["destructive", "safety", "claude", "hook", "guard"]
categories = ["command-line-utilities", "development-tools"]
readme = "README.md"
rust-version = "1.85"
exclude = [
".github/",
".beads/",
"scripts/",
"*.md",
"!README.md",
]
[[bin]]
name = "dcg"
path = "src/main.rs"
[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.9"
toml = "1.0"
toml_edit = "0.25"
chrono = { version = "0.4", default-features = false, features = ["std", "clock", "serde"] }
fancy-regex = "0.17"
regex = "1.10"
memchr = "2.7"
aho-corasick = "1.1"
smallvec = "1.15.1"
colored = "3.1"
dirs = "6.0"
glob = "0.3"
clap = { version = "4.5", features = ["derive", "env"] }
clap_complete = "4.5"
once_cell = "1.19"
base64 = "0.22"
async-trait = "0.1.89"
rust-mcp-sdk = { version = "0.8.3", default-features = false, features = ["server", "stdio", "macros"] }
tokio = { version = "1.49", features = ["rt-multi-thread"] }
rayon = { version = "1.11", optional = true }
ast-grep-core = "0.40"
ast-grep-language = { version = "0.40", default-features = false, features = [
"tree-sitter-bash",
"tree-sitter-python",
"tree-sitter-javascript",
"tree-sitter-typescript",
"tree-sitter-ruby",
"tree-sitter-go",
"tree-sitter-php",
] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
sha2 = "0.10"
hmac = "0.12"
fs2 = "0.4"
fsqlite = { version = "0.1.1", features = ["fts5"] }
fsqlite-types = "0.1.1"
fsqlite-error = "0.1.1"
ctrlc = "3.5.1"
flate2 = "1.0"
self_update = { version = "0.42", default-features = false, features = ["rustls", "archive-tar", "archive-zip", "compression-flate2"] }
semver = "1.0"
ratatui = { version = "0.30", default-features = false, features = ["crossterm"] }
comfy-table = "7.2"
indicatif = "0.18"
console = "0.16"
inquire = "0.9"
rand = { version = "0.10", default-features = false, features = ["std", "thread_rng"] }
rich_rust = { version = "0.2.0", features = ["full"], optional = true }
[build-dependencies]
vergen-gix = { version = "10.0.0-beta.5", features = ["build", "cargo", "rustc"] }
[dev-dependencies]
assert_cmd = "2.0"
predicates = "3.1"
tempfile = "3.14"
proptest = "1.4"
criterion = { version = "0.8", features = ["html_reports"] }
libc = "0.2"
regex-automata = "0.4"
which = "8.0"
walkdir = "2.5"
[[bench]]
name = "heredoc_perf"
harness = false
[[bench]]
name = "regex_automata_comparison"
harness = false
[profile.release]
opt-level = "z"
lto = true
codegen-units = 1
panic = "abort"
strip = true
[profile.dev]
opt-level = 1
[features]
rayon = ["dep:rayon"]
rich-output = ["dep:rich_rust"]
legacy-output = []
[lints.rust]
[lints.clippy]
all = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
return_self_not_must_use = "allow"
suboptimal_flops = "allow"
too_many_lines = "allow"
manual_string_new = "allow"
field_reassign_with_default = "allow"
missing_const_for_fn = "allow"
redundant_pub_crate = "allow"
cognitive_complexity = "allow"
option_if_let_else = "allow"
significant_drop_tightening = "allow"
iter_without_into_iter = "allow"
map_unwrap_or = "allow"
unused_self = "allow"
must_use_candidate = "allow"
single_match_else = "allow"
unnested_or_patterns = "allow"
match_same_arms = "allow"
needless_pass_by_value = "allow"
similar_names = "allow"
match_wildcard_for_single_variants = "allow"
trivially_copy_pass_by_ref = "allow"
uninlined_format_args = "allow"
if_not_else = "allow"
use_self = "allow"
struct_excessive_bools = "allow"
struct_field_names = "allow"
doc_markdown = "allow"
module_name_repetitions = "allow"
fn_params_excessive_bools = "allow"
needless_for_each = "allow"
items_after_statements = "allow"
cast_possible_truncation = "allow"
cast_sign_loss = "allow"
cast_precision_loss = "allow"
cast_lossless = "allow"
cast_possible_wrap = "allow"
implicit_hasher = "allow"
default_trait_access = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
wildcard_imports = "allow"
manual_let_else = "allow"
too_many_arguments = "allow"
write_literal = "allow"
print_literal = "allow"
many_single_char_names = "allow"
string_add = "allow"
string_add_assign = "allow"
ref_option_ref = "allow"
unused_async = "allow"
redundant_clone = "allow"
derivable_impls = "allow"
single_match = "allow"
len_zero = "allow"
len_without_is_empty = "allow"
doc_link_with_quotes = "allow"