Skip to main content

smelt

Your Python style guide, enforced by code.

Every team has a style guide: application code doesn't import the database, tests mirror the source tree, internals stay private, None checks are explicit. Usually it lives in a wiki or an AGENTS.md, and code review enforces it by hand. Coding agents skim it, so reviewers write the same comment again and again.

Smelt turns that guide into checks. Each convention is one line in smelt.yml, and Smelt enforces it before an edit, after it, at commit time and in CI, with a finding that says what broke and how to fix it.

The style guide in prose:

Application code must not depend on infrastructure. Use a port.

The same rule in smelt.yml:

architecture:
  layers:
    domain: {path: domain, may_depend_on: []}
    application: {path: application, may_depend_on: [domain]}
    infrastructure: {path: infrastructure, may_depend_on: [domain, application]}

rules:
  architecture/layer-boundary: error

And what an agent sees when it breaks it:

src/shop/application/checkout.py:2:42  ARC001 architecture/layer-boundary  [error]
  application must not depend on infrastructure
    from shop.infrastructure.database import SqlOrderRepository
  Allowed: application → domain
  Hint: Move what application needs into a layer it may depend on (domain), or invert
        the dependency behind an abstraction.

Why Smelt?

  • The config is the style guide. A rule runs only when smelt.yml names it, so the file is the complete, reviewable list of your conventions.
  • Architecture, tests and code style. Layers, features, package APIs, mirrored tests, test quality, typing, visibility and modeling conventions.
  • Built for agents. smelt context tells an agent the rules for a file before it writes it; --changed and --staged report only what it introduced.
  • Adoptable. A debt baseline lets an existing codebase fail only on new violations.

Get started

uv tool install smelt-cli   # Python 3.12+
smelt init                  # draft smelt.yml from your layout
smelt check                 # enforce it

Upgrading to 0.16.1? See the upgrade guide.

You want to… Command
Check the project smelt check --fail-on warning
Check only your changes smelt check --changed
Check the commit smelt check --staged --fail-on warning
Get the rules for a file before writing it smelt context src/shop/application/refunds.py --guide
Understand a finding smelt explain ARC001
Find rules you haven't decided on smelt rules --unconfigured
Accept existing findings smelt debt
Give agents the offline reference smelt skill install

Enforce it at commit time

With prek, add this to .pre-commit-config.yaml and run prek install:

repos:
  - repo: local
    hooks:
      - id: smelt-staged
        name: smelt
        entry: smelt check --staged --fail-on warning
        language: python
        additional_dependencies: [smelt-cli==0.16.1]
        pass_filenames: false
        always_run: true
        require_serial: true

Run smelt check --fail-on warning in CI. See integrations.

Documentation

Level Guide You learn
1 First check Write the first rules, read and act on findings
2 Architecture boundaries Layers, features, composition root, third-party imports
3 Tests that mirror the source Test layout and test quality rules
4 The agent loop context, changed and staged checks, hooks, CI
5 Existing codebases Debt baselines and strict policy coverage
6 Scaling the policy Package APIs, shared configs, uv workspaces

Reference: configuration, rule catalog, CLI, all docs, changelog, contributing.

Smelt analyzes source statically and never runs your code. Use it alongside tests, a type checker and Ruff. See scope and limits.

Metadata

Release files for smelt-cli 0.16.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for smelt-cli 0.16.1
File Size Uploaded Provenance Actions
smelt_cli-0.16.1.tar.gz 1.4 MB With provenance Details for smelt_cli-0.16.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for smelt-cli 0.16.1
File Actions
smelt_cli-0.16.1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for smelt_cli-0.16.1-py3-none-win_amd64.whl
smelt_cli-0.16.1-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details for smelt_cli-0.16.1-py3-none-manylinux_2_28_x86_64.whl
smelt_cli-0.16.1-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details for smelt_cli-0.16.1-py3-none-manylinux_2_28_aarch64.whl
smelt_cli-0.16.1-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for smelt_cli-0.16.1-py3-none-macosx_11_0_arm64.whl
smelt_cli-0.16.1-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for smelt_cli-0.16.1-py3-none-macosx_10_12_x86_64.whl

Total release size: 10.1 MB

Release files / smelt_cli-0.16.1.tar.gz

Download URL smelt_cli-0.16.1.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
869bfe9cc583991a5c3544ede70cb88c327e77d6376635767253d12dff51bee2
BLAKE2b-256 checksum
How to use checksums
a8239e757557668720e7c7be239b924587b2b0c947c2157413c88125b45ee5d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Release files / smelt_cli-0.16.1-py3-none-win_amd64.whl

Download URL smelt_cli-0.16.1-py3-none-win_amd64.whl
Size 1.8 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
18c2af1a748167ef08ed69d023e66e402009e0e37b882abbdfaafe8b8c8ead51
BLAKE2b-256 checksum
How to use checksums
f8ad6efbb05550d2908173bd3e55a3d6e963edbc37b0dc6a7218d7d9bc54ed36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Release files / smelt_cli-0.16.1-py3-none-manylinux_2_28_x86_64.whl

Download URL smelt_cli-0.16.1-py3-none-manylinux_2_28_x86_64.whl
Size 1.8 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
dd49d9b4294bd775d3be2b3eaa8242f97bd69457722257b233c6b60e46132445
BLAKE2b-256 checksum
How to use checksums
e04f36930f015a43ad90afe26b4ce6546cd017320ed3e0ecb9e5b36c0c0c818c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Release files / smelt_cli-0.16.1-py3-none-manylinux_2_28_aarch64.whl

Download URL smelt_cli-0.16.1-py3-none-manylinux_2_28_aarch64.whl
Size 1.7 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
dabecbe27efcb04f7fa6cbfe3664acf49c3a9e49b75e354f140a4528450e28e2
BLAKE2b-256 checksum
How to use checksums
4bb629d6350ac6c5f06def03c9a6aedefc1b92ee09724fba5709554ca7177d72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Release files / smelt_cli-0.16.1-py3-none-macosx_11_0_arm64.whl

Download URL smelt_cli-0.16.1-py3-none-macosx_11_0_arm64.whl
Size 1.7 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
0d9bdfcc310503b4c4fc4698e94cc19e85762b67a91cab2e40fd5aea5fcbb9c3
BLAKE2b-256 checksum
How to use checksums
8f1ae1abe643c7e968764edb94a32ac799eb9cfaf39ce2744bad6da292ed93c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Release files / smelt_cli-0.16.1-py3-none-macosx_10_12_x86_64.whl

Download URL smelt_cli-0.16.1-py3-none-macosx_10_12_x86_64.whl
Size 1.7 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
bbebba4bc4ec73496d0e3a7c464a63d43b24c43a156aaa65ea4bce9b76f1d089
BLAKE2b-256 checksum
How to use checksums
a5d074b4aad14d123652e70fc1296278945e84b5de9d1bc95ba1bf258f3e8c8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Security for smelt-cli 0.16.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for smelt_cli-0.16.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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