Skip to main content

Client configuration

Synopsis

The client reads command options, environment variables, saved login data, and built-in defaults. A value earlier in the documented order wins. For authentication, AGENTSFLEET_API_KEY overrides the saved login credential. The login command approves in a browser. It accepts no token on the command line and reads no token from piped input. Login also records the server it signed into. Later commands reach that same server unless you name another one.

Example with output

Options

The API URL uses this order: --api, AGENTSFLEET_API_URL, the server recorded at login, then the built-in URL.

Errors

An invalid URL returns exit code 4. A missing credential returns exit code 1. A network failure returns exit code 2. The client does not change saved login data after a network failure. A saved credential that records no server returns exit code 1 with error code DEPLOYMENT_UNKNOWN. Nothing is sent. Pass --api <API_URL>, set AGENTSFLEET_API_URL, or run agentsfleet login again. The logout and doctor commands still run in that state. One ends a credential and the other explains the refusal. Do not put credentials in command history. Use AGENTSFLEET_API_KEY through your secret manager for unattended commands.