# SimpleX Manager

A collection of SimpleX Chat bots and tools, plus a Python-based profile manager (in development).

## Structure

```
bots/
  haskell/
    simplex-deadmans-bot/   Dead Man's Switch bot
    simplexxx-directory/    Private SimpleXXX directory bot (fork of simplex-directory-service)
  typescript/
    simplex-support-bot/    Support triage bot with AI (Grok / Ollama / OpenAI-compatible)
manager/                    Python profile manager (coming soon)
web/                        SimpleXXX directory web frontend
```

## Support Bot — AI Configuration

The support bot supports any OpenAI-compatible AI backend.

```bash
# xAI Grok (default)
AI_API_KEY=xai-xxx npm start -- --team-group "Support" --context-file ctx.txt

# Ollama (local, no key needed)
npm start -- --team-group "Support" --context-file ctx.txt \
             --ai-url http://localhost:11434/v1 \
             --ai-model llama3.2

# OpenAI
AI_API_KEY=sk-xxx npm start -- --team-group "Support" --context-file ctx.txt \
             --ai-url https://api.openai.com/v1 \
             --ai-model gpt-4o
```

`GROK_API_KEY` is still accepted as a legacy alias for `AI_API_KEY`.

## Web Frontend

Static site for the SimpleXXX directory. Reads from `web/data/listing.json` and `web/data/promoted.json` written by the `simplexxx-directory` bot (`--web-folder` flag).

Serve with any static file server:
```bash
cd web && python3 -m http.server 8080
# or nginx pointing at this directory
```

## Python Manager

Coming soon — FastAPI-based manager to create and manage multiple SimpleX bot profiles from a web UI.
