Getting Started
Requirements
- Python 3.9+
- A virtual environment (recommended)
- Dependencies installed in the same environment where LicenseGuard runs
- A
requirements.txtfile with the dependencies you want to evaluate
Install LicenseGuard
Install from PyPI
pip install licenseguard
Install from source (this repository)
pip install .
Development install (editable)
pip install -e ".[dev]"
Development extras include test dependencies used by this repository.
Verify environment
python --version
pip --version
licenseguard --version
If the licenseguard command is not found, activate the correct virtual environment and reinstall.
Understand installed-only behavior
LicenseGuard intentionally scans only what is currently installed.
If a package is listed in requirements.txt but not installed, it is skipped.
This design avoids mismatches between declared dependencies and runtime reality.
First scan (CLI mode)
licenseguard scan requirements.txt --cli
This command:
- Parses package names from
requirements.txt - Resolves only installed packages (direct + transitive)
- Detects and normalizes license metadata
- Applies built-in or custom policy rules
- Prints table + summary + JSON report
First scan (Web dashboard mode)
licenseguard scan requirements.txt
This launches the local web UI. In current UX, scan execution is manual: click Run scan.
Typical workflow
- Install project dependencies
- Run LicenseGuard scan
- Review denied/restricted packages
- Add or adjust a policy file
- Enforce in CI with
--fail-on - Store JSON artifacts for historical comparison
Expected outputs
Every run returns:
rows: package-level findingssummary: status counts and worst statuswarnings: parse/resolution/network warnings
In --check-latest mode, row-level drift fields are added.
Next steps
- Continue with CLI Reference for complete command options
- Continue with Policy Guide for policy design
- Continue with CI/CD Integration for pipeline setup
Verify installation
licenseguard --version
Expected output includes the current version, such as licenseguard 0.3.0.