/ flydocs init
Initialize FlyDocs in a project with authentication, workspace selection, and artifact sync.
Synopsis
flydocs init [flags] The primary setup command. Authenticates your API key, selects a workspace, pulls server configuration, and installs all managed artifacts into your project. This is the recommended way to get started with FlyDocs in any repository.
Options
| Flag | Type | Default | Description |
|---|---|---|---|
--key | string | -- | API key (fdk_...). Skips the interactive prompt if provided. |
--project-key | boolean | false | Store the credential in the project directory instead of globally. |
--path | string | cwd | Target directory for initialization. |
--tier | string | -- | local or cloud. Prompts interactively if omitted. |
--scan | boolean | false | Run AI scan after initialization to generate context files. |
--local-source | boolean | false | Use local templates instead of server templates. For development only. |
What It Does
- Authenticates your API key against the relay API and stores credentials
- Selects workspace by prompting you to choose from available workspaces
- Pulls server config and creates
.flydocs/config.json - Syncs managed artifacts including skills, hooks, and slash commands
- Detects your stack from the project's package files and configuration
- Generates context files:
project.mdandservice.jsoninflydocs/context/ - Updates .gitignore to exclude credential and cache files
In multi-repo workspaces, init also detects sibling repositories and creates
a .flydocs-workspace.json at the workspace root with topology
information.
Examples
Interactive initialization in the current directory:
flydocs init Non-interactive with an API key and cloud tier:
flydocs init --key fdk_abc123 --tier cloud Initialize a different directory and run a scan afterward:
flydocs init --path ./my-project --scan Related Commands
flydocs auth: Store or update an API key without full initializationflydocs connect: Upgrade an existing local project to cloudflydocs scan: Generate context files separatelyflydocs sync: Sync config and artifacts after init