/ flydocs auth
Store a FlyDocs API key globally for CLI authentication.
Synopsis
flydocs auth [key]
Validates and stores an API key at the global credential location
(~/.flydocs/credentials). Use this to set up or rotate your
API key without reinitializing your project.
Arguments
| Argument | Type | Description |
|---|---|---|
key | string | API key (fdk_...). If omitted, prompts interactively. |
What It Does
- Validates format by checking the key starts with the
fdk_prefix - Validates against the relay API to confirm the key is active and authorized
- Stores the key at
~/.flydocs/credentialswith 600 file permissions (owner read/write only) - Fetches workspace ID associated with the key and stores it alongside the credential
The global credential file is the default location used by all FlyDocs
commands. Project-scoped credentials (created via flydocs init --project-key)
take priority when present.
Examples
Store a key interactively:
flydocs auth Store a key directly:
flydocs auth fdk_abc123def456 Related Commands
flydocs init: Full initialization that includes authenticationflydocs connect: Connect an existing project to cloud (also stores credentials)- Environment Variables: Override credentials with
FLYDOCS_API_KEY