Skip to content

vrypan/stash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

social-banner

~{@ stash

stash is a small local store for pipeline output and ad hoc file snapshots.

It stores each entry as raw bytes under ~/.stash, assigns it a stable ULID, and lets you retrieve entries by recency or ID later. Everything is flat files and directories.

Tip

stash fits nicely in any workflow that would involve temporary files, or expensive output that needs to be processed in more than one ways.

Quick Start

Save output and reuse it:

curl -s https://api.example.com/data | stash
stash cat | jq .
stash cat | jq '.items[]'

Keep the pipeline flowing while saving the same bytes:

curl -s https://api.example.com/data | stash tee | jq .

Use with diff:

find . -type f | sort | stash -m label=before
# ... later ...
find . -type f | sort | stash -m label=after

diff -u <(stash cat @2) <(stash cat @1)

File-oriented view:

stash ls
stash log
stash attr @1

Installation

From Source

Clone the repo, and run make build. Copy the generated binary stash to a location in your PATH.

Pre-built binaries

Available under releases.

Homebrew

brew install vrypan/tap/stash

Shell support

For auto-completion and other shell-specific features, check:

Stash Repository Location

By default, stash stores data under ~/.stash.

You can override the stash root with STASH_DIR:

STASH_DIR=/tmp/job-a stash log
STASH_DIR=/tmp/job-a stash Makefile
STASH_DIR=/tmp/job-b stash log

This is useful when you want separate independent stashes for different jobs, projects, or CI runs.

Documentation

Note

What is ~{@??? An ASCII art acorn.

About

stash is a small local store for pipeline output and ad hoc file snapshots.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors