Purpose
Enable basic asset CRUD operations in Snipe-IT through a lightweight Rust CLI.
Current state
Last touched: 2025-02-15. Functionality and completeness: Legacy CLI remains available but is superseded by the newer snipeit_api tool.
Next step
Add baseline automated tests to cover critical flows; Add CI pipeline for build/test/lint; Document deployment/runtime environment (or add Dockerfile); Document interfaces (CLI flags, API endpoints, file formats); Add structured logging and basic health checks.
Interfaces
Inputs- TOML config, CSV files, Snipe-IT API
- Configuration files (TOML/YAML/JSON/INI/CONF)
Outputs- API responses and CSV exports
- CSV files
Reality to Action trace
Reality IngestionNot in scope.
Canonical StorageNot in scope.
Automation EnginesNot in scope.
Human InterfacesContributes in this stage.
Operational AdoptionContributes in this stage.
Core workflow
TBD. Document the 5-10 steps that define the core workflow.
Artifacts
- CSV headers match Snipe-IT asset fields
Operational notes
Constraints and scars
- Legacy CLI targets a subset of endpoints and lacks the newer CSV import/export refinements.
Reliability posture
Failure modes and safe behavior: API errors abort the run; partial CSV processing may leave mixed results. Idempotency / retries / batching behavior: No built-in retries.
Observability
- Metrics/health checks: None documented
- Logs: stdout/stderr from CLI; no structured logging documented.
Security and privacy
Config files contain API tokens; keep them out of git and protect local copies.
Ownership
OwnersJosh Barton
UsersJosh Barton (owner)
snipeit_api/Old Version
Architecture & Major Components
High-level diagram (text):
- CLI -> CSV parser -> API client -> Snipe-IT operations
CLI
→CSV parser
→API client
→Snipe-IT operations
Entry points: src/main.rs
Top-level folders: src
Key abstractions: CLI command parsing, CSV IO, HTTP client wrapper
Setup / Build / Run
- Build system(s): Cargo.
- Provide a TOML config file with API URL and token; supply CSV files for bulk operations.