| Crates.io | bunkr-client |
| lib.rs | bunkr-client |
| version | 0.1.4 |
| created_at | 2025-11-08 20:29:59.30509+00 |
| updated_at | 2025-12-17 21:34:02.446815+00 |
| description | A Rust library and CLI tool for uploading files to Bunkr.cr |
| homepage | https://github.com/sn0w12/bunkr-client |
| repository | https://github.com/sn0w12/bunkr-client |
| max_upload_size | |
| id | 1923248 |
| size | 130,916 |
A command-line tool for uploading files to Bunkr.cr.
git clone https://github.com/sn0w12/bunkr-uploader.git
cd bunkr-uploader
cargo install --path .
Add to your Cargo.toml:
[dependencies]
bunkr-client = "0.1.0"
To use without CLI features:
[dependencies]
bunkr-client = { version = "0.1.0", default-features = false }
use bunkr_client::{BunkrUploader, Config};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let config = Config {
default_batch_size: Some(5),
default_album_id: None,
default_album_name: Some("My Album".to_string()),
preprocess_videos: Some(true),
};
// Or use default: let config = Config::default();
let uploader = BunkrUploader::new("your_api_token".to_string()).await?;
// Upload files
let files = vec!["file1.jpg".to_string(), "file2.png".to_string()];
let (urls, failures) = uploader.upload_files(files, None, 1, None, Some(&config)).await?;
Ok(())
}
Save your API token securely:
bunkr-client save-token YOUR_API_TOKEN
Upload files to an existing album by name or id:
bunkr-client --album-id ALBUM_ID file1.jpg file2.png
bunkr-client --album-name "My Album" file1.jpg file2.png
Upload a directory:
bunkr-client /path/to/directory
bunkr-client create-album "Album Name" --description "Description"
View current config:
bunkr-client config get
Set default batch size:
bunkr-client config set default_batch_size 5
--token: Provide API token (alternative to saving)--album-id: Upload to specific album ID--album-name: Upload to album by name--batch-size: Number of files to upload concurrently--help: Show helpSee LICENSE file.