bytestashy
bytestashy is a CLI application that communicates with the ByteStash API to quickly store files as snippets or retrieve existing ones.
Installation
A recent Rust installation is required (at least Rust 1.74 with Edition 2024). The tool can be installed directly from crates.io:
Alternatively, clone this repository and build from source:
Commands
Authentication
Before the first upload, an API key for ByteStash must be generated:
Configuration is stored in an OS-specific config folder (for example under $XDG_CONFIG_HOME/bytestashy/config.json on Linux). The API key itself is saved securely in your system keyring.
Create Snippets
Upload files as snippets. The program will interactively prompt for title, description, visibility and categories:
List Snippets
Display a paginated list of your snippets:
Options:
--all, -a: Display all snippets (no pagination)--number, -n <N>: Page size (default: 10)--page, -p <N>: Page number to display (starting at 1)
Get Snippets
Retrieve and download a snippet by ID:
The command will show snippet details and prompt whether to download the files.
Update Snippets
Replace all files in an existing snippet:
The program will prompt for updated title, description, visibility and categories, pre-filling with current values.
Delete Snippets
Delete a snippet by ID:
Options:
--force, -f: Skip confirmation dialog
Search Snippets
Search through your snippets with various options:
Options:
--sort, -s <ORDER>: Sort order (newest, oldest, alpha-asc, alpha-desc)--search-code: Search within code content (not just titles/descriptions)
Available sort options:
newest- Most recently updated firstoldest- Oldest firstalpha-asc- Alphabetical by title (A-Z)alpha-desc- Alphabetical by title (Z-A)
Shell Completions
Generate shell completion scripts for enhanced command-line experience:
Supported shells: bash, zsh, fish, powershell
Installation examples:
Bash:
# or for user-only installation:
Zsh:
# Make sure ~/.zsh/completions is in your $fpath
Fish:
After installation, restart your shell or source the completion file to enable tab completion for all bytestashy commands and options.
License
This project is licensed under the GPLv3. See LICENSE.