{"schemaVersion":"opencli.cli.v1","slug":"shfmt","name":"shfmt","shortName":"shfmt","binaryName":"shfmt","maker":{"slug":"mvdan","name":"mvdan","type":"individual","url":"https://github.com/mvdan","officialPlatformMaker":false,"featuredBuilder":false},"category":"Productivity","description":"Shell formatting, bash style, and ci hygiene from the terminal. Built by mvdan.","tagline":"Shell formatting, bash style, and ci hygiene from the terminal.","install":{"packageManager":"brew","command":"brew install shfmt","packageName":null,"npmPackage":null,"brewFormula":"shfmt","brewCask":null,"crateName":null,"pypiPackage":null,"goPackage":null,"dockerImage":null},"verify":{"command":"shfmt --version","signal":"shfmt responds locally and is ready for the first real command."},"quickStart":"shfmt -w scripts","exampleWorkflow":["shfmt -w scripts"],"agent":{"readiness":{"label":"Usable with guardrails","score":50,"reasons":["Supports non-interactive/scripted use.","Works well in CI or repeatable automation."],"guardrails":["Prefer small commands and ask the agent to summarize plain text output.","Start read-only, then ask before mutations."]},"packUrl":"https://opencli.co/cli/shfmt/agent.md","packMarkdown":"# OpenCLI Agent Pack: shfmt\n\nUse this when an AI agent needs to work with `shfmt`.\n\n## What this CLI is for\nShell formatting, bash style, and ci hygiene from the terminal. Built by mvdan.\n\nBest for: shell formatting, bash style, and ci hygiene from the terminal.\n\n## Agent readiness\nUsable with guardrails (50/100)\n- Supports non-interactive/scripted use.\n- Works well in CI or repeatable automation.\n\n## Install\n```sh\nbrew install shfmt\n```\n\n## Verify before real work\n```sh\nshfmt --version\n```\nExpected signal: shfmt responds locally and is ready for the first real command.\n\n## Safe starting commands\n```sh\nshfmt --version\n```\n\n```sh\nshfmt -w scripts\n```\n\n## Guardrails for agents\n- Prefer small commands and ask the agent to summarize plain text output.\n- Start read-only, then ask before mutations.\n\n## Suggested agent instruction\nYou may use shfmt (`shfmt`) for shell formatting, bash style, and ci hygiene from the terminal.. First install it if missing, then run the verify command. Start with read-only or inspection commands. Summarize what you found before changing anything. Ask for confirmation before commands that mutate remote state, spend money, deploy, delete data, merge code, or expose secrets.\n\nSource: OpenCLI\n"},"fit":{"bestFor":"shell formatting, bash style, and ci hygiene from the terminal.","useThisIf":"You need productivity workflows in both local dev and CI.","skipIf":"You don't work with productivity workflows.","whatHappensNext":"Run `shfmt -w scripts` and see what comes back."},"capabilities":{"agentFriendly":true,"supportsJsonOutput":false,"supportsNonInteractive":true,"supportsDryRun":false,"requiresAuth":false,"requiresNetwork":false,"ciFriendly":true,"localFirst":false,"destructivePotential":"medium"},"taxonomy":{"useCases":["Shell formatting","Bash style","CI hygiene"],"aliases":["shell formatter"],"keywords":["shell format bash"],"tags":["builder","agent-friendly","ci-friendly"]},"links":{"website":"https://github.com/mvdan/sh","github":"https://github.com/mvdan/sh","docs":"https://github.com/mvdan/sh","opencli":"https://opencli.co/cli/shfmt","markdown":"https://opencli.co/cli/shfmt/agent.md","json":"https://opencli.co/cli/shfmt.json"},"metrics":{"githubStars":8800,"latestRelease":"2026-06-02T22:04:00Z","license":"BSD-3-Clause","metricLabel":"Homebrew installs (30d)","metricValue":4842,"metricSource":"homebrew","metricAsOf":"2026-06-08T11:00:56.239Z"}}