# Arial Server

Execution server for Arial - runs specs in parallel and creates GitHub PRs.

## Requirements

- [Bun](https://bun.sh) >= 1.0.0

## Installation

```bash
bun install -g arial-server
```

Or run directly:

```bash
bunx arial-server
```

## Quick Start

1. **Create a server config** (`arial-server.config.ts`):

   ```typescript
   export default {
     port: 7676,
     repoPath: "/path/to/your/repo",
     github: {
       token: process.env.GITHUB_TOKEN,
       owner: "your-org",
       repo: "your-repo",
     },
   };
   ```

2. **Start the server:**

   ```bash
   arial-server --config ./arial-server.config.ts
   ```

3. **Or use environment variables:**
   ```bash
   GITHUB_TOKEN=your_token arial-server
   ```

## Configuration

The server looks for configuration in this order:

1. `--config` flag path
2. `./arial-server.config.ts`
3. Environment variables

### Environment Variables

| Variable            | Description                  |
| ------------------- | ---------------------------- |
| `PORT`              | Server port (default: 7676)  |
| `GITHUB_TOKEN`      | GitHub personal access token |
| `ANTHROPIC_API_KEY` | Anthropic API key for Claude |

## API

The server exposes:

- HTTP endpoints for spec management
- WebSocket for real-time log streaming

## Documentation

Full documentation available at [arial.sh](https://arial.sh)

## License

MIT
