Simple CLI for hiding and extracting files inside images using LSB (Least Significant Bit) steganography.
Key features
- Password-protected encoding/decoding
- Embed any file type (automatic extension preservation)
- Image-aware encoders for improved fidelity when embedding images
- Inspect embedding capacity for a given image and level
Install the package locally (editable mode useful during development):
pip install -e .Install development extras:
pip install -e .[dev]Installing the package provides the steg CLI entry point.
Recommended: if you use the uv helper (recommended for working inside the project's virtual environment), install with uv:
# Recommended (uses the project's virtual environment):
uv pip install -e .
# Dev extras via `uv`:
uv pip install -e .[dev]Basic commands:
- Encode a file into a cover image (in-place):
steg encode secret.txt cover.png- Decode a hidden file from a cover image:
steg decode cover.pngThe CLI will prompt for a password and (when decoding) an output base name. The correct file extension is appended automatically.
For help and options:
steg --help
steg encode --help
steg decode --helpThe encoder supports levels 1..8. Higher levels increase embedding capacity but make the embedding less discreet. The header is stored starting at level 1 so it is always read first. Use the capacity command to check how many bytes can be embedded for a given image and level.
- Common image formats:
.png,.jpg,.bmp,.tiff,.gif - Any other file can be embedded as raw binary; the original extension is preserved in metadata.
- Encoding modifies the cover image file in-place by default — make a backup if needed.
- Ensure the cover image is large enough to hold the payload at the chosen level.
- The CLI prompts for a password; encoding and decoding require the same password.
Install dev dependencies and run tests:
uv pip install -e .[dev]
pytest -q- Open an issue or PR describing the change.
- Include tests for new features and update the README when appropriate.