A clean, modern, fully-typed Python CLI and library for generating self-signed X.509 certificates, certificate signing requests (CSRs), and private keys.
Built for automation, reproducibility, and bulk-generation workflows used by The Lupaxa Project.
- Generate self-signed certificates, private keys, and CSRs
- Generate from:
- JSON config file
- Directory of config files (bulk mode)
- Pure command-line flags
- Output:
- To stdout
- Or into an output directory, with one folder per certificate
- Supports:
- RSA key generation
- SHA-256 / SHA-384 / SHA-512 digests
- Validity period configuration
- Optional private key encryption with passphrase
- Subject Alternative Names (SANs) via JSON or CLI
- Includes:
--generate-exampleto produce a full example JSON config--inspect-certto analyze existing PEM certificates--validate-configto validate config files before use
- Fully typed, linted, formatted, and tested
- MkDocs documentation included
pip install lupaxa-certtoolpip install -e ".[dev]"certtool \
--countryName UK \
--stateOrProvinceName Somerset \
--localityName Glastonbury \
--organizationName "Lupaxa Project" \
--commonName "dev.internal"certtool --generate-example --example-file dev-internal-cert.jsoncerttool --config dev-internal-cert.jsoncerttool --config-dir configs/If you pass:
certtool --config-dir configs/ --output-dir output/You get:
output/
├── dev.internal/
│ ├── cert.pem
│ ├── csr.pem
│ └── key.pem
└── api.internal/
├── cert.pem
├── csr.pem
└── key.pemEach certificate gets its own folder to prevent overwriting.
{
"passphrase": "your-secret-here"
}certtool --config dev-internal-cert.json --passphrase "some-secret"certtool --inspect-cert output/dev.interal/cert.pemThe project includes MkDocs documentation.
Full documentation is available in the docs/ directory or served locally:
mkdocs serveThen open the printed URL (usually http://127.0.0.1:8000/) in your browser.
Clone the repository and install dev dependencies:
pip install -e ".[dev]"Useful make targets:
make test # run tests
make type # type checking (mypy)
make check-style # lint + format + type
make check-all # run tests, coverage, and audit
© The Lupaxa Project.
Where exploration meets precision.
Where the untamed meets the engineered.
