Stash File Stack
Stash is a stack-based file management tool for the terminal. It lets you temporarily move files and directories out of your working tree, then restore them later.
Stash is designed to feel obvious: in many cases, you don’t need to specify whether you’re pushing or popping — Stash infers your intent based on context.
Table of Contents
Features
- Stack-based workflow — Push files into a stash, pop them back later
- Operation inference — Automatically decides whether to stash or restore
- History & metadata — Track creation time, size, and contents
- Automatic cleanup — Remove old entries after a configurable time
Usage
All commands support --help:
Basic Operations
# Stash a file (it exists locally)
# Restore it later (file no longer exists locally)
# Restore the most recent entry
How Operations Are Inferred
When you run:
Stash determines what you mean using a small set of predictable rules:
-
No arguments → Pop (restore) the most recent entry
-
All arguments exist locally → Push (stash) those files or directories
-
Argument does not exist locally → Treated as a stash entry identifier and restored
-
Ambiguous input → Requires explicit flags or clarification
Push (Stash Files)
Options:
-
--name,-n <NAME>Assign a custom name to the stash entry -
--copy,-cCopy files instead of moving them
Examples:
Pop (Restore Files)
Options:
-
--copy,-cCopy files instead of moving them -
--force,-fOverwrite existing files when restoring -
--restore,-rRestore files to their original paths
Examples:
List Entries
Displays:
- Name
- UUID
- Creation date
- Size
- Item count
Search Entries
View Information
Clean Old Entries
Rename Entry
Export to Archive
Dump All Entries
Restore all entries in stash order:
This restores every entry to the current directory using safe defaults.
Examples
Temporary Cleanup
# work on something else
Context Switching
Quick Backups
Contributing
Contributions are welcome! Issues and pull requests can be submitted on GitHub.