isort CLI

The CLI sorts and groups Python imports so agents can prepare consistent changes with an inspectable diff before applying them.

  • 6,966 ★ on the repository
  • Last commit
  • MIT
CLI

Extended access

Why this level

  • The CLI rewrites imports in selected files; recursive execution can affect several project directories.
All reasons and checks

pycqa/isort

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/isort

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The CLI rewrites imports in selected files; recursive execution can affect several project directories.

This is third-party code. Review the repository files before installing.

What it does

Wrapping, indentation and import groups are defined in isort configuration. An agent applies those rules to selected Python files, and users inspect differences through `--diff` before writing. Keeping import ordering in a separate change makes functional edits easier to review. The CLI supports repeatable pre-review cleanup, editor integrations and pre-commit. Its rules should be aligned with other formatters used in the project.

Who it is for. Python code reviewers separating import-order cleanup from an agent’s functional edits.

Good fit when

  • Agent-added imports do not follow the project’s ordering rules.
  • A developer separates formatting from a functional change before review.
  • Several Python files use inconsistent import groups.
  • The team adds a local import check to `pre-commit` before creating a commit.

Not a fit when

  • You need one tool to format all Python syntax.
  • You expect automatic removal of every unused project dependency.
  • Import reordering would be accepted without reviewing or testing behavior.

Example request

Show the import-sorting diff only for changed Python files, keeping it separate from functional edits.

Limitations

The current isort requires Python 3.11 or newer to run, although formatted code may target another language version. It focuses on imports and does not replace whole-file formatting or program tests. The `--atomic` mode checks syntax before writing and is off by default because Python versions may differ. Recursive runs include nested files, so scope the directory and inspect proposed changes through `--diff` first.

How to disable. Remove isort from scripts or editor settings. Restore already applied import edits from a saved file or Git version.

FAQ

How do I inspect changes without writing?

Use `isort mypythonfile.py --diff`.

Can I process several files?

Yes. Pass their paths as separate arguments.

How do I process a directory?

Pass the directory path. For example, `isort .` processes the current directory recursively.

What does `--atomic` check?

isort checks syntax before writing changes. Test program behavior separately.

Does isort integrate with editors?

Yes. Separate plugins are available for several editors.

Discussion

No questions or reviews yet.

CLI tools

Tach is a Python CLI that checks imports separately from the running application, so architecture rules can run in CI.

CLIExtended access2.9KRepository stars

A CLI turns Git changes into a guided code walkthrough with questions and explanations written by your existing agent

CLIExtended access363Repository stars

typos is a spelling-check CLI with a preview diff, so users can review project names before writing corrections.

CLIExtended access4.2KRepository stars

Refurb analyzes Python code and suggests focused improvements with rule identifiers, explanations and target-version awareness.

CLIExtended access2.5KRepository stars

A CLI opens diffs and documents in a terminal so a person can annotate lines and pass feedback to a coding agent

CLIExtended access945Repository stars

A CLI that opens a local git diff in the browser like GitHub's Files changed tab; comments copy out as prompts for an agent

CLIExtended access3.3KRepository stars

README in short

Multiline import options and Black compatibility guidance are available. Pre-commit support integrates the CLI into project checks.

README badge

Report a problem

Foxx AIisort
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.