Skip to main content

bygge

CI PyPI Python Version License

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.

Licence

MIT License - see LICENSE for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bygge-0.1.4.tar.gz (45.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bygge-0.1.4-py3-none-any.whl (46.0 kB view details)

Uploaded Python 3

File details

Details for the file bygge-0.1.4.tar.gz.

File metadata

  • Download URL: bygge-0.1.4.tar.gz
  • Upload date:
  • Size: 45.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bygge-0.1.4.tar.gz
Algorithm Hash digest
SHA256 5d5c36914ce024bb5231e2f73ae12fca749ae909a799535bb1f397613b58985d
MD5 785194134b540b8e79dfd0020a814c4d
BLAKE2b-256 b9fd49577f5feab6a3a19f0c3d4fad9ebcc71ab3943c91b6b648cac74fc5ed13

See more details on using hashes here.

Provenance

The following attestation bundles were made for bygge-0.1.4.tar.gz:

Publisher: publish.yml on rcook/bygge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bygge-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: bygge-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 46.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bygge-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 119bbf27603dd2a102b30572162526de149281e2b95cb34437e1c2e6e9b48e28
MD5 41dd0980e38b56cb7f1410cc9ead3e75
BLAKE2b-256 8fac17520367df08ef8cc05c66f1d744851e70d2ce4a601e9edf35720fdc1bc7

See more details on using hashes here.

Provenance

The following attestation bundles were made for bygge-0.1.4-py3-none-any.whl:

Publisher: publish.yml on rcook/bygge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page