git clone <repository>
cd toastykey
npm install
npm testtoastykey/
├── src/
│ ├── db/ # SQLite database layer
│ ├── proxy/ # HTTP proxy server
│ ├── mcp/ # MCP server for Claude Code
│ ├── vault/ # Encrypted key storage
│ ├── tracker/ # Cost calculation engine
│ ├── triggers/ # Anomaly detection (Session 3)
│ ├── utils/ # Shared utilities
│ ├── config.js # Configuration
│ └── index.js # Main entry point
├── pricing/ # Provider pricing data (JSON)
├── tests/ # Test suite
└── docs/ # Documentation
- Create pricing file:
pricing/provider-name.json - Add proxy handler:
src/proxy/handlers/provider-name.js - Register route in
src/proxy/index.js - Add tests
- Update documentation
- Use clear, descriptive variable names
- Add comments for complex logic
- Follow existing patterns in the codebase
- Write tests for new features
# Run all tests
npm test
# Run specific test
npm test -- pricing.test.js
# Integration tests
./tests/run-integration.shFollow conventional commits:
feat: add new featurefix: fix bugdocs: update documentationtest: add testschore: maintenance tasks
Always end with:
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Create a feature branch
- Make your changes with tests
- Run the full test suite
- Update documentation
- Submit PR with clear description
Open an issue or reach out to the maintainers.