Skip to main content

forest login

Sign in to your Forest account.

Usage

forest login [options]

Options

OptionDescription
-e, --emailYour Forest account email
-P, --passwordYour Forest account password (ignored if --token is set)
-t, --tokenYour Forest account token

Default behavior

Running forest login without arguments opens your browser to authenticate via your Forest account:
$ forest login
# Your browser opens automatically.
# If it doesn't, visit the URL printed in the terminal and enter the confirmation code shown.
Once you confirm in the browser, the CLI stores your session and you’re ready to use other commands.

Login with email and password

You can bypass the browser flow by providing credentials directly:
forest login --email you@company.com --password yourpassword

Login with an application token

forest login --token YOUR_APPLICATION_TOKEN
Application tokens are useful in CI/CD pipelines or automated environments where opening a browser is not possible.

Logging out

forest logout

Checking the current user

forest user

Token storage

The CLI stores your session token locally in ~/.forest.d/. This directory is created automatically on first login.
Do not commit the ~/.forest.d/ directory to version control. It contains your authentication credentials.

Troubleshooting

Browser does not open The CLI will print a URL and a confirmation code in the terminal. Open the URL manually and enter the code to complete authentication. Token expired Run forest login again to get a fresh session. Command requires authentication Most CLI commands require you to be logged in. Run forest login before using other commands.