div whoami
Show the email the div CLI is currently signed in as on this machine.
div whoami
Prints the email address tied to the saved CLI session on this machine, plus the slug of the current folder if it's a deployed div project. One-line answer to "am I signed in, and as who?"
#Synopsis
div whoami
No flags.
#What it does
- Reads
auth.jsonon this machine (~/.config/div/auth.jsonon Linux,~/Library/Preferences/div/auth.jsonon macOS). - If there's no saved session, prints
Not logged in. Run div deploy to get started.and exits. - If there is, prints
✓ Logged in as <email>using the email it captured at first verify (or viadiv login). - If the current directory is a deployed div project (has a
div.jsonwith a non-nullslug), prints a second line with the slug and its preview URL — handy for confirming you're about to deploy to the project you think you are.
#Aliases
div who— kept as an alias for backwards compatibility with pre-3.4.0 versions; new code and docs should preferdiv whoamito match the convention ofnpm whoami,vercel whoami,fly auth whoami, etc.
#Examples
# Anywhere — just check the saved session
div whoami
# ✓ Logged in as you@example.com
# Inside a deployed project folder
cd my-site
div whoami
# ✓ Logged in as you@example.com
# In project: my-site-a4f9d2 https://my-site-a4f9d2.div.so
# Not signed in (no auth.json yet)
div whoami
# Not logged in. Run div deploy to get started.
#When you need it
- Sanity-check the active account before running a destructive command (
div deployoverwrites files). - Confirm
div loginactually saved a session. - Debug a "this isn't deploying to my expected project" surprise — the second line tells you the cwd's slug and host.
#See also
div login— pair this machine's CLI with a div.so account.div logout— revoke the saved session.div deploy— what the saved session unlocks once you're signed in.- Authentication — how the credentials are stored.