████████╗███████╗███╗ ███╗██████╗ ██████╗ ███████╗
╚══██╔══╝██╔════╝████╗ ████║██╔══██╗██╔══██╗██╔════╝
██║ █████╗ ██╔████╔██║██████╔╝██████╔╝███████╗
██║ ██╔══╝ ██║╚██╔╝██║██╔═══╝ ██╔══██╗╚════██║
██║ ███████╗██║ ╚═╝ ██║██║ ██║ ██║███████║
╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝╚══════╝
[TEMPORARY FILE STACK MANAGER // FULL SPECTRUM DATA CONTROL]
"The stack is vast and infinite."
temprs (binary: tp) is a temporary file stack manager in Rust. Stack-based push/pop/shift/unshift, dual indexing by position or @name, head/tail/wc/size, find-and-replace, grep, diff, concat, and an atomic flock-protected master record. Two binaries (tp + temprs), zsh completions, short + full man pages (man temprs, man temprsall).
┌──────────────────────────────────────────────────────────────┐ │ STATUS: ONLINE THREAT LEVEL: NEON SIGNAL: ████████░░ │ └──────────────────────────────────────────────────────────────┘
Read the Docs · Engineering Report · strykelang · zshrs
Table of Contents
- [0x00] Screenshots
- [0x01] System Requirements
- [0x02] Installation
- [0x03] Usage
- [0x04] Environment
- [0x05] Data Integrity
- [0x06] Stack Architecture
- [0x07] Development & CI
- [0xFF] License
[0x00] SCREENSHOTS
HELP // SYSTEM INTERFACE

LIST FILES // STACK ENUMERATION

LIST NUMBERED // INDEXED STACK VIEW

LIST CONTENTS // FULL DATA DUMP

OUTPUT // DATA EXTRACTION

[0x01] SYSTEM REQUIREMENTS
- Rust toolchain //
rustc+cargo
[0x02] INSTALLATION
DOWNLOADING PAYLOAD FROM CRATES.IO
COMPILING FROM SOURCE
ZSH COMPLETION // TAB-COMPLETE ALL THE THINGS
# copy to a directory in your fpath
# or add the completions directory to fpath in your .zshrc
fpath=(/path/to/temprs/completions )
# then reload completions
&&
Completions dynamically resolve stack indices, file names, and @name tags.
[0x03] USAGE
Replace
CMDwith any command,FILEwith any file,INDEXwith any index
SCANNING DATA STREAMS // STDIN OPERATIONS
# jack data into a new tempfile on top of stack
|
# jack data in and echo contents to stdout
|
# read from top of stack to stdout
|
TARGETING INDEXED TEMPFILES // PRECISION I/O
# write stdin into tempfile at index 1
|
# write stdin into tempfile at index 1 and echo to stdout
|
# output tempfile at index 1 to stdout
|
# show first 5 lines of tempfile at index 1
# show last 10 lines by name
# print line count
# print byte size
# print file path (for use in scripts)
LOADING FILE PAYLOADS // FILE OPERATIONS
# read FILE into new tempfile on top of stack
|
# read FILE into new tempfile and write contents to stdout
|
# write FILE contents to tempfile 1
|
# write FILE contents to tempfile 1 then to stdout
|
CHAINING DATA STREAMS // PIPELINE OPERATIONS
# read stdin to tempfile 1 then write to stdout
| |
# choose input tempfile and write to tempfile at index 2 and stdout
|
APPENDING DATA // ACCUMULATE
# append stdin to tempfile at INDEX
|
# append by name
|
ENUMERATING STACK CONTENTS // LISTING
# list all tempfiles on the stack
# list all tempfiles with contents
# list all tempfiles numbered
# list all tempfiles numbered with contents
# print the number of files on the stack
EDITOR INTEGRATION // DIRECT ACCESS
# open tempfile at INDEX in $EDITOR (falls back to vi)
# open the most recent tempfile (top of stack)
NAMING TEMPFILES // ALIAS TAGS
Every tempfile can optionally be given a tag name — a string alias that can be used anywhere you'd normally pass a numeric index. This means all operations support dual indexing: by position (1, 2, -1) or by name (mydata, config).
When you pass an argument to an operation, it is first tried as a numeric index. If that fails, it is looked up as a tag name. Names must be unique across the stack and must not contain null bytes.
# tag a new tempfile with a name
|
# retrieve by name instead of index
|
# remove by name
# rename a tag
# rename by index
Names travel with their files — moves, swaps, and duplicates preserve the tag. Names are displayed with a @ prefix in listings (e.g. @mydata).
INSPECTING TEMPFILES // METADATA
# show metadata for tempfile by name or index
FIND AND REPLACE // TRANSFORM
# replace all occurrences of PATTERN with REPLACEMENT in tempfile
# replace by name, prints number of replacements made
SEARCHING CONTENTS // GREP
# search all tempfiles for a pattern
# exits 0 if matches found, 1 if none
&&
CONCATENATING TEMPFILES // MERGE
# concatenate tempfiles by index
|
# concatenate by name
|
# mix indices and names, any order
COMPARING TEMPFILES // DIFF
# unified diff of two tempfiles by index
# diff by name
# exits 0 if identical, 1 if different
STACK MANIPULATION // PUSH / POP / SHIFT
# purge all tempfiles
# purge tempfiles older than 24 hours
# purge tempfiles older than 30 minutes
# remove tempfile at INDEX
# insert tempfile at INDEX
|
# insert FILE at INDEX
# pop from top of stack
# push to bottom of stack (stdin, no stdout)
|
# push to bottom of stack from terminal (waits for stdin)
# push to bottom of stack (equivalent)
|
# shift from bottom of stack
# move tempfile from one position to another
# move by name
# duplicate tempfile onto top of stack
# swap two tempfiles
# reverse the entire stack
# sort stack by filename (default), size, or modification time
[0x04] ENVIRONMENT
# override the default temp directory (default: $TMPDIR/temprs)
[0x05] DATA INTEGRITY
┌──────────────────────────────────────────────────────────────┐ │ CORRUPTION RESISTANCE: MAXIMUM DATA LOSS RISK: ZERO │ └──────────────────────────────────────────────────────────────┘
The master record is hardened against corruption and concurrent access:
- Null-byte delimited format //
\0field separator,\0\0record separator — supports filenames with newlines, tabs, spaces, and any special characters - Atomic writes // data is written to a temp file and atomically renamed — no partial writes on crash
- Exclusive file locking //
flock-based locking prevents concurrent access corruption from multiple shells or scripts - Auto-recovery // corrupt or empty records in the master file are silently skipped and cleaned up on next write
[0x06] STACK ARCHITECTURE
┌─────────────────────────────────────┐
│ INDEX N ▓▓ TOP OF STACK (newest)│
│ INDEX N-1 ▓▓ ... │
│ INDEX 2 ▓▓ ... │
│ INDEX 1 ▓▓ BOTTOM OF STACK │
└─────────────────────────────────────┘
- Tempfiles are numbered in ascending order // highest index = top of stack
- Negative indices are valid at any
INDEXposition // range:-stack_size .. -1 - Positive indices range from
1 .. stack_size - Index
0is always invalid - Both
tpandtemprsbinaries are installed
[0x07] DEVELOPMENT & CI
Pull requests and pushes to main run the workflow in .github/workflows/ci.yml. You can also run it manually from the repository Actions tab (workflow dispatch). On a pull request, the Checks tab (or the merge box) shows the aggregate status; open the CI workflow run for per-job logs (Check, Test, Format, Clippy, Doc, Release Build).
[0xFF] LICENSE
┌──────────────────────────────────────────────────────────┐ │ MIT LICENSE // UNAUTHORIZED REPRODUCTION WILL BE MET │ │ WITH FULL ICE │ └──────────────────────────────────────────────────────────┘
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░░ >>> JACK IN. PUSH YOUR DATA. OWN YOUR TEMP FILES. <<< ░░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░