anthropic-tools 1.0.1

A Rust library for interacting with the Anthropic API
Documentation
[config]
default_to_workspace = false

[tasks.set-env]
env_files = [".env"]

# ============ BUILD TASKS ============
[tasks.build-tools]
description = "Build the project."
extend = "set-env"
script = ["cargo build --release"]

# ============ LINT TASKS ============
[tasks.format-all]
dependencies = ["sort-cargo-toml", "clippy", "reformat"]
description = "Format all code in the project."

[tasks.sort-cargo-toml]
description = "Sort the Cargo.toml files in the project."
install_crate = "taplo-cli"
script = "taplo fmt --option reorder_keys=true"

[tasks.reformat]
description = "Reformat the code using rustfmt."
script = "cargo fmt -- --emit files"

[tasks.clippy]
description = "Run clippy linter."
script = "cargo clippy --all-targets --all-features -- -D warnings"

# ============ TEST TASKS ============
[tasks.nextest]
dependencies = ["build-tools"]
description = "Run all tests in the project."
extend = "set-env"
install_crate = "cargo-nextest"
script = "cargo nextest run --status-level all --test-threads=1"

[tasks.test-api]
dependencies = ["build-tools"]
description = "Run API integration tests (requires ANTHROPIC_API_KEY)."
extend = "set-env"
install_crate = "cargo-nextest"
script = "cargo nextest run --test api_integration --run-ignored ignored-only --status-level all"

[tasks.test-all]
dependencies = ["build-tools"]
description = "Run all tests including API integration tests."
extend = "set-env"
install_crate = "cargo-nextest"
script = [
  "cargo nextest run --status-level all --test-threads=1",
  "cargo nextest run --test api_integration --run-ignored ignored-only --status-level all",
  "cargo test --doc",
]