https://github.com/programfan/cryptfs-cli
A simple tool to manage gocryptfs/cppcryptfs encrypted directories.
https://github.com/programfan/cryptfs-cli
Last synced: 9 months ago
JSON representation
A simple tool to manage gocryptfs/cppcryptfs encrypted directories.
- Host: GitHub
- URL: https://github.com/programfan/cryptfs-cli
- Owner: ProgramFan
- License: mit
- Created: 2024-10-27T08:47:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-06T16:02:35.000Z (about 1 year ago)
- Last Synced: 2025-05-12T22:00:08.637Z (9 months ago)
- Language: Go
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cryptfs-cli
`cryptfs-cli` is a cross-platform command-line tool for creating, mounting, and unmounting encrypted repositories using **GPG** for passphrase management. **gocryptfs** (Linux), and **cppcryptfs** (Windows) are used as backends.
## Features
- **Cross-platform**: Runs on both Linux and Windows.
- **Flexible Encryption**: Uses `gocryptfs` on Linux and `cppcryptfs` on Windows.
- **Secure Passphrase Management**: Leverages GPG for passphrase encryption. Combined with OpenPGP-compatible smart cards like YubiKey, the security is ensured.
- **User-friendly CLI**: Built with the Cobra library for comprehensive help and documentation.
## Installation
### Prerequisites
Ensure the following tools are installed and accessible in your system’s PATH:
- **Linux**: `gocryptfs`, `gpg`, `fusermount`
- **Windows**: `cppcryptfs.exe`, `cppcryptfsctl.exe`, `gpg` (from Gpg4win)
### Build
Clone the repository and build the binary:
```bash
git clone https://github.com/yourusername/cryptfs-cli.git
cd cryptfs-cli
go build -o cryptfs-cli
```
On Windows, use the following to create the executable:
```powershell
go build -o cryptfs-cli.exe
```
## Usage
`cryptfs-cli` provides three main commands: `create`, `mount`, and `umount`. Each command comes with built-in help (`--help`) for usage details.
### Commands
1. **Create a Repository**
Initializes a new encrypted repository.
```bash
cryptfs-cli create -u
```
- `-u, --user `: Specifies the GPG user/email for encryption.
- ``: The directory for the encrypted repository.
2. **Mount a Repository**
Mounts an encrypted repository to a specified directory.
```bash
cryptfs-cli mount [flags]
```
- `-o, --options `: Options to pass to the cryptfs tool (comma-separated).
- ``: The repository directory.
- ``: The directory to mount the decrypted content.
3. **Unmount a Repository**
Unmounts a previously mounted repository.
```bash
cryptfs-cli umount
```
- ``: The mount point to unmount.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Contributing
Contributions are welcome! Please open issues or submit pull requests for any improvements or bug fixes.
## Notes
- **Security**: This tool manages encrypted repositories and passphrases, so ensure your GPG keys and repository files are secure.
- **Cross-platform paths**: Use appropriate path syntax for each operating system.