# Server Scripts

Sanitized production Python scripts that power Atlas OS on atlas-01 (Hetzner CPX32).

**All secrets removed.** Configure via environment variables or `/opt/atlas/secrets/atlas.env`.

## Scripts

| Script | Purpose |
|--------|---------|
| `atlas_brain.py` | Signal collector: mail, CRM, bank -> atlas-state.json -> AI brief |
| `cockpit_shim.py` | HTTP adapter serving OS cockpit feeds from on-disk JSON |
| `intelligence.py` | Intelligence / signal scoring layer |
| `meridian.py` | Autonomous decision engine and battle responder |
| `atlas_router_api.py` | Local model router at :8888 (OpenAI-compat, routes to Ollama models) |
| `cli-atlas.py` | Atlas CLI — interact with the brain and services from the terminal |

## Configuration

Copy `/opt/atlas/secrets/atlas.env.example` to `/opt/atlas/secrets/atlas.env` and fill in your values.
Then enable and start the systemd services in `server/systemd/`.

## Deployment

```bash
cp server/*.py /opt/atlas/
cp server/systemd/*.service /etc/systemd/system/
systemctl daemon-reload
systemctl enable --now atlas-brain atlas-cockpit atlas-loop
```

## Environment Variables

| Variable | Description |
|----------|-------------|
| `ATLAS_BASIC_PASS` | Internal API basic auth password |
| `ATLAS_ANTHROPIC_KEY` | Anthropic API key (Claude) |
| `GROQ_API_KEY` | Groq API key (free, fast 70B) |
| `CEREBRAS_API_KEY` | Cerebras API key (free tier) |
| `OPENROUTER_API_KEY` | OpenRouter (Gemini, multi-model) |
