Text output
Every command prints aligned text for you to read.- Tables pad their columns.
- A row that reports a state starts with a glyph:
✓ok,!warning,✗failure,•information. - A command that changes something confirms it on one line, such as
agentx config set label "work laptop":
git status does. You can still copy the path:
Colour
Text output is coloured when it goes to a terminal. Each colour has one meaning:
Output that goes to a file or another program has no colour, so a script reads plain text. To choose yourself, use the global
--color flag:
NO_COLOR environment variable to any value, or set TERM to dumb, to turn colour off. --color on turns it back on.
Logs
agentx writes logs to stderr. A line that starts withwarning: reports a problem that did not stop the command. Add --verbose to also see debug: lines, such as which agentx home and library the command used.
Some warnings put what to do on a second line, indented under the warning.
Errors
A failed command printserror: ... on stderr. If there is a fix, a hint: ... line follows. With --json, the error is an error event on stdout.
Exit codes
Stop a run
To stop a run, press Ctrl-C or sendSIGTERM. agentx stops the git command it is running, prints an error with a hint, and exits 9:
agentx doctor shows if one is waiting. Run the command again when you are ready.
To kill a run that does not stop, press Ctrl-C a second time. The next agentx command cleans up in the same way.
If the run had already done everything you asked, it exits 0 and reports what it did.
Environment variables
Set either variable to move that directory. agentx needs
HOME, and reads XDG_CONFIG_HOME (default ~/.config) to find your agent clients. agentx update --nightly reads GITHUB_TOKEN, if set, to list the releases on GitHub.
JSON output
Add--json to any command to print one JSON object per line. The agentx desktop app reads this output. From a terminal, the text output is all you need.
Each object carries its type and the output schema_version, which agentx version prints. Schema version 2 names the result of a scan inventory, emitted by agentx scan and agentx serve; version 1 called it snapshot. If a script reads snapshot events, change it to read inventory events.