GitButler ⧓

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:

but status --json | jq

Or inspect one commit:

but show nn --json | jq

Mutation commands such as but commit, but amend, and but move also support --json:

but commit -b user-bookmarks -m "Add user bookmarks" q3 w7 --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

On this page

No Headings
Edit on GitHubGive us feedback