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.0? 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.0]
        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.0

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.0
File Size Uploaded Provenance Actions
smelt_cli-0.16.0.tar.gz 1.4 MB With provenance Details for smelt_cli-0.16.0.tar.gz

Built distributions (wheels)

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

Total release size: 10.0 MB

Release files / smelt_cli-0.16.0.tar.gz

Download URL smelt_cli-0.16.0.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
ccb54a07f41241bde8a74c8bd85bada090c9b08892b6e6c11418741893a05baa
BLAKE2b-256 checksum
How to use checksums
b596ae560288c3781213d7af49274655d88cdfc5ce5b88d9d2365e5e98e053f2
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.0-py3-none-win_amd64.whl

Download URL smelt_cli-0.16.0-py3-none-win_amd64.whl
Size 1.8 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
693e87e32126c52681fc207efbf6c39406c1b6881c848243c8c7ea4f619db507
BLAKE2b-256 checksum
How to use checksums
2df015a91c917817e5443cf05f39f796a5b07cf0acb246202e692b729502399f
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.0-py3-none-manylinux_2_28_x86_64.whl

Download URL smelt_cli-0.16.0-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
1f59791b47f210c80e31b5eff7c19bec0bc577e61046aca2fb97534b6072ddb2
BLAKE2b-256 checksum
How to use checksums
3559d8d971a35f07aac660d38e44e5fcbf8fde7f0c3b73108d5a0d5ba77403b5
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.0-py3-none-manylinux_2_28_aarch64.whl

Download URL smelt_cli-0.16.0-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
68b5a4537888dc377f26db0055bd5ba0acdba22f9b79ff63a2d159455d34d679
BLAKE2b-256 checksum
How to use checksums
6c9975531b225a56a21fcf7f64970390f08a993e7adf9bccbc4fda1e1221eed4
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.0-py3-none-macosx_11_0_arm64.whl

Download URL smelt_cli-0.16.0-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
93cb43698b0ab546faf239fd4fb57b09a8b6814728d06cbca5a8efa4196499e3
BLAKE2b-256 checksum
How to use checksums
c8257df3b804417dcbecb4312db17f507dec5aa6ddfc6ea1e36bff321ab05359
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.0-py3-none-macosx_10_12_x86_64.whl

Download URL smelt_cli-0.16.0-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
50e239b96e4226373605c0901c9a888f266ec27e466b54af76f808872a6f507c
BLAKE2b-256 checksum
How to use checksums
d95a149cb436df3d01626e6a139d9d1dc30e7d9e2ab310873ab9c311eb9d114f
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.0

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.0.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