Military-grade folder & file encryption tool with XChaCha20-Poly1305 and Argon2id. Interactive file browser, cross-platform CLI.
npm install ecrypto-cliMilitary-Grade Folder & File Encryption Tool
Encrypt entire folders or individual files into secure containers using XChaCha20-Poly1305 (AEAD) and Argon2id (KDF).



---
- š Military-Grade Encryption: XChaCha20-Poly1305 AEAD cipher (256-bit keys)
- š Folder & File Support: Encrypt entire folders or individual files
- šØ Interactive File Browser: Navigate your file system with arrow keys
- š Flexible Authentication: Passphrase or raw 32-byte key files
- š¦ Single Secure Container: Compressed + encrypted .ecrypt files
- š”ļø Secure by Default: Argon2id KDF (256MB memory, 3 iterations)
- ā¶ Undo Feature: Easily restore recently encrypted data
- ā” Fast & Lightweight: Single binary, zero runtime dependencies
- š Cross-Platform: Windows, macOS, and Linux
---
Install globally to use from anywhere:
``bash`
npm install -g ecrypto-cli
Then use it:
`bash`
ecrypto
Install in your project:
`bash`
npm install ecrypto-cli
Run with npx:
`bash`
npx ecrypto
---
Launch the interactive menu:
`bash`
ecrypto
You'll see a beautiful interface:
`
āāāāāā āāāāāā āāāāāā āā āā āāāāāā āāāāāā āāāāāā
āāāā āā āāāāāāā āāāā āāāāāā āā āā āā
āāāāāā āāāāāā āā āā āā āā āā āāāāāā
XChaCha20-Poly1305 | Argon2id | Military-Grade Security
Main Menu
āāāāāāāāāāā
> [1] [ENCRYPT] Encrypt a Folder/File
[2] [DECRYPT] Decrypt a Folder/File
[3] [KEYGEN] Generate Encryption Key
[4] [INFO] View Container Info
[5] [UNDO] Undo Recent Operation
[6] [EXIT] Quit Application
`
#### Encrypt a Folder
`bashUsing a passphrase
ecrypto encrypt --in ./my-documents --out encrypted.ecrypt --pass
#### Encrypt a Single File
`bash
Using a passphrase
ecrypto encrypt --in photo.jpg --out photo.jpg.ecrypt --passUsing a key file
ecrypto encrypt --in document.pdf --out document.pdf.ecrypt --key-file key.txt
`#### Decrypt
`bash
Using a passphrase
ecrypto decrypt --in encrypted.ecrypt --out ./restored --passUsing a key file
ecrypto decrypt --in encrypted.ecrypt --out ./restored --key-file key.txt
`#### Generate Encryption Key
`bash
ecrypto keygen --out mykey.txt
`#### View Container Info
`bash
ecrypto info --in encrypted.ecrypt
`---
šÆ Interactive Features
$3
No need to type paths manually! Navigate with a visual file browser:
`
š¾ Select Drive [1] š¾ C:
[2] š¾ D:
š Current: C:\Users\YourName
[1] ā¬ļø ..
[2] š Documents
[3] š Downloads
[4] š Pictures
[5] š report.pdf (2.5 MB)
`Features:
- ā
Browse drives and folders interactively
- ā
See file sizes before selecting
- ā
Quick access to common folders
- ā
Still supports pasting paths directly
$3
Paste paths directly at any prompt:
`bash
āŗ Select option: C:\Users\YourName\Documents\MyFolder
ā Detected folder: MyFolder
`Works with:
- Paths with or without quotes
- Spaces in names
- Forward or backward slashes
---
š Security Features
$3
- Cipher: XChaCha20-Poly1305 (AEAD)
- 256-bit keys
- 192-bit nonces (extended nonce space)
- Authenticated encryption (tamper-proof)
$3
- KDF: Argon2id (winner of Password Hashing Competition)
- Memory: 256 MB
- Iterations: 3
- Parallelism: 1
- Random 128-bit salt per encryption
$3
`
[Header 59 bytes] + [Encrypted Data]
`Header includes:
- Magic bytes:
ECRYPT01
- Version: 1
- KDF type (0=raw key, 1=Argon2id)
- Salt (128 bits)
- Nonce (192 bits)
- Argon2id parameters---
š Usage Examples
$3
`bash
Interactive mode
ecryptoSelect [1] Encrypt
Choose [1] Browse or paste: ~/Documents/Personal
Enter passphrase (hidden input)
Done! ā
`$3
`bash
Encrypt each file
ecrypto encrypt --in file1.txt --out file1.ecrypt --pass
ecrypto encrypt --in file2.pdf --out file2.ecrypt --pass
ecrypto encrypt --in file3.jpg --out file3.ecrypt --pass
`$3
`bash
Generate key
ecrypto keygen --out secret.keyEncrypt with key
ecrypto encrypt --in ./sensitive-data --out backup.ecrypt --key-file secret.keyLater, decrypt with same key
ecrypto decrypt --in backup.ecrypt --out ./restored --key-file secret.key
`$3
`bash
In interactive mode
Select [5] Undo
Shows recent operations
Select operation to reverse
`---
š§ Advanced Options
$3
`bash
ecrypto encrypt \
--in \
--out \
--pass # Use passphrase (prompts securely)
--key-file # Use raw 32-byte key file
--argon-m # Argon2id memory (default: 262144 = 256MB)
--argon-t # Argon2id iterations (default: 3)
--argon-p # Argon2id parallelism (default: 1)
`$3
`bash
ecrypto decrypt \
--in \
--out \
--pass # Use passphrase
--key-file # Use raw key file
`---
š CLI vs Interactive Mode
| Feature | CLI Mode | Interactive Mode |
| ------------ | -------------- | -------------------- |
| Speed | ā” Fastest | šØ User-friendly |
| Automation | ā
Scriptable | ā Manual |
| File Browser | ā Type paths | ā
Visual navigation |
| Progress | š Text | š Visual + Icons |
| Undo | ā Manual | ā
Built-in |
| Best For | Scripts, CI/CD | Daily use, beginners |
---
š ļø System Requirements
- Node.js: 12.x or higher (for npm installation only)
- OS: Windows, macOS, Linux
- Disk Space: ~10 MB
- Memory: Minimum 512 MB RAM (256 MB for Argon2id)
---
š Updates
Keep ecrypto-cli up to date:
`bash
Check current version
ecrypto --versionUpdate to latest
npm update -g ecrypto-cli
`---
š Documentation
Full documentation: https://github.com/pandarudra/ecrypto
$3
`bash
ecrypto --help # Show all commands
ecrypto encrypt --help # Encryption help
ecrypto decrypt --help # Decryption help
ecrypto keygen --help # Key generation help
`---
š Troubleshooting
$3
macOS/Linux:
`bash
sudo npm install -g ecrypto-cli
`$3
After global install:
`bash
Add npm global bin to PATH
export PATH="$PATH:$(npm config get prefix)/bin"
`$3
`bash
npm cache clean --force
npm install -g ecrypto-cli@latest
``---
Contributions welcome! See CONTRIBUTING.md
---
MIT Ā© pandarudra
---
- GitHub: https://github.com/pandarudra/ecrypto
- Issues: https://github.com/pandarudra/ecrypto/issues
- npm: https://www.npmjs.com/package/ecrypto-cli
- Releases: https://github.com/pandarudra/ecrypto/releases
---
Made with ā¤ļø for Privacy & Security
ā Star us on GitHub if you find this useful!