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

# Installation

> Install TI Agent and its dependencies.

## Requirements

| Requirement | Version | Notes |
| - | - | - |
| Node.js | **22.x** | Express 5 requires Node 22 |
| macOS | 12+ | Linux compatible; Windows untested |
| Anthropic API key | — | `sk-ant-api03-...` format. Required for briefing generation and Hunt tab API Key mode |
| Xcode CLI tools | — | Required for `better-sqlite3` native build |
| Claude Code CLI *(optional)* | — | Only needed for Hunt tab **Claude Subscription** mode. Install and run `claude login` once |

## Step 1 — Prerequisites

```bash theme={null}
# Install Xcode command line tools (required for better-sqlite3)
xcode-select --install

# Install Node 22 via Homebrew
brew install node
node --version  # should print v22.x.x
```

## Step 2 — Clone

```bash theme={null}
git clone https://github.com/tasox/ti-agent.git
cd ti-agent
```

> [!WARNING]
>
> **Do not place the project inside iCloud Drive** (`~/Library/Mobile Documents/`). iCloud's sync mechanism interferes with SQLite's WAL journal files and can cause database corruption. Clone into a local path such as `~/Projects/ti-agent`.

## Step 3 — Install Dependencies

```bash theme={null}
npm install
```

This installs `react`, `react-dom`, `react-scripts`, `express@5`, `cors`, `node-fetch@2`, and `better-sqlite3` in one step.

## Dependencies Reference

### Runtime (npm)

| Package | Version | Purpose |
| - | - | - |
| `express` | `^5.x` | HTTP server — **must be v5**, Express 4 breaks on Node 22 |
| `cors` | `^2.x` | Cross-origin headers for React dev server on :3000 |
| `node-fetch` | `@2.x` | RSS feed fetching — **must be v2**, v3 is ESM-only |
| `better-sqlite3` | `^9.x` | Synchronous SQLite driver — requires native build tools |

### Built-in Node.js Modules

| Module | Used for |
| - | - |
| `path` | Resolving the DB file path |
| `fs` | Startup DB file stat check; locating the Claude CLI binary |
| `os` | Resolving `$HOME` when searching for the Claude CLI install location |
| `zlib` | `deflateRawSync` for building valid `.docx` ZIP archives |
| `child_process` | `execFile`-ing the local Claude Code CLI for Hunt tab subscription auth |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.