| Crates.io | hakanai |
| lib.rs | hakanai |
| version | 3.0.0 |
| created_at | 2025-09-09 08:15:41.257537+00 |
| updated_at | 2026-01-15 14:31:58.50131+00 |
| description | CLI client for Hakanai, a secure secret sharing service. |
| homepage | https://github.com/czerwonk/hakanai |
| repository | https://github.com/czerwonk/hakanai |
| max_upload_size | |
| id | 1830399 |
| size | 172,856 |
A minimalist one-time secret sharing service built on zero-knowledge principles.
Hakanai embodies the Japanese concept of transience - secrets that exist only for a moment before vanishing forever. No accounts, no tracking, no permanent storage. Just ephemeral data transfer with mathematical privacy guarantees and automatic expiration.
Enhanced Security Mode: With --separate-key, the secret URL and decryption key are provided separately, allowing you to share them through different communication channels for defense in depth.
With version 3.x hakanai has switched from using UUIDs as secret identifiers to ULIDs. This allows for shorter URLs. Secret URLs created with previous versions below 3.x will not work anymore. Also the secret storage format has changed. Secrets are now encoded using MessagePack instead of JSON. This change reduces secret size significantly since binary data has not to be base64-encoded anymore.
# Start the services
docker compose up -d
# The server will be available at http://localhost:8080
# Prerequisites: Rust 1.89+, Node.js, Redis
git clone https://github.com/czerwonk/hakanai
cd hakanai
npm install
cargo build --release --workspace
# Start server (admin token will be generated and logged)
./target/release/hakanai-server
# Send from stdin
echo "my secret data" | hakanai send
# Send a file
hakanai send --file document.pdf
# Send multiple files (creates ZIP archive)
hakanai send -f file1.txt -f file2.pdf -f image.png
# Enhanced security (separate key)
echo "sensitive data" | hakanai send --separate-key
# With access restrictions
echo "restricted secret" | hakanai send --allow-ip 192.168.1.0/24 --allow-country US
# Get using the URL returned by send
hakanai get https://hakanai.example.com/s/ulid-here
# Get with separate key (when --separate-key was used)
hakanai get https://hakanai.example.com/s/ulid-here --key base64-key
# Save to custom location
hakanai get https://hakanai.example.com/s/ulid-here --output-dir /downloads/
Visit your server URL (e.g., http://localhost:8080) to:
We implement true client-side encryption - your secrets are encrypted before leaving your device and decrypted only after retrieval. The server is just a temporary dead drop that forgets everything.
Content Integrity: All secrets include SHA-256 hash validation (truncated to 128 bits for manageable URLs) to detect tampering.
Note: This project focuses on application-layer encryption. Transport security (HTTPS/TLS) should be handled by a reverse proxy in production.
đ Complete documentation is available in the docs/ directory:
Live API Docs: Visit /docs on your running server for interactive OpenAPI documentation.
Contributions are welcome! Please see docs/DEVELOPMENT.md for setup instructions and guidelines.
Licensed under the Apache License, Version 2.0.
See NOTICE for attribution requirements.