Repository navigation
π― Overview
TokenPressureSandbox is a lightweight CLI tool that analyzes prompt token counts and maps them against common LLM context limits (e.g., 4k, 8k, 32k).
This release includes:
- β
Token counter using OpenAI-compatible tokenizer (
tiktoken) - β Model context pressure visualization (Safe / Approaching / Truncates)
- β CSV output for programmatic analysis
- β
Plaintext
.report.txtgeneration for human-readable logs - β
Portable
.batlauncher
No setup hell. Just install dependencies, drop your prompt, and run.
π» Usage
pip install -r requirements.txt
python sandbox.py test_prompt.txt --save-report
Or just run:
run_token_sandbox.bat
π Files Included
sandbox.py β main script
test_prompt.txt β demo prompt
token_pressure_output.csv β auto-generated results
token_pressure_report.txt β optional summary (with --save-report)
requirements.txt β dependencies
run_token_sandbox.bat β launch from anywhere
README.md, USAGE.txt β documentation
π οΈ Designed to pair with PromptPressure, run locally in LM Studio, or integrate into any prompt QA pipeline.