# agy's built-in status bar or a custom status line?

Antigravity CLI (`agy`) has a built-in status bar under the prompt, and it can replace that bar with the output of a command you choose. This guide compares the three ways to fill it: keep the built-in bar, write your own command, or install one such as agy-powerline. You can also keep both.

- [The built-in status bar](#the-built-in-status-bar)
- [A custom status line command](#a-custom-status-line-command)
- [Side by side](#side-by-side)
- [Keep the built-in bar and add your own](#keep-the-built-in-bar-and-add-your-own)
- [Go back to the built-in bar](#go-back-to-the-built-in-bar)

## The built-in status bar

The built-in bar needs no setup. [Google's documentation](https://antigravity.google/docs/cli/statusline) describes it as at-a-glance context about the agent, the workspace and the context window. The `/statusline` command turns it on and off. The documentation doesn't describe a way to choose what it shows, its colors or its layout: to change those, you replace it with a command.

If the built-in bar shows what you need, keep it. Nothing below is required to use agy.

## A custom status line command

A custom status line is a command set under `statusLine` in `~/.gemini/antigravity-cli/settings.json`. Whenever the agent's state changes, agy runs it, at most once every 300 ms, and pipes the session to it as JSON. Whatever the command prints, colors and several rows included, becomes the status bar.

That JSON holds more than a bar can show at once: the model, the context window, every quota bucket with its reset time, estimated cost, the plan, the agent's state, subagents, the folder and the terminal's width. The [payload reference](../payload.md) lists every field. A command decides which of them you see, and how.

Google's rules for the command, from the same documentation:

- It runs through `sh -c` on macOS and Linux, and through `cmd /c` on Windows.
- A run that takes longer than 5 seconds is stopped.
- After 30 failed runs in a row, agy stops running it for the rest of the session. `/statusline enable` starts it again.

Google's own example is a shell script, `statusline.sh`. On Windows, agy runs the command through `cmd /c`, which doesn't run a `.sh` file by itself.

## Side by side

|                        | Built-in bar            | Your own command                         | agy-powerline                                                                                          |
| ---------------------- | ----------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| Setup                  | None                    | Write a script, set `statusLine`         | `npx agy-powerline`, then restart agy once                                                             |
| What it shows          | Chosen by agy           | Anything in the payload you write it for | Any of 52 widgets: quotas, context, git, tokens, cost, agent state and more                            |
| Quota pace             | Not documented          | You compute it                           | [Pace markers and run-out forecasts](antigravity-quota.md) on every quota                              |
| Look                   | Fixed                   | Your own code                            | 22 themes, 3 layouts, powerline shapes, 7 bar languages                                                |
| Windows                | Yes                     | Your script must run under `cmd /c`      | cmd and PowerShell, through a `.cmd` launcher that `init` writes                                       |
| Narrow terminals       | Handled by agy          | You handle `terminal_width`              | Drops labels, then widgets in a set order, to fit                                                      |
| Bad input and failures | Handled by agy          | You handle them                          | Exits quickly on bad or missing input, without a stack trace                                           |
| Changing it            | `/statusline` on or off | Edit the script                          | A live-preview editor, the [browser configurator](https://agy-powerline.com/configure/) or one command |

Writing your own is a good choice when you want one or two values and enjoy the scripting. [How to add a status line](add-statusline-to-antigravity-cli.md) walks through the setting and a minimal script.

## Keep the built-in bar and add your own

You don't have to choose. With `"stack_with_default": true` in `statusLine`, agy shows your command's output below its own bar instead of replacing it. agy-powerline sets it up that way with:

```bash
npx agy-powerline init --stack
```

## Go back to the built-in bar

- Inside agy, `/statusline delete` (or `/statusline reset`) removes the command and brings the built-in bar back. `/statusline off` and `/statusline on` switch the status line off and on.
- `npx agy-powerline uninstall` takes agy-powerline out of `settings.json` and puts agy's own bar back, and `--delete` also removes its files ([Uninstalling](../install.md#uninstalling)).
