Tern is a powerful, lightweight command-line tool designed for seamless file encryption, decryption, compression, and decompression. It provides a versatile set of features, including advanced "monofile" operations for combining, encrypting, and verifying files.
- Encrypt/Decrypt Files: Secure your files with customizable encryption keys.
- Compress/Decompress Files: Save storage space while preserving file integrity.
- Monofile Operations: Combine, compress, and encrypt multiple files into a single mono file and easily reverse the process.
- Direct Processing (
-nocopy
): Avoid creating additional copies while processing files. - Hash Verification: Ensure the integrity of your files in a monofile.
- Wildcard Support: Support for bash-wildcards like , file *.txt etc
- Ease of Use: Lightweight, fast, and easy-to-use interface.
git clone https://github.com/Lithax/tern.git
cd tern
basic.zip -> Needs java 17 or higher locally installed to run
jre_included.zip -> has a JRE included, but is large in file size (Adoptium Java SE 23 minimal JRE)
Use the env.bat file to add Tern to your systemenviroment variables
Build the executable (instructions in the readme of the distros).
The general syntax for Tern commands is:
tern [options] [arguments]
Option | Description |
---|---|
--help |
Displays the help message with all commands. |
--version |
Displays the current version and author. |
--enc [key] [files] |
Encrypts files using the specified key. Use -nocopy to process directly. |
--denc [key] [files] |
Decrypts files using the specified key. Use -nocopy to process directly. |
--com [files] |
Compresses files. Use -nocopy to process directly. |
--dcom [files] |
Decompresses files. Use -nocopy to process directly. |
--mono [arg] [key] [files] |
Monofile operations (encrypt, decrypt, verify). See below for details. |
Argument | Description |
---|---|
-in |
Encrypts and compresses files into a single mono file. |
-out |
Decrypts and decompresses a mono file, restoring original files. |
-verify |
Verifies the integrity and hashes of files in a mono file. |
Encrypt a file using a key:
tern --enc mykey file1.txt
Decrypt an encrypted file using a key:
tern --denc mykey file1.enc
Compress a file:
tern --com file1.txt
Decompress a compressed file:
tern --dcom file1.com
-
Create a Mono File
Combine, compress, and encrypt multiple files into a mono file:tern --mono -in mykey file1.txt file2.txt file3.txt
Copy & Paste:
tern --mono -in mykey file1.txt file2.txt file3.txt
-
Extract Files from Mono
Decrypt and decompress files from a mono file:tern --mono -out mykey mono_file.tern
-
Verify Mono File Integrity
Verify the hashes of files stored in a mono file:tern --mono -verify mykey mono_file.tern
Detailed documentation is available in the Wiki.
This project is licensed under the Apache 2.0 License. See the LICENSE file for more details.
Contributions are welcome! To get started:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -m "Add feature"
). - Push to the branch (
git push origin feature-branch
). - Create a Pull Request.
Created with care by @Lithax. Visit GitHub Profile.
████████╗███████╗██████╗ ███╗ ██╗
╚══██╔══╝██╔════╝██╔══██╗████╗ ██║
██║ █████╗ ██████╔╝██╔██╗ ██║
██║ ██╔══╝ ██╔══██╗██║╚██╗██║
██║ ███████╗██║ ██║██║ ╚████║
╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝