Python project build and development tool - CLI for workspace management (Norwegian: 'to build')
Project description
bygge
bygge (pronounced BYG-eh, Norwegian for "to build") โ A CLI tool for Python project development and workspace management.
bygge simplifies development workflows for Python projects by providing a consistent interface for common tasks: testing, linting, type-checking, formatting, and more. It works with both single-package projects and multi-package monorepos.
Features
- ๐ง Unified CLI โ One command (
bygge check) runs all your quality checks - ๐ฆ Monorepo support โ Manages multiple packages with inter-dependencies
- ๐ Plugin-based โ Automatically detects and configures tools (pytest, ruff, basedpyright)
- ๐ฏ Convention over configuration โ Works out-of-the-box with standard Python project layouts
- ๐ Fast โ Runs checks in topological order for correct dependency resolution
- ๐ช Git hooks โ Built-in pre-commit hook support
Installation
pip install bygge
For development:
pip install bygge[dev]
Quick Start
Initialize your project:
# Create .bygge.toml configuration
cat > .bygge.toml << 'EOF'
[workspace]
venv_dir = ".venv"
optional_deps = ["dev"]
coverage_baseline = 100
EOF
# Install git hooks
bygge hooks
# Run all checks (format, lint, typecheck, test with coverage)
bygge check
Usage
Common commands
bygge test # Run tests
bygge coverage # Run tests with coverage report
bygge fmt # Format code and sort imports
bygge lint # Lint code
bygge typecheck # Type-check code
bygge check # Run all checks (same as pre-commit)
Check modes
Most commands support --check mode for CI/validation:
bygge fmt --check # Verify formatting without changes
bygge lint --check # Verify linting without changes
Environment setup
bygge init # Create venv and install packages
bygge info # Show environment information
Git integration
bygge hooks # Install pre-commit hook
bygge unhook # Remove pre-commit hook
bygge commit-unchecked # Commit bypassing hooks (use sparingly)
Configuration
Create a .bygge.toml file at your project root:
Single package project
[workspace]
venv_dir = ".venv"
optional_deps = ["dev"]
coverage_baseline = 100
Monorepo (multiple packages)
[workspace]
package_root_dir = "packages" # Directory containing your packages
venv_dir = ".venv"
optional_deps = ["dev"]
coverage_baseline = 95
Tool Detection
bygge automatically detects and uses tools from your project dependencies:
| Tool | Purpose | Detected from |
|---|---|---|
| pytest | Unit testing | pytest in dependencies |
| pytest-cov | Coverage reporting | pytest-cov in dependencies |
| basedpyright | Type checking | basedpyright in dependencies |
| ruff | Linting & formatting | Built-in (no detection needed) |
Configuration is read from your pyproject.toml:
- Pytest:
[tool.pytest.ini_options] - Basedpyright:
[tool.basedpyright] - Ruff:
[tool.ruff]
Monorepo Support
For projects with multiple packages, bygge handles:
- Topological sorting โ Installs packages in dependency order
- Multi-package discovery โ Finds all packages under
package_root_dir - Unified testing โ Runs tests across all packages
- Cross-package coverage โ Reports combined coverage
Example monorepo structure:
myproject/
โโโ .bygge.toml
โโโ pyproject.toml
โโโ packages/
โ โโโ common/
โ โ โโโ pyproject.toml
โ โ โโโ src/common/
โ โ โโโ tests/
โ โโโ lib/
โ โ โโโ pyproject.toml
โ โ โโโ src/lib/
โ โ โโโ tests/
โ โโโ app/
โ โโโ pyproject.toml
โ โโโ src/app/
โ โโโ tests/
โโโ .venv/
Why bygge?
- Consistency โ Same commands work across all your projects
- Simplicity โ No need to remember different tool invocations
- Reliability โ Runs checks in the right order for monorepos
- Speed โ No overhead from meta-build systems; direct tool invocation
- Transparency โ Just a thin wrapper; you can always call tools directly
Name
bygge is Norwegian for "to build" โ fitting for a build and development tool. Pronounced BYG-eh (rhymes with "dig-eh").
Contributing
See DEV.md for development setup and guidelines.
License
MIT License - see LICENSE for details.
Project details
Release history Release notifications | RSS feed
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 bygge-0.1.0.tar.gz.
File metadata
- Download URL: bygge-0.1.0.tar.gz
- Upload date:
- Size: 42.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa0871a5c0862d3cd02e5df968c3ee9f06a28d6d4a1fa6d2f0966308217cb782
|
|
| MD5 |
86fa4a03ace1f03e02a40fe523944968
|
|
| BLAKE2b-256 |
d50dd7efa87a0594df1e0f2777b8746ec3ce9ea3e58cc0b14397a33856b58d1a
|
Provenance
The following attestation bundles were made for bygge-0.1.0.tar.gz:
Publisher:
publish.yml on rcook/bygge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bygge-0.1.0.tar.gz -
Subject digest:
fa0871a5c0862d3cd02e5df968c3ee9f06a28d6d4a1fa6d2f0966308217cb782 - Sigstore transparency entry: 1874461285
- Sigstore integration time:
-
Permalink:
rcook/bygge@5ebb2f9261ad25a3ab8c8e24cd638dd160c28a38 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/rcook
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5ebb2f9261ad25a3ab8c8e24cd638dd160c28a38 -
Trigger Event:
push
-
Statement type:
File details
Details for the file bygge-0.1.0-py3-none-any.whl.
File metadata
- Download URL: bygge-0.1.0-py3-none-any.whl
- Upload date:
- Size: 39.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b8548fcc1c1163d700dc6f5ea5eeda8441f43e126f1c58c29da3c73b392c343
|
|
| MD5 |
da4cd1a07b27876696a6383cb07b513e
|
|
| BLAKE2b-256 |
c5322f05585c8d7686b68f28dbd6c8667d208e3be88f24170ff1b6c4d65f5b5c
|
Provenance
The following attestation bundles were made for bygge-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on rcook/bygge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bygge-0.1.0-py3-none-any.whl -
Subject digest:
5b8548fcc1c1163d700dc6f5ea5eeda8441f43e126f1c58c29da3c73b392c343 - Sigstore transparency entry: 1874461300
- Sigstore integration time:
-
Permalink:
rcook/bygge@5ebb2f9261ad25a3ab8c8e24cd638dd160c28a38 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/rcook
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5ebb2f9261ad25a3ab8c8e24cd638dd160c28a38 -
Trigger Event:
push
-
Statement type: