ciphertext-cli
v1.0.0
Published
Interactive terminal tool to **encrypt and decrypt text securely** using a password.
Maintainers
Readme
🔐 Ciphertext CLI
Interactive terminal tool to encrypt and decrypt text securely using a password.
ciphertext-cli lets you protect notes, API keys, tokens, or messages directly from your terminal with modern cryptography (AES-256-GCM + scrypt key derivation).
✨ Features
- Interactive arrow-key menu
- Hidden password input (like
sudo) - Strong encryption (AES-256-GCM)
- Tamper detection (cannot modify ciphertext without password)
- Single command usage
- Works offline
- Cross-platform (Linux / macOS / Windows)
Installation
Clone the repository:
git clone <repository-url> cd ciphertext-cliInstall dependencies:
# Using pnpm (recommended) pnpm install # Or using npm npm installLink the command globally:
npm link
Or just install the package globally npm install -g ciphertext-cli
Now you can use the ciphertext command directly from anywhere in your terminal!
🧭 Usage
When you run the command:
ciphertextYou will see:
? What do you want to do?
❯ Encrypt
DecryptUse ↑ ↓ arrow keys and press Enter.
Encrypt
- Select Encrypt
- Enter the text
- Enter your password (hidden)
Output:
Encrypted:
q9YJ3xC9l0Q1YQ8yR... (base64 ciphertext)Save this ciphertext anywhere (notes, database, git, etc).
Decrypt
- Select Decrypt
- Paste the ciphertext
- Enter the same password
Output:
Decrypted:
Attack at dawnIf the password is wrong or data was modified:
Wrong password or corrupted ciphertext🔐 Security
ciphertext-cli uses modern authenticated encryption:
- AES-256-GCM encryption
- scrypt password key derivation
- Random salt per encryption
- Random IV (nonce)
- Authentication tag verification
This means:
- Attackers cannot read the message
- Attackers cannot modify the message
- Wrong passwords are detected safely
This tool is designed for protecting secrets at rest and sharing private messages.
⚠️ Important Notes
- If you forget the password → data cannot be recovered
- There is no backdoor
- The encryption is local only (no servers involved)
Good use cases
- Sending private messages
- Personal secure notes
- Environment variables
Bad use cases
- Password manager replacement
- Large file encryption
- Enterprise key management
- Long-term archival storage
🧪 How it works (simple)
Your password is never used directly as a key.
Instead:
password → scrypt → secure key → AES-256-GCM → ciphertextEvery encryption generates a new random salt and IV, so encrypting the same message twice produces different ciphertext.
👤 Author
Sifat Ullah
📜 License
ISC
