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

# Setup & Teardown

> Install, uninstall, and migrate auto-sop in your projects

# Setup & Teardown

## install

Install auto-sop into the current project. Sets up Claude Code hooks, the event-driven learner with a daily sweep, and the managed section in `CLAUDE.md`.

```bash theme={null}
auto-sop install [options]
```

### Options

| Option             | Description                                                     |
| ------------------ | --------------------------------------------------------------- |
| `--license <key>`  | License key (non-interactive; skips prompt)                     |
| `--project <path>` | Project root (default: current directory)                       |
| `--no-restore`     | Skip restoring directives from a previous install (clean slate) |

### Examples

<CodeGroup>
  ```bash Basic Install theme={null}
  npx auto-sop install
  ```

  ```bash With License Key theme={null}
  npx auto-sop install --license YOUR-KEY-HERE
  ```

  ```bash Clean Slate theme={null}
  npx auto-sop install --no-restore
  ```

  ```bash Target Specific Project theme={null}
  npx auto-sop install --project ~/projects/my-app
  ```
</CodeGroup>

<Tip>
  After install, use Claude Code normally. Captures happen silently in the background with less than 50ms overhead per hook invocation.
</Tip>

### What Install Does

1. **Hooks** — Registers `PreToolUse`, `PostToolUse`, and `Stop` hooks in `.claude/settings.local.json`
2. **Scheduler** — Creates a launchd plist (macOS) or systemd timer (Linux) for the daily background sweep
3. **CLAUDE.md** — Adds a managed section to your project's `CLAUDE.md` (creates the file if needed)
4. **Restore** — If a previous install had directives, restores them (unless `--no-restore`)

***

## uninstall

Remove auto-sop hooks, scheduler, and the managed section from `CLAUDE.md`.

```bash theme={null}
auto-sop uninstall [options]
```

### Options

| Option             | Description                               |
| ------------------ | ----------------------------------------- |
| `--purge`          | Also wipe all captures (project + global) |
| `--project <path>` | Project root (default: current directory) |

### Examples

<CodeGroup>
  ```bash Standard Uninstall theme={null}
  auto-sop uninstall
  ```

  ```bash Full Purge theme={null}
  auto-sop uninstall --purge
  ```
</CodeGroup>

<Warning>
  `--purge` permanently deletes all captured interaction data. This cannot be undone.
</Warning>

***

## migrate

Migrate from the old `claude-sop` package name to `auto-sop`. Updates directory paths, launchd plists, and hook references.

```bash theme={null}
auto-sop migrate [options]
```

### Options

| Option             | Description                                                |
| ------------------ | ---------------------------------------------------------- |
| `--project <path>` | Project root to migrate hooks (default: current directory) |
| `--dry-run`        | Show what would change without acting                      |

### Examples

<CodeGroup>
  ```bash Preview Migration theme={null}
  auto-sop migrate --dry-run
  ```

  ```bash Execute Migration theme={null}
  auto-sop migrate
  ```
</CodeGroup>

<Note>
  Only needed if you previously installed the `claude-sop` package (pre-rename). New users can skip this command entirely.
</Note>
