Using temporizer for managing temporary context files
Temporizer creates and manages temporary files from stdin, primarily used for passing context to other commands. It handles file cleanup automatically and provides options for file naming and content formatting.
Create a temporary file from stdin:
echo "data" | temporizer
The command outputs the path to the created temporary file.
--name, -n <string>
--name context-1 → /tmp/temporizer-context-1-<timestamp>--file-prefix, -p <string>
--file-prefix myapp → /tmp/myapp-<name>-<timestamp>--prefix <string>
--prefix "--- Context Start ---"--suffix <string>
--suffix "--- Context End ---"Temporizer includes built-in garbage collection that:
Temporizer is especially useful for providing context to LLM commands:
pinocchio code professional \
--context $(ppp glazed/writing-help-entries) \
--context $(git diff origin/main | temporizer)
Key components:
ppp (alias for prompto get --print-path) retrieves prompto document pathstemporizer captures dynamic content like git diffsWith git changes:
git diff | temporizer --name git-changes
With API responses:
curl api.example.com | temporizer \
--name api-data \
--prefix "// Retrieved at $(date)" \
--suffix "// End of response"
Multiple context sources:
pinocchio code professional \
--context $(prompto get background --print-path) \
--context $(curl api.example.com/data | temporizer) \
--prompt "Analyze this data"
This combination of automatic management and flexible options makes temporizer ideal for handling dynamic context in command pipelines, especially with LLM tools like Pinocchio.