Skip to main content

Portable quality-gate orchestrator for developer tools

Project description

shipgate

You start a Python project and quickly realize you need a pile of tools — linters, formatters, type checkers, secret scanners — each with its own config, install story, and CI glue. Before you write much code, you are maintaining a toolchain.

ShipGate is here. One policy, one catalog, three commands:

shipgate install
shipgate format
shipgate check

What's in the name?

Ship — move code out the door quickly. Gate — nothing merges until it passes the checklist.

ShipGate is fast to set up and especially strong with AI agents: pair shipgate with pre-commit so every commit (human or agent) hits the same gates. No bad code skips the gate.

Quick start

1. Activate your environment

Use whatever virtualenv or project env you already prefer:

source .venv/bin/activate
# or: uv sync && source .venv/bin/activate

2. Install ShipGate from PyPI

pip install shipgate
# or: uv add --dev shipgate

Optional report UI extras: pip install 'shipgate[server]'.

Requires Python 3.11–3.14 (prefer 3.13 for the full suite; Semgrep does not support 3.14 yet).

3. Initialize project policy

shipgate init
# or: shipgate init pyproject

This scaffolds everything needed to run the gates: .shipgate/shipgate.yaml (or [tool.shipgate]), plus .shipgate/configs/, .shipgate/catalog/, .shipgate/gates/, and cache metadata.

4. Install suite tools

shipgate install

Downloads and wires the tools for your configured suite (env: managed keeps them under .shipgate/tools/).

5. Hook up pre-commit (optional)

Add a local hook that runs ShipGate on commit, then install hooks:

# .pre-commit-config.yaml
repos:
  - repo: local
    hooks:
      - id: shipgate-format
        name: shipgate format
        entry: shipgate format --target .
        language: system
        pass_filenames: false
      - id: shipgate-check
        name: shipgate check
        entry: shipgate check --target .
        language: system
        pass_filenames: false
pre-commit install

6. Run the report UI (optional)

pip install 'shipgate[server]'
shipgate serve --open

Browse suite runs and findings at http://127.0.0.1:8765/.

ShipGate report UI overview showing a failed quality gate

Check example

Report-only quality run (does not rewrite files). Success is silent; failures exit 1, print findings, and write under .shipgate/reports/.

Error format is configurable. Set error-format in .shipgate/shipgate.yaml (or [tool.shipgate]), or override per run with --error-format. Built-ins: compact, text, log, json, and github (PR annotations).

shipgate check --check ruff.lint --target app.py --error-format compact

Example failure output (compact):

app.py:1: error: E401 Multiple imports on one line
app.py:1: error: I001 Import block is un-sorted or un-formatted
app.py:1: error: F401 `os` imported but unused
app.py:1: error: F401 `sys` imported but unused
app.py:3: error: E302 Expected 2 blank lines, found 1
app.py:3: error: E201 Whitespace after '('
app.py:3: error: E202 Whitespace before ')'
app.py:4: error: E111 Indentation is not a multiple of 4
app.py:4: error: F841 Local variable `unused` is assigned to but never used
app.py:5: error: E111 Indentation is not a multiple of 4
app.py:5: error: E201 Whitespace after '('
app.py:5: error: E202 Whitespace before ')'
app.py:6: error: E111 Indentation is not a multiple of 4
app.py:6: error: E226 Missing whitespace around arithmetic operator

Same findings as text:

shipgate check --check ruff.lint --target app.py --error-format text
[ruff.lint]
- [error] E401: Multiple imports on one line (app.py:1)
- [error] I001: Import block is un-sorted or un-formatted (app.py:1)
- [error] F401: `os` imported but unused (app.py:1)
- [error] F401: `sys` imported but unused (app.py:1)
- [error] E302: Expected 2 blank lines, found 1 (app.py:3)
- [error] E201: Whitespace after '(' (app.py:3)
- [error] E202: Whitespace before ')' (app.py:3)
- [error] E111: Indentation is not a multiple of 4 (app.py:4)
- [error] F841: Local variable `unused` is assigned to but never used (app.py:4)
- [error] E111: Indentation is not a multiple of 4 (app.py:5)
- [error] E201: Whitespace after '(' (app.py:5)
- [error] E202: Whitespace before ')' (app.py:5)
- [error] E111: Indentation is not a multiple of 4 (app.py:6)
- [error] E226: Missing whitespace around arithmetic operator (app.py:6)
shipgate check
shipgate check --suite security
shipgate check --target src
shipgate check --error-format github   # CI / PR annotations

Format example

Apply formatters / autofix tools from the format suite (success is silent):

shipgate format --target .

When files need formatting, a report-only format check surfaces the drift:

shipgate check --check ruff.format --target app.py --error-format compact
ruff.format: error: TOOL_EXIT Would reformat: app.py
1 file would be reformatted

With --display-cli, ShipGate prints the tool command it runs:

shipgate format --check ruff.format --target . --display-cli
ruff.format: .shipgate/tools/python/bin/ruff format --config .shipgate/configs/ruff.toml .

Features

  • Policy-first — suite, scopes, and thresholds in .shipgate/ or [tool.shipgate]; catalog metadata owns how each tool runs
  • Three verbsinstall, format (writes), check (report-only)
  • Suites — named checklists instead of hand-rolled CI scripts
  • Quiet success — exit 0 with no noise; structured failures otherwise
  • Managed tools — optional installs under .shipgate/tools/
  • Gitignore-aware path delivery
  • Extensible project-local catalog entries and policy gates
  • Report UI via shipgate[server]

Docs

Doc Contents
Usage guide Suites, config, error formats, CI, gates, tools
Architecture Layers and design decisions
Check flow Tool YAML → shipgate check

Contributing

See the contributing guide. Maintainers: AGENTS.md.

License

See LICENSE.

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

shipgate-0.1.3.tar.gz (130.0 kB view details)

Uploaded Source

Built Distribution

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

shipgate-0.1.3-py3-none-any.whl (214.8 kB view details)

Uploaded Python 3

File details

Details for the file shipgate-0.1.3.tar.gz.

File metadata

  • Download URL: shipgate-0.1.3.tar.gz
  • Upload date:
  • Size: 130.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for shipgate-0.1.3.tar.gz
Algorithm Hash digest
SHA256 45b66eec22e5720dcdcfcd30e9c6d98db738011b2c68ae4a6c3103736d7ea30b
MD5 adad8b2d9bd2976a268379ef41459b9c
BLAKE2b-256 505bd38ab60f259898c6ba5e035dc09f0285381a96037b1d6c0d7acf04972c3a

See more details on using hashes here.

File details

Details for the file shipgate-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: shipgate-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 214.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for shipgate-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b7a5d8a9960834f10fc72eae43aad15b187c18257de4df47422548f0e6a45bcd
MD5 1268f6f0e0ff47f4d98a541c847d9d46
BLAKE2b-256 de85758a9948854b7cacb77b66c6a3eb1b6b7d9eb4a869b83a9fd82f3564688b

See more details on using hashes here.

Supported by

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