Skip to content

yash0g-dev/Stash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stash

License Python pipx

A lightweight CLI tool for temporarily uploading files and retrieving them from any device using a generated stash key.

Stash allows you to:

  • Upload one or multiple files
  • Receive a unique stash key
  • Download files from any device using that key
  • Optionally confirm downloads interactively

🛠 Built With / Dependencies


⚙️ Requirements

  • Python 3.11+
  • pipx
  • Internet connection

🚀 Installation

Recommended: Install with pipx

pipx installs CLI tools in isolated environments.

If pipx is not installed

pip install pipx
pipx install git+https://github.com/u-cant-see-me/Stash.git
pipx ensurepath

After running pipx ensurepath, restart your terminal.

If the stash command is not found, ensure that ~/.local/bin is in your PATH:

export PATH="$HOME/.local/bin:$PATH"

📦 Usage

Upload Files

Upload one or more files using the full command or its alias:

# Full command
stash upload file1.txt file2.png

# Alias
stash u file1.txt file2.png

After upload, a stash key will be generated.

You can also use normal shell features like wildcards and globbing:

# Upload all files in the current directory
stash upload *

# Upload all files in a specific folder
stash upload my_folder/*

# Upload files matching a pattern
stash upload *.pdf

Note: The shell expands * and patterns before passing them to stash.


Download Files

Download using a stash key:

stash download <stash-key>

Aliases:

stash key <stash-key>
stash k <stash-key>

If no storage path is configured, files will be downloaded to the current directory.


⚙️ Configuration

Stash allows you to configure backend and storage settings.

Set Backend URL

stash config --url <backend-url>

Set Download Storage Path

Set a default directory where downloaded files will be saved:

stash config --store /path/to/download/folder

If not set, files will be downloaded to the current working directory.


View Current Configuration

To see the current configuration:

stash config --show

Informative Upload

Show detailed upload information:

stash upload file1.txt -i

Copy Stash Key to Clipboard

stash upload file1.txt -c

Interactive Download

Prompt before downloading each file:

stash download <stash-key> -i

🔄 Example Workflow

On Machine A

stash upload report.pdf

Output:

Stash Key: 4fj39sk2

On Machine B

stash download 4fj39sk2

🛠 Troubleshooting

Command Not Found

Check your PATH:

echo $PATH

If ~/.local/bin is missing:

export PATH="$HOME/.local/bin:$PATH"

Restart your terminal afterward.


🧪 Development Setup

Clone the repository:

git clone <your-repo-url>
cd stash

Install in editable mode:

pip install -e .

Run:

stash upload test.txt

📄 License

MIT License

About

lightweight CLI tool to upload and download files to temporary storage from the comfort of your terminal

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages