Files
anvil/Cargo.toml
Eric Ratliff 8fe1ef0e27 Refactor CLI, add refresh command, fix port detection, add device tracking
- Remove build/upload/monitor subcommands (projects are self-contained)
- Remove ctrlc dependency (only used by removed monitor watch mode)
- Update next-steps messaging to reference project scripts directly

- Add 'anvil refresh [DIR] [--force]' to update project scripts
  to latest templates without touching user code

- Fix Windows port detection: replace fragile findstr/batch TOML
  parsing with proper comment-skipping logic; add _detect_port.ps1
  helper for reliable JSON-based port detection via PowerShell

- Add .anvil.local for machine-specific config (gitignored)
  - 'anvil devices --set [PORT] [-d DIR]' saves port + VID:PID
  - 'anvil devices --get [-d DIR]' shows saved port status
  - VID:PID tracks USB devices across COM port reassignment
  - Port resolution: -p flag > VID:PID > saved port > auto-detect
  - Uppercase normalization for Windows COM port names

- Update all .bat/.sh templates to read from .anvil.local
- Remove port entries from .anvil.toml (no machine-specific config in git)
- Add .anvil.local to .gitignore template
- Expand 'anvil devices' output with VID:PID, serial number, and
  usage instructions
2026-02-18 20:32:42 -06:00

54 lines
870 B
TOML

[package]
name = "anvil"
version = "1.0.0"
edition = "2021"
authors = ["Eric Ratliff <eric@nxlearn.net>"]
description = "Arduino project generator and build tool - forges clean embedded projects"
license = "MIT"
[lib]
name = "anvil"
path = "src/lib.rs"
[[bin]]
name = "anvil"
path = "src/main.rs"
[dependencies]
# CLI framework
clap = { version = "4.4", features = ["derive", "cargo"] }
# Filesystem
dirs = "5.0"
# Configuration
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
toml = "0.8"
# Embedded templates
include_dir = "0.7"
# Error handling
anyhow = "1.0"
thiserror = "1.0"
# Colors
colored = "2.1"
# Process / which
which = "5.0"
home = "=0.5.9"
# Temp dirs (for refresh command)
tempfile = "3.13"
[dev-dependencies]
assert_cmd = "2.0"
predicates = "3.1"
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
strip = true