GuidesCLI Tutorial
Script with JSON output
Use structured GitButler CLI output in scripts and agent workflows.
Commands that expose structured output accept the --json option. For example, inspect the workspace with jq:
Or inspect one commit:
Mutation commands such as but commit, but amend, and but move also support --json:
Not every command has JSON output, and there is no -j shorthand. Check but <command> --help before relying on --json in a script.
Avoid commands that can prompt for input. Pass a commit message, name explicit branch targets, and use command-specific non-interactive options when available.
Last updated on