Manage local SSL certificates for development environments
Project description
Local SSL Manager
A command-line tool to create and manage local SSL certificates for development environments.
Features
- Create self-signed SSL certificates for local domains
- Automatically update /etc/hosts file
- Set up browser trust for the certificates
- Domain-specific logging
- Interactive domain management
Installation
pip install local-ssl-manager
Requirements
- Python 3.8 or higher
mkcerttool (will be installed automatically if possible)- Admin/sudo privileges (for /etc/hosts and certificate installation)
Usage
Create a new local domain with SSL certificate
ssl-manager create --domain myproject.local
Create a single certificate for multiple domains
ssl-manager create-multi --domains "app.local,api.local,admin.local"
Delete a domain and its certificate
ssl-manager delete
This will show an interactive selector to choose which domain to delete.
List all managed domains
ssl-manager list
Export a certificate for use elsewhere
ssl-manager export --domain myproject.local --output /path/to/export/dir
Import an existing certificate
ssl-manager import-cert --domain myproject.local --cert /path/to/cert.crt --key /path/to/key.key
View help
ssl-manager --help
Configuration
By default, Local SSL Manager stores all certificates and configuration in ~/.local-ssl-manager/.
You can customize the location by setting the SSL_MANAGER_HOME environment variable.
How it works
- Creates a local Certificate Authority (CA) using mkcert
- Installs the CA certificate in your system and browser trust stores
- Creates domain-specific certificates signed by your local CA
- Updates your hosts file to point the domains to 127.0.0.1
- Maintains metadata about your certificates for easy management
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Development Setup
-
Clone the repository
-
Install development dependencies:
pip install -e ".[dev]"
-
Install pre-commit hooks:
pip install pre-commit pre-commit install
Release Process
This project uses semantic versioning and releases from tags. The package is automatically built and published to PyPI when a new version tag is pushed using GitHub Actions.
Using the Deployment Script (Recommended)
The easiest way to deploy a new version is to use the included deployment script:
-
Ensure you're on the main branch with a clean working directory
-
Run the deployment script:
# Option 1: Interactive mode (will prompt for version and tag message) python deploy.py # Option 2: Non-interactive mode python deploy.py --version 0.1.1 --message "Add new features X and Y"
-
The script will:
- Update the version in pyproject.toml
- Commit the change
- Create and push a Git tag
- Push changes to GitHub
- GitHub Actions will automatically build and publish to PyPI
Manual Deployment
If you prefer to deploy manually:
-
Update the version in
pyproject.toml -
Commit the change:
git commit -am "Bump version to 0.1.1"
-
Create a tag with a message:
git tag -a v0.1.1 -m "Version 0.1.1: Add new features X and Y"
-
Push the changes and tag:
git push origin main git push origin v0.1.1
-
GitHub Actions will detect the new tag and publish to PyPI
Verifying Deployment
After pushing the tag:
- Check the GitHub Actions workflow at:
https://github.com/PalionTech/local-ssl-manager/actions - Verify the new version appears on PyPI:
https://pypi.org/project/local-ssl-manager/
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file local_ssl_manager-0.1.4.tar.gz.
File metadata
- Download URL: local_ssl_manager-0.1.4.tar.gz
- Upload date:
- Size: 25.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c0d958f7be816d427fbbd0a9214330b871ca01266a4d2cc4a6a99ed80ebef42
|
|
| MD5 |
598479ceb2ae7a3474624ea750ab29bb
|
|
| BLAKE2b-256 |
4df29642f591bced708d0ab388fb423b224a83e99fdf490289472ccdc02da46a
|
File details
Details for the file local_ssl_manager-0.1.4-py3-none-any.whl.
File metadata
- Download URL: local_ssl_manager-0.1.4-py3-none-any.whl
- Upload date:
- Size: 23.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4059197a0177613fcf5de6cfba8315a3a9371ec703328001bcb2a8f3a1f75229
|
|
| MD5 |
1c528d34a2445da8f1a219facff52043
|
|
| BLAKE2b-256 |
31d4b25541b608b7580af8e0277d452b4e3b041a6dab661cc295787e49519f0e
|