@nithin93/encrypted-share
v1.0.0
Published
A cross-platform CLI tool for securely sharing files and directories using AES-256-GCM encryption over TCP
Maintainers
Readme
Encrypted Share CLI
A cross-platform CLI tool for securely sharing files and directories using AES-256-GCM encryption over TCP.
Features
- Secure: Uses AES-256-GCM for authenticated encryption.
- Cross-Platform: Works on Windows, macOS, and Linux.
- Versatile: Send single files or entire directories.
- Simple: Minimal setup required.
Installation
- Clone the repository.
- Install dependencies:
npm install - Build the project:
(Or usenpm run buildnpx tscifnpm run buildis not defined in package.json yet)
Usage
The tool operates in two modes: serve (receiver) and send (sender).
1. Start the Server (Receiver)
Start the server to listen for incoming files.
node dist/cli.js serve --port 3000 --key <your-secret-key> --out ./received-filesOptions:
-p, --port <number>: Port to listen on (default: 3000).-k, --key <string>: Encryption key (required).-o, --out <path>: Directory to save received files (default:./received-files).-c, --config <path>: Path to configuration file.
2. Send Files (Sender)
Send a file or directory to the server.
node dist/cli.js send --target localhost:3000 --key <your-secret-key> ./path/to/filesOptions:
-t, --target <host:port>: Server address (required).-k, --key <string>: Encryption key (required).-c, --config <path>: Path to configuration file.
Configuration File
You can also use a JSON configuration file (default: ~/.encrypted-share.json) to avoid typing arguments every time.
{
"key": "my-super-secret-password",
"server": "localhost:3000",
"port": 3000,
"outputDir": "./downloads"
}Development
- Build:
npx tsc - Run:
node dist/cli.js
