CLI Referenceaerostack login / link / whoami

Authentication Commands

Commands for authenticating with Aerostack and linking local projects.

aerostack login

Authenticate with your Aerostack account using your API key.

aerostack login

The CLI prompts for your API key. Find it at app.aerostack.dev/account/keys.

Using an environment variable:

export AEROSTACK_API_KEY=your_key_here
aerostack login

Key types:

TypeAccess level
Account keyFull access — can create/deploy any project in your account
Project keyScoped to a single project

Link a local directory to an existing Aerostack project by its project ID.

aerostack link [project-id]

Find your project ID in the Aerostack dashboard under Project Settings.

aerostack link proj_abc123

Once linked, aerostack deploy targets that project automatically.


aerostack whoami

Show your current authentication and linked project status.

aerostack whoami

Output:

Logged in as: [email protected] (account key)
Linked project: my-backend (proj_abc123)
Linked directory: /Users/john/projects/my-backend

aerostack auth doctor

Diagnose authentication configuration issues in your project.

aerostack auth doctor

Uses the AI agent to analyze your auth setup and suggest fixes. Requires aerostack index to have been run first.

Run aerostack auth doctor when users report login or token issues. It checks your auth route configuration, OTP setup, and JWT settings.


aerostack uninstall

Remove the CLI and all associated data.

aerostack uninstall
 
# Skip confirmation
aerostack uninstall --force