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

# Quickstart

> Get started with ReadOnly in under 2 minutes

## Get Started in 3 Steps

This guide will walk you through setting up ReadOnly in your project and syncing your first files.

### Step 1: Create a Project

<Steps>
  <Step title="Sign up">Go to [readonly.store](https://readonly.store) and create an account.</Step>
  <Step title="Create a project">Click "New Project" and give it a name (e.g., "My Blog").</Step>
  <Step title="Get your API key">Copy your project's API key from the dashboard. It starts with `ro_`.</Step>
</Steps>

### Step 2: Add Files

<Steps>
  <Step title="Add a file">
    Click "Add File" in your project dashboard.
  </Step>

  <Step title="Name your file">
    Give it a name like `documents` or `config` (alphanumeric, hyphens, and underscores only).
  </Step>

  <Step title="Paste JSON content">
    Add your JSON data. Must be a valid JSON object:

    ```json theme={null}
    {
      "title": "Welcome to ReadOnly",
      "description": "Type-safe file sync",
      "version": "1.0.0"
    }
    ```
  </Step>
</Steps>

### Step 3: Install and Sync

<Steps>
  <Step title="Install the client">`bash bun add @readonlystore/client # or npm install @readonlystore/client `</Step>

  <Step title="Set your API key">
    Add your API key to a `.env` file in your project root:

    ```bash theme={null}
    READONLY_API_KEY=ro_your_api_key_here
    ```

    <Warning>Never commit your `.env` file to version control. Add it to `.gitignore`.</Warning>
  </Step>

  <Step title="Sync your files">
    ```bash theme={null}
    bunx readonly sync
    ```

    This downloads your files and generates TypeScript types.
  </Step>

  <Step title="Use in your code">
    ```typescript theme={null}
    import { documents } from "@readonlystore/client";

    console.log(documents.title); // "Welcome to ReadOnly"
    console.log(documents.version); // "1.0.0"
    ```

    <Check>Your files are now synced and fully typed!</Check>
  </Step>
</Steps>

## Development Mode

For development, use watch mode to automatically sync changes:

```bash theme={null}
bunx readonly dev
```

Keep this running alongside your dev server. When you update files in the dashboard, they'll sync automatically.

## Production Usage

In production, run the CLI alongside your application:

<CodeGroup>
  ```json package.json theme={null}
  {
    "scripts": {
      "start": "concurrently \"node server.js\" \"readonly dev\""
    }
  }
  ```

  ```bash Docker theme={null}
  # In your Dockerfile
  CMD ["sh", "-c", "readonly dev & node server.js"]
  ```
</CodeGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="CLI Reference" icon="terminal" href="/client/cli-reference">
    Learn about all available commands.
  </Card>

  <Card title="Configuration" icon="gear" href="/client/configuration">
    Customize cache and output directories.
  </Card>

  <Card title="Usage Guide" icon="code" href="/client/usage">
    Learn how to use your synced files.
  </Card>

  <Card title="Troubleshooting" icon="wrench" href="/help/troubleshooting">
    Common issues and solutions.
  </Card>
</CardGroup>

<Warning>
  **Security Note**: Never commit your API key to version control. Use `.env` files and add them to `.gitignore`.
</Warning>
