Skip to main content

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
Radon metric gates MI/CC thresholds, p5/p10/p95, calibrate
Architecture Layers and design decisions
Check flow Tool YAML → shipgate check

Contributing

See the contributing guide. Maintainers: AGENTS.md.

License

See LICENSE.

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.5.tar.gz (141.6 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.5-py3-none-any.whl (233.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: shipgate-0.1.5.tar.gz
  • Upload date:
  • Size: 141.6 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.5.tar.gz
Algorithm Hash digest
SHA256 b83184476947ccc87afd901677ca2cd0eac97cc098462ebe8ede75cd04b84dfa
MD5 453029171af529c85f26d66e41c09bcd
BLAKE2b-256 5f84992cd8b63d1b5916c58ebd63ca14ac73fbff14fe6a0e08f1dc04cb5ddbe9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: shipgate-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 233.2 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a2a65439e6700594d2d3a57c551e55c39be0394699de4c9b6d465f73c8be9c29
MD5 3b52cb705494e501f986c939a7fd6514
BLAKE2b-256 54a8d1fd7ed96a3f27e7fb3e08bd5ba1d9806f53308564f0cb6872c745345391

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

This release

0.1.5 This release

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page