Minimal Python control layer for interacting with AI models with explicit cost tracking and enforced secret hygiene.
Built to demonstrate:
- cost-aware AI usage
- deterministic execution
- practical DevSecOps guardrails
-
Per-call cost visibility Surfaces tokens, cost, and running totals
-
Secret-safe by default
.env.localisolation + commit blocking viadetect-secrets -
Pre-commit enforcement Prevents accidental leakage of API keys and sensitive data
-
Structured runtime outputs Logs cost data for inspection and extension
src/ # application logic
config/ # local secrets (.env.local, not committed)
data/ # runtime logs
audit/ # local scan outputs (ignored)
docs/ # documentation
- Secrets never enter version control
- Audit artefacts are quarantined
- Pre-commit scanning blocks unsafe commits
This repo is designed to make accidental leakage structurally difficult, not just discouraged.
python src/main.py "your prompt"A minimal, extensible foundation for:
- AI cost governance
- safe API usage patterns
- lightweight DevSecOps integration
- Requires local
.env.localwith API key - Rotate any exposed keys immediately
- Designed for clarity over completeness