Installation & authentication
Install
fore is distributed through Homebrew:
brew tap foreai-co/tap
brew install forecli
To also install the AI-agent skill (so tools like Claude Code can drive fore — see AI agent integration):
fore skill install --user
Confirm the install:
fore --help
Log in
fore supports two ways to authenticate:
- OAuth (default) — opens a browser to sign in with your identity provider.
- Email one-time code (OTP) — the platform emails you a code, which the CLI then prompts you to enter.
Run fore login with no flags and it asks you which method to use:
fore login # interactive: pick oauth or otp
fore login -m oauth # OAuth (Google is the default provider)
fore login -m oauth -p azure # OAuth via Azure
fore login -m otp # email one-time code
fore login --email me@example.com # OTP, code prompted for this address
Either method stores a session (a JWT plus refresh token) under ~/.foreai/credentials.json. The CLI refreshes the token automatically on the next call when it expires, so you normally only log in once per machine.
Check or drop your session at any time:
fore whoami # show the current user and token expiry
fore whoami --decode # also print the decoded JWT claims
fore logout # remove stored credentials and cached spec
Where things are stored
~/.foreai/credentials.json # bearer token + refresh token (file mode 0600)
~/.foreai/ # also holds the cached OpenAPI spec, refreshed hourly