cbfmt
brew install cbfmt
v0.2.0
MIT
Format codeblocks inside markdown and org documents
7
30-day installs · #9820
21
90-day · #9624
178
365-day · #7658
187
★ GitHub stars · updated 3y ago
Build dependencies
GitHub topics
codeblocks
command-line-tool
formatter
markdown
org-mode
restructuredtext
rust
Links
- https://github.com/lukas-reineke/cbfmt
- GitHub: lukas-reineke/cbfmt
- Brew formula source: Formula/c/cbfmt.rb
Raw metadata
{
"aliases": [],
"alternatives": [],
"build_dependencies": [
"rust"
],
"categories": [],
"caveats": null,
"conflicts_with": [],
"dependencies": [],
"deprecated": 0,
"deprecation_reason": null,
"desc": "Format codeblocks inside markdown and org documents",
"disable_reason": null,
"disabled": 0,
"enrichment_fetched_at": "2026-06-20T23:36:11+00:00",
"first_seen": "2026-06-20T23:34:18+00:00",
"full_name": "cbfmt",
"github_default_branch": "master",
"github_last_commit_at": "2023-03-01T14:59:57Z",
"github_readme_excerpt": "\u003cp align=\"center\"\u003e\n \u003cimg height=\"400\" src=\"https://user-images.githubusercontent.com/12900252/188409065-2149a392-e5cb-4486-8d2b-b80f9022ef4c.png\" alt=\"cbfmt\" /\u003e\n\u003c/p\u003e\n\n# cbfmt (codeblock format)\n\nA tool to format codeblocks inside markdown, org, and restructuredtext documents. \nIt iterates over all codeblocks, and formats them with the tool(s) specified for\nthe language of the block.\n\n## Install\n\n### Download from GitHub\n\nDownload the latest release binaries from [github.com/lukas-reineke/cbfmt/releases](https://github.com/lukas-reineke/cbfmt/releases)\n\n### Cargo\n\n```bash\ncargo install cbfmt\n```\n\n### Build from source\n\n1. Clone this repository\n2. Build with [cargo](https://github.com/rust-lang/cargo/)\n\n```bash\ngit clone https://github.com/lukas-reineke/cbfmt.git \u0026\u0026 cd cbfmt\ncargo install --path .\n```\n\nThis will install `cbfmt` in your `~/.cargo/bin`. Make sure to add `~/.cargo/bin` directory to your `PATH` variable.\n\n## Config\n\nA configuration file is required. By default the file is called\n`.cbfmt.toml`\n\nExample:\n\n```toml\n[languages]\nrust = [\"rustfmt\"]\ngo = [\"gofmt\"]\nlua = [\"stylua -s -\"]\npython = [\"black --fast -\"]\n```\n\n### Sections\n\n#### languages\n\nThis section specifies which commands should run for which language. \nEach entry is the name of the language as the key, and a list of format commands\nto run in sequence as the value. Each format command needs to read from stdin\nand write to stdout.\n\n## Usage\n\n### With arguments\n\nYou can run `cbfmt` on files and or directories by passing them as\narguments.\n\n```bash\ncbfmt [OPTIONS] [file/dir/glob]...\n```\n\nThe default behaviour checks formatting for all files that were passed as\narguments. If all files are formatted correctly, it exits with status code 0,\notherwise it exits with status code 1.\n\nWhen a directory is passed as an argument, `cbfmt` will recursively run on all files\nin that directory which have a valid parser and are not ignored by git.\n\n### With stdin\n\nIf no arguments are specified, `cbfmt` will read fro",
"github_repo": "lukas-reineke/cbfmt",
"github_stars": 187,
"github_topics": [
"codeblocks",
"command-line-tool",
"formatter",
"markdown",
"org-mode",
"restructuredtext",
"rust"
],
"homepage": "https://github.com/lukas-reineke/cbfmt",
"homepage_og_description": null,
"homepage_og_image": null,
"homepage_title": null,
"installs_30d": 7,
"installs_365d": 178,
"installs_90d": 21,
"keg_only": 0,
"keg_only_reason": null,
"last_seen": "2026-06-20T23:34:18+00:00",
"license": "MIT",
"llm_generated_at": null,
"llm_model": null,
"name": "cbfmt",
"oldnames": [],
"one_liner": null,
"optional_dependencies": [],
"rank_30d": 9820,
"rank_365d": 7658,
"rank_90d": 9624,
"raw_hash": "e18095f7f7450100",
"recommended_dependencies": [],
"revision": 0,
"ruby_source_path": "Formula/c/cbfmt.rb",
"tap": "homebrew/core",
"test_dependencies": [
"rust"
],
"uses_from_macos": [],
"version_head": null,
"version_stable": "0.2.0",
"versioned_formulae": [],
"why_use_this": null
}