| title | Scripting |
|---|---|
| description | How to script with GitButler CLI |
Commands are designed to be user friendly in an interactive terminal, and you can script them by passing --format json to commands that support JSON output. For example, here is but show on a commit.
but show 2672465
Now with JSON output:
but show --format json 2672465 | jq
You can use --format json with commands that support formatted output, such as committing, status, and diffing, to get parseable data for scripts or agents.