Commands
auth
Log in and out of Poly.
poly auth manages authentication for Poly. The CLI itself never holds tokens — logging in starts an OAuth (PKCE) flow through the daemon, and the desktop app owns the resulting session.
Usage
poly auth <SUBCOMMAND>
Subcommands
| Subcommand | Description |
|---|---|
login | Start an OAuth login through the daemon. |
logout | Log out. --purge also purges the local cache. |
poly auth login
In pretty mode, login opens the authorize URL in your default browser automatically. Pass --no-browser to print the URL instead of opening it — useful over SSH or in a headless environment. In JSON mode (-o json), a browser is never opened; the URL is always printed so a wrapping script can handle it.
poly auth logout
Logs the current session out of the daemon. Add --purge to also purge the local cache, removing offline copies of metadata and file bytes.
Examples
# Log in, opening the browser automatically
poly auth login
# Log in over SSH without a browser
poly auth login --no-browser
# Log in and capture the URL in a script
poly auth login --no-browser -o json
# Log out but keep the local cache
poly auth logout
# Log out and wipe the local cache
poly auth logout --purge
Related
app— start the daemon thatauth logintalks to.- How it Works — the daemon, local cache, and connection model.
- Installation — installing the
polyCLI.