Skip to content

GriffinCanCode/Standardize

Repository files navigation

Standardize

A high-performance, extensible code formatting tool designed to surpass existing solutions like Prettier and Black by providing consistent, configurable, and intelligent formatting across multiple programming languages.

Features

  • Multi-Language Support: Rust, Python, TypeScript/JavaScript with extensible plugin architecture
  • Tree-sitter Powered: Robust parsing with incremental updates
  • High Performance: Parallel processing and memory-efficient AST transformations
  • Smart Formatting: Context-aware formatting that respects developer intent
  • Unified Configuration: Consistent code style across polyglot codebases
  • Developer Tools: Format-on-save, git pre-commit hooks, partial file formatting
  • Stable & Idempotent: Consistent formatting results across runs

Installation

cargo install standardize

Usage

# Format a single file
standardize format src/main.rs

# Format entire project
standardize format .

# Check formatting without making changes
standardize check src/

# Watch and format on save
standardize watch src/

Configuration

Create a .standardize.toml file in your project root:

[general]
max_line_length = 100
indent_style = "spaces"
indent_size = 4

[rust]
edition = "2021"
format_strings = true

[python]
line_length = 88
quote_style = "double"

[typescript]
semicolons = true
trailing_commas = "es5"

Architecture

Built with SOLID principles and modular design:

  • Single Responsibility: Each module has a focused purpose
  • Open/Closed: Extensible through plugins without modifying core
  • Liskov Substitution: Language formatters are interchangeable
  • Interface Segregation: Clean abstractions for parsing and formatting
  • Dependency Inversion: Core logic depends on abstractions, not implementations

Contributing

Built by Griffin (@GriffinCanCode). Contributions welcome!

License

MIT License

About

File formatting, done right.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages