Documentation

auth

Manage authentication and your user token for the Heyweek CLI. hw auth handles logging in to your Heyweek account, refreshing your token, and logging out.…

Last updated:

Manage authentication and your user token for the Heyweek CLI.

hw auth handles logging in to your Heyweek account, refreshing your token, and logging out. Authentication uses the OAuth 2.0 device flow — when you log in, the CLI opens a verification page in your browser where you confirm access. You authenticate entirely through the browser, so no credentials are entered or stored on the command line.

Subcommands

hw auth login

Log in to your Heyweek account.

bash
hw auth login <span class="token punctuation">[</span>flags<span class="token punctuation">]</span>

Running hw auth login starts the OAuth device flow: the CLI prints a verification URL (and opens it in your browser when possible). After you confirm in the browser, the CLI stores your token locally so subsequent commands are authenticated.

hw auth renew

Refresh your access token.

bash
hw auth renew <span class="token punctuation">[</span>flags<span class="token punctuation">]</span>

Use this to obtain a fresh token without going through the full login flow again.

hw auth logout

Log out of your Heyweek account.

bash
hw auth <span class="token builtin class-name">logout</span> <span class="token punctuation">[</span>flags<span class="token punctuation">]</span>

This clears the stored token from the current machine.

Flags

All auth commands accept the global flag inherited from the root command:

text
--help   Show help for command

Examples

bash
<span class="token comment"># Log in via the OAuth device flow (opens your browser)</span>
hw auth login

<span class="token comment"># Refresh your token when it is close to expiring</span>
hw auth renew

<span class="token comment"># Log out of the current account</span>
hw auth <span class="token builtin class-name">logout</span>