[package]
name = "patchloom"
version = "0.4.0"
edition = "2024"
rust-version = "1.95"
description = "Structured file editing library and CLI for AI agents: parser-backed JSON/YAML/TOML edits, AST-aware code operations via tree-sitter, multi-file batching, markdown operations, and MCP server"
license = "MIT OR Apache-2.0"
repository = "https://github.com/patchloom/patchloom"
homepage = "https://patchloom.github.io/patchloom/"
readme = "README.md"
keywords = ["mcp", "ai-agents", "tree-sitter", "yaml", "toml"]
categories = ["command-line-utilities", "development-tools", "config", "text-processing", "parser-implementations"]
authors = ["Sebastien Tardif"]
exclude = [
"benches/",
"tests/agent/",
"demo/",
"assets/",
"docs/",
".github/",
"REPO-SETUP.md",
"MAINTAINERS.md",
"AGENTS.md",
"CLAUDE.md",
"GEMINI.md",
"Makefile",
"dist-workspace.toml",
]
[features]
default = ["cli", "mcp", "ast"]
cli = ["dep:clap", "dep:clap_complete", "dep:anstream", "dep:ec4rs", "dep:ignore", "dep:globset"]
mcp = ["rmcp", "tokio", "schemars"]
ast = [
"dep:tree-sitter-lib",
"dep:tree-sitter-language",
"dep:tree-sitter-rust",
"dep:tree-sitter-python",
"dep:tree-sitter-javascript",
"dep:tree-sitter-typescript",
"dep:tree-sitter-go",
"dep:tree-sitter-bash",
"dep:tree-sitter-hcl",
"dep:tree-sitter-toml-ng",
"dep:tree-sitter-yaml",
"dep:tree-sitter-json",
"dep:tree-sitter-xml",
"dep:tree-sitter-proto",
"dep:tree-sitter-c",
"dep:tree-sitter-cpp",
"dep:tree-sitter-java",
"dep:tree-sitter-ruby",
"dep:tree-sitter-c-sharp",
"dep:tree-sitter-swift",
"dep:tree-sitter-kotlin-sg",
"dep:tree-sitter-php",
]
full = ["cli", "mcp", "ast"]
[dependencies]
clap = { version = "4", features = ["derive"], optional = true }
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", features = ["preserve_order"] }
serde_yaml_ng = "0.10"
yaml-edit = "0.2"
toml_edit = { version = "0.25", features = ["serde"] }
ignore = { version = "0.4", optional = true }
globset = { version = "0.4", optional = true }
memchr = "2"
regex = "1"
similar = { version = "3", features = ["text"] }
strsim = "0.11"
tempfile = "3"
anyhow = "1"
anstream = { version = "1", optional = true }
ec4rs = { version = "1", optional = true }
clap_complete = { version = "4", optional = true }
rmcp = { version = "1", features = ["server", "transport-io", "macros"], optional = true }
tokio = { version = "1", features = ["rt-multi-thread", "io-util", "io-std", "macros"], optional = true }
schemars = { version = "1", optional = true }
tree-sitter-lib = { package = "tree-sitter", version = "0.26", optional = true }
tree-sitter-language = { version = "0.1", optional = true }
tree-sitter-rust = { version = "0.24", optional = true }
tree-sitter-python = { version = "0.25", optional = true }
tree-sitter-javascript = { version = "0.25", optional = true }
tree-sitter-typescript = { version = "0.23", optional = true }
tree-sitter-go = { version = "0.25", optional = true }
tree-sitter-bash = { version = "0.25", optional = true }
tree-sitter-hcl = { version = "1.1", optional = true }
tree-sitter-toml-ng = { version = "0.7", optional = true }
tree-sitter-yaml = { version = "0.7", optional = true }
tree-sitter-json = { version = "0.24", optional = true }
tree-sitter-xml = { version = "0.7", optional = true }
tree-sitter-proto = { version = "0.4", optional = true }
tree-sitter-c = { version = "0.24", optional = true }
tree-sitter-cpp = { version = "0.23", optional = true }
tree-sitter-java = { version = "0.23", optional = true }
tree-sitter-ruby = { version = "0.23", optional = true }
tree-sitter-c-sharp = { version = "0.23", optional = true }
tree-sitter-swift = { version = "0.7", optional = true }
tree-sitter-kotlin-sg = { version = "0.4", optional = true }
tree-sitter-php = { version = "0.24", optional = true }
[target.'cfg(unix)'.dependencies]
libc = "0.2"
[dev-dependencies]
assert_cmd = "2"
expectrl = "0.7"
predicates = "3"
proptest = "1"
rmcp = { version = "1", features = ["client", "transport-io", "transport-child-process"] }
tokio = { version = "1", features = ["full"] }
[[bin]]
name = "patchloom"
required-features = ["cli"]
[lints.rust]
unsafe_code = "deny"
[lints.clippy]
manual_string_new = "warn"
implicit_clone = "warn"
cloned_instead_of_copied = "warn"
redundant_else = "warn"
semicolon_if_nothing_returned = "warn"
[package.metadata.cargo-machete]
ignored = ["tree-sitter-language"]
[package.metadata.docs.rs]
targets = []
[profile.release]
strip = true
lto = "thin"
codegen-units = 1
panic = "abort"
[profile.dist]
inherits = "release"