Skip to main content

About

A Cuty-Series Custom JavaScript Formatter

Installation

pip install cutyjs

Usage

Format a file or directory:

cutyjs path/to/file_or_directory

Check if files need formatting (useful for CI or pre-commit):

cutyjs --check path/to/project

If formatting changes are required in check mode, formatter exits with a non-zero status code.

About

The tool is a minimal and fast Python formatter designed to enforce consistent formatting rules across Python codebases.

Unlike large formatters that heavily restructure code, CutyJS focuses on deterministic formatting rules applied through a small rule engine. Each rule handles a specific formatting concern such as indentation, spacing, blank lines, or import ordering.

The formatter processes files using modular formatting rules, making the system easier to reason about, extend, and control.

Features

  • Deterministic Python formatting
  • Rule-based formatting system
  • Import sorting
  • Consistent indentation enforcement
  • Blank line normalization
  • Trailing space cleanup
  • Line ending normalization
  • Automatic EOF newline insertion
  • Optional check mode for CI pipelines

Project Structure

cutyjs
├── __init__.py
├── __main__.py
├── checker
│   ├── __init__.py
│   └── check_line_length.py
├── cli
│   ├── __init__.py
│   ├── args_handler.py
│   └── version.py
├── common
│   ├── __init__.py
│   ├── compact.py
│   ├── expand.py
│   └── reset.py
├── core
│   ├── __init__.py
│   └── main.py
├── engine
│   ├── __init__.py
│   ├── discovery.py
│   ├── pipelines
│   │   ├── __init__.py
│   │   ├── check.py
│   │   └── solve.py
│   └── worker.py
├── models
│   ├── __init__.py
│   ├── args.py
│   └── content.py
└── solver
    ├── __init__.py
    ├── add_eof_double_blanks.py
    ├── add_keyword_blanks.py
    ├── fix_double_blanks.py
    ├── fix_import_order.py
    ├── fix_indentation.py
    ├── fix_line_ends.py
    └── remove_blanks.py

Design Philosophy

The formatter is built around a few core ideas:

  • Minimal implementation
  • Explicit formatting rules
  • Predictable output
  • Easy extensibility
  • Suitable for automation (CI / pre-commit)

Rather than trying to cover every stylistic decision, the formatter focuses on enforcing a small set of reliable formatting guarantees.

Made with <3 by AttAditya

Metadata

Release files for cutyjs 0.3.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 cutyjs 0.3.0
File Size Uploaded Provenance Actions
cutyjs-0.3.0.tar.gz 11.3 kB Without provenance Details for cutyjs-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cutyjs 0.3.0
File Interpreter ABI Platform Actions
cutyjs-0.3.0-py3-none-any.whl Python 3 none any Details for cutyjs-0.3.0-py3-none-any.whl

Total release size: 27.0 kB

Release files / cutyjs-0.3.0.tar.gz

Download URL cutyjs-0.3.0.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c92174968091d8716acbad530389155ef1883d86b4ff02309649c1c893d7f22a
BLAKE2b-256 checksum
How to use checksums
25026c9e228a2f0ab3f4c25b18cf99bfc2c5b8952abe9abe82f633756ace9461
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / cutyjs-0.3.0-py3-none-any.whl

Download URL cutyjs-0.3.0-py3-none-any.whl
Size 15.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
85a4106f257f0c03c6ed15ac7832505b2c3a2431ffe0bf86bb804400bf3e28f4
BLAKE2b-256 checksum
How to use checksums
59afe06f501557ba3a7583985c28725f5ca63e0187db10c4a889898853053c8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.13

Security for cutyjs 0.3.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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