English · 简体中文
Check and format TOML 1.0 and 1.1—from Rust, the command line, an editor, or the browser.
Documentation · Playground · VS Code · crates.io
TomlSmith is a source-aware TOML toolchain built in Rust. Its shared core powers a native CLI, a language server, and a browser-local Playground, so the same TOML version rules and diagnostics follow a document from the editor to CI.
Install the native CLI and check a file:
cargo install tomlsmith-cli --locked
tomlsmith check Cargo.toml
tomlsmith fmt --check Cargo.tomlFormat it when you are ready:
tomlsmith fmt Cargo.tomlTOML 1.1 is the default. Select TOML 1.0 explicitly for tools that require it:
tomlsmith --toml-version 1.0 check Cargo.tomlNo installation needed? Open the Playground. Analysis and formatting stay in your current browser tab.
| Where | Start here | What you get |
|---|---|---|
| Terminal and CI | tomlsmith-cli |
check, guarded fmt, fmt --check, and machine-readable diagnostics |
| Rust | tomlsmith |
A lossless, error-tolerant Document API for syntax, semantics, diagnostics, formatting, and highlighting |
| LSP editors | tomlsmith-lsp |
Diagnostics, formatting, semantic highlighting, hover, symbols, and folding |
| VS Code | TomlSmith for VS Code | A ready-to-use client for tomlsmith-lsp, including bundled servers on supported platforms |
| Browser | TomlSmith Playground | Local TOML 1.0/1.1 analysis, diagnostics, and format previews through WebAssembly |
- Explicit TOML versions. TOML 1.0 and 1.1 are separate modes across the library, CLI, LSP, and Playground.
- Formatting with safeguards. Invalid documents are not rewritten; comments and literal spellings are preserved in covered cases.
- Useful diagnostics. Findings include source ranges and stable codes, with JSON output for automation.
- Source-aware editor intelligence. Highlights distinguish TOML structures instead of treating every key or table alike.
- Verifiable behavior. The core publishes its
toml-testconformance scope, while the benchmark suite validates output before measuring it.
| Repository | Purpose |
|---|---|
tomlsmith |
Rust library, native CLI, and language server |
vscode-plugin |
VS Code client and TOML language integration |
playground |
Browser workbench powered by WebAssembly |
tomlsmith.github.io |
Website and English/Chinese documentation |
benchmark |
Reproducible end-to-end CLI performance measurements |
icon-assets |
Official brand sources and exported artwork |
Start with the core contribution guide, or open the guide in the repository you want to change. Bugs and feature requests are welcome in the relevant repository's issue tracker. Participation is governed by the project Code of Conduct.
TomlSmith is open source under the MIT License.
