> ## Documentation Index
> Fetch the complete documentation index at: https://docs.grindxp.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# grindxp init

> First-time setup wizard that creates your vault, encryption key, and user profile.

```bash theme={null}
grindxp init
```

## What It Does

<Steps>
  <Step title="Creates ~/.grind/">
    The vault directory at `~/.grind/` is created if it doesn't exist. This is where your encrypted
    SQLite database and config files live.
  </Step>

  <Step title="Generates an encryption key">
    A random AES encryption key is generated and stored in `~/.grind/.key`. This key encrypts your
    vault at rest. **Do not lose it.** There's no recovery without it.
  </Step>

  <Step title="Runs database migrations">
    The SQLite schema is applied (14 tables: users, quests, quest\_logs, proofs, skills, rituals,
    signals, forge\_rules, forge\_runs, trust\_log, companion\_settings, companion\_insights,
    conversations, messages).
  </Step>

  <Step title="Creates your user profile">
    Interactive prompts ask for your name and timezone. This creates the `users` record that all
    other data references.
  </Step>

  <Step title="Optional: AI setup">
    You can configure an AI provider immediately or skip with `Ctrl-C` and run `grindxp setup`
    later. Grind works fully without an API key.
  </Step>
</Steps>

## After Init

```bash theme={null}
grindxp status      # verify vault is ready
grindxp setup       # configure AI provider (optional)
grindxp quest create # create your first quest
```

<Warning>
  Running `init` on an existing vault will prompt for confirmation before overwriting. Your existing
  data is not automatically backed up.
</Warning>
