Dark Matter is a command-line tool for secure file management using GPG encryption. It provides a robust way to vault, manage, and track encrypted files while maintaining security through GPG key verification.
- Secure file storage with GPG encryption
- File versioning and tracking
- Easy file management (add, update, remove, export)
- Secret management (add, update, remove, list, show)
- Key verification and diagnostics
- SQLite-based database for file tracking
- Command-line interface for all operations
- GPG (GnuPG) installed and configured
- A valid GPG key pair
- Rust development environment (for building from source)
-
Clone the repository:
git clone <repository-url> cd dark-matter
-
Install GPG dependencies:
sudo apt-get install libgpgme-dev
-
Build the project using Cargo:
cargo build --release
-
The binary will be available in
target/release/dark-matter
.
Before using Dark Matter, you need to initialize it with your GPG key hash:
-
Get a list of GPG keys:
gpg --list-keys
-
Create a GPG key if you don't have one:
gpg --full-generate-key
-
Validate your GPG key:
dark-matter keys validate <key-hash>
-
Initialize the vault:
mkdir vault cd vault dark-matter init <key-hash>
The key hash can be obtained from your GPG keyring. This creates a new vault and configures Dark Matter for use with your key.
To add a new file to the vault:
dark-matter file add <filename>
The file will be encrypted using your GPG key and stored in the vault.
View all files in the vault:
dark-matter file list
Update an existing file in the vault:
dark-matter file update <filename>
This creates a new encrypted version of the file while maintaining version history.
Remove a file from the vault:
dark-matter file remove <filename>
Export a file from the vault (decrypts the file to its original path):
dark-matter file export <filename>
To export to the current directory:
dark-matter file export <filename> --relative
To skip confirmation for overwriting files:
dark-matter file export <filename> --yes
To add a new secret to the vault:
dark-matter secret add <name> <value> --tags <tag1,tag2>
<name>
: The name of the secret.<value>
: The value of the secret.--tags
: Optional tags for categorizing the secret (comma-separated).
Example:
dark-matter secret add "api_key" "12345" --tags "production,api"
To list all secrets in the vault:
dark-matter secret list
To filter secrets by tags:
dark-matter secret list --tags <tag1,tag2>
Example:
dark-matter secret list --tags "production"
To update an existing secret in the vault:
dark-matter secret update <name> <new_value> --tags <tag1,tag2>
<name>
: The name of the secret to update.<new_value>
: The new value for the secret.--tags
: Optional tags for categorizing the secret (comma-separated).
Example:
dark-matter secret update "api_key" "67890" --tags "staging"
To remove a secret from the vault:
dark-matter secret remove <name>
Example:
dark-matter secret remove "api_key"
To display the value of a secret:
dark-matter secret show <name>
Example:
dark-matter secret show "api_key"
Verify GPG key configuration and system status:
dark-matter keys validate <key-hash>
Dark Matter provides detailed error messages for common issues:
- Database not found or already exists
- File not found or already exists
- Secret not found or already exists
- GPG key verification failures
- Database operation errors
- I/O errors
- All files and secrets are encrypted using GPG.
- Key verification is performed for all operations.
- The database is protected against unauthorized access.
- Original files should be securely deleted after adding them to the vault.
This software is provided under a dual license:
-
Source-Available Evaluation License (Default)
- Allows viewing and personal, non-commercial evaluation.
- No modification, redistribution, or commercial use permitted.
-
Commercial License (By Agreement)
- Required for commercial use, modifications, or redistribution.
- Contact the author for licensing terms.
See LICENSE.txt for complete terms.
For commercial licensing inquiries or technical support:
- Author: Alexey Nikandrov
- Email: [email protected]
As this is a proprietary, source-available project, contributions are not accepted without prior agreement. Please contact the author for collaboration opportunities.