$npx skillfedfor your agent

pycln

A formatter for finding and removing unused import statements.

Worth itPyPI UtilitiesReleased Oct 2025349.2K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pycln-2.6.0-py3-none-any.whl
v2.6.0 · released 2025-10-21 · Python <4,>=3.9 · 5 runtime deps: typer, pyyaml, pathspec, tomlkit, libcst

Yes. Pycln solves a real maintenance problem with low friction and permissive licensing. The aging maintenance status (297 days since last release) is a minor concern but not a blocker—the repository is active, no vulnerabilities are known, and the tool is trusted by established projects. Install it if import cleanup is a workflow need.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.9 or later.
  • Low install friction with a pure-Python wheel distribution.
  • Maintenance status is aging—last release was 297 days ago—but the repository remains active with a recent commit on 2026-01-13 and no archived status.

License · maintenance · safety

MIT (permissive) — MIT license is permissive; you can use, modify, and distribute pycln with minimal restrictions, making it suitable for both open-source and commercial projects.

last release 2025-10-21 (297 days) · last repo commit 2026-01-13 · 314 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 349,230 downloads/mo, #7,336 on PyPI

Verify before relying

pip install pycln
pycln /path/to/code

# Or as a module:
python3 -m pycln /path/to/code
  • Whether the -a/--all flag is necessary for typical use cases or only for edge cases.
  • How pycln handles complex import patterns (star imports, conditional imports, type hints).
  • Performance characteristics on large codebases or deeply nested directory structures.
Same gist for agents: .md · .json

What it is and what it does

Pycln is a command-line formatter that scans Python source files to identify and remove unused import statements. It reads code using libcst for precise syntax tree analysis and can be configured via pyproject.toml or setup.cfg to apply project-specific rules like custom include/exclude patterns. The tool runs as a standalone CLI or as a Python module and integrates into CI/CD workflows and editor toolchains.

The package depends on typer for CLI argument handling, pyyaml for configuration parsing, pathspec for file matching, tomlkit for TOML manipulation, and libcst for abstract syntax tree operations. It targets modern Python versions (3.9 through 3.14) and is used by high-profile projects including Poetry, Rich, and pybind11.

Use it for

  • Clean up import sections in a Python project before committing or deploying code.
  • Integrate into a pre-commit hook or CI pipeline to enforce import hygiene automatically.
  • Refactor legacy codebases where imports have accumulated over time without cleanup.
  • Configure project-wide import rules in pyproject.toml to standardize import handling across a team.
  • Use as a linting step in build tools like cibuildwheel or Poetry to validate import statements.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

Pycln solves a real maintenance problem with low friction and permissive licensing. The aging maintenance status (297 days since last release) is a minor concern but not a blocker—the repository is active, no vulnerabilities are known, and the tool is trusted by established projects. Install it if import cleanup is a workflow need.

Install

pycln on PyPI

Before you install

Low install friction with a pure-Python wheel distribution. Maintenance status is aging—last release was 297 days ago—but the repository remains active with a recent commit on 2026-01-13 and no archived status.

Requires Python 3.9 or later.

License in practice

MIT license is permissive; you can use, modify, and distribute pycln with minimal restrictions, making it suitable for both open-source and commercial projects.

Quickstart

pip install pycln
pycln /path/to/code

# Or as a module:
python3 -m pycln /path/to/code

Verify before relying

  • Whether the -a/--all flag is necessary for typical use cases or only for edge cases.
  • How pycln handles complex import patterns (star imports, conditional imports, type hints).
  • Performance characteristics on large codebases or deeply nested directory structures.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release <4,>=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
5 packages
typerpyyamlpathspectomlkitlibcst
MaintenanceAging 297 days since the last release
Last repo commit
First released
Downloads349,230 / month, #7,336 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Utilities

Evidence: pycln-2.6.0-py3-none-any.whl

Tags

Capabilities
remove unused imports pythonimport cleanup formatterunused import detectionpython import linterclean up import statementsimport statement formatterunused imports remover
Topics
import-cleanupcode-qualitycli-tool
PyPI keywords
formatterlinterquality-assurancetoolscli

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “import cleanup formatter”

  • pyclnPycln finds and removes unused import statements from Python code,…
  • autoflakeautoflake removes unused imports and unused variables from Python…
  • mbakembake formats and lints Makefiles, enforcing consistent spacing, tab…

Give your agent the search over MCP, or paste the wish link into any chat.

More Utilities packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
charset-normalizer Worth it
PyPI · Utilities · released Aug 2026

Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.

permissive licensepure Python · 3.7+
1.7Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
Pygments Worth it
PyPI · Utilities · released Mar 2026

Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.

Install it if you need to display or transform source code.

BSD-2-Clausepure Python · 3.9+
1.3Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo

See also autoflake · clang-tidy · uncalled · creosote · clang-format · pip-check-reqs · tclint · usort · deadcode · pytest-unused-fixtures