|
| 1 | +# RadioShaq |
| 2 | + |
| 3 | +**S**trategic **H**am **R**adio **A**utonomous **Q**uery and **K**ontrol System |
| 4 | + |
| 5 | +An AI-powered orchestrator for ham radio operations, emergency communications, and field-to-HQ coordination. One install gives you the API, web UI, and optional remote SDR receiver. |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +## Install |
| 10 | + |
| 11 | +```bash |
| 12 | +pip install radioshaq |
| 13 | +``` |
| 14 | + |
| 15 | +**Optional (for SDR hardware):** `pip install radioshaq[sdr]` (RTL-SDR) or `radioshaq[hackrf]` (HackRF). |
| 16 | + |
| 17 | +**Requirements:** Python 3.11+ |
| 18 | + |
| 19 | +**License notice:** RadioShaq is distributed under GPL-2.0-only. Official CLI and web UI require explicit license acceptance before normal use. |
| 20 | + |
| 21 | +--- |
| 22 | + |
| 23 | +## Easiest way to get started: interactive setup |
| 24 | + |
| 25 | +From a project directory (or the repo root), run: |
| 26 | + |
| 27 | +```bash |
| 28 | +radioshaq setup |
| 29 | +``` |
| 30 | + |
| 31 | +This walks you through: |
| 32 | + |
| 33 | +- **Mode** — field, hq, or receiver |
| 34 | +- **Database** — use Docker Postgres or an existing URL |
| 35 | +- **Secrets** — JWT secret, LLM API key (optional) |
| 36 | +- **Config** — writes `.env` and `config.yaml`, can start Docker and run migrations |
| 37 | + |
| 38 | +**Minimal prompts:** `radioshaq setup --quick` (mode + “use Docker?” then defaults). |
| 39 | + |
| 40 | +**Non-interactive (CI/scripts):** `radioshaq setup --no-input --mode field` (optionally `--db-url postgresql://...`). |
| 41 | + |
| 42 | +**Reconfigure:** `radioshaq setup --reconfigure` to update existing config without starting over. |
| 43 | + |
| 44 | +--- |
| 45 | + |
| 46 | +## Run the API and web UI |
| 47 | + |
| 48 | +```bash |
| 49 | +radioshaq run-api |
| 50 | +``` |
| 51 | + |
| 52 | +- **API docs:** http://localhost:8000/docs |
| 53 | +- **Web UI:** http://localhost:8000/ |
| 54 | +- **Health:** http://localhost:8000/health |
| 55 | + |
| 56 | +Default host: `0.0.0.0`, port: `8000`. Override with `--host` and `--port`. |
| 57 | + |
| 58 | +--- |
| 59 | + |
| 60 | +## Get a token (auth) |
| 61 | + |
| 62 | +Most API calls need a Bearer JWT: |
| 63 | + |
| 64 | +```bash |
| 65 | +radioshaq token --subject op1 --role field --station-id STATION-01 |
| 66 | +``` |
| 67 | + |
| 68 | +Then set `RADIOSHAQ_TOKEN` to the printed value, or pass it in requests. Roles: `field`, `hq`, `receiver`. |
| 69 | + |
| 70 | +**Check API from the CLI:** |
| 71 | + |
| 72 | +```bash |
| 73 | +radioshaq health |
| 74 | +radioshaq health --ready |
| 75 | +``` |
| 76 | + |
| 77 | +--- |
| 78 | + |
| 79 | +## CLI at a glance |
| 80 | + |
| 81 | +| Command | What it does | |
| 82 | +|--------|------------------| |
| 83 | +| **setup** | | |
| 84 | +| `radioshaq setup` | Interactive setup: .env, config.yaml, optional Docker and migrations | |
| 85 | +| `radioshaq setup --quick` | Minimal prompts (mode, use Docker?), then defaults | |
| 86 | +| `radioshaq setup --no-input --mode field` | Non-interactive for CI; optional `--db-url`, `--config-dir` | |
| 87 | +| `radioshaq setup --reconfigure` | Update existing config (merge sections) | |
| 88 | +| **Server & auth** | | |
| 89 | +| `radioshaq run-api` | Start FastAPI server (and web UI at /). Options: `--host`, `--port`, `--reload` | |
| 90 | +| `radioshaq run-receiver` | Start remote SDR receiver (port 8765). Set `JWT_SECRET`, `STATION_ID`, `HQ_URL` | |
| 91 | +| `radioshaq token` | Get JWT. Options: `--subject`, `--role`, `--station-id`, `--base-url` | |
| 92 | +| `radioshaq health` | Liveness check; `radioshaq health --ready` for readiness | |
| 93 | +| **Callsigns** (require `RADIOSHAQ_TOKEN`) | | |
| 94 | +| `radioshaq callsigns list` | List registered callsigns | |
| 95 | +| `radioshaq callsigns add <callsign>` | Register a callsign | |
| 96 | +| `radioshaq callsigns remove <callsign>` | Remove from whitelist | |
| 97 | +| `radioshaq callsigns register-from-audio <file>` | Register from audio (ASR) | |
| 98 | +| **Messages** | | |
| 99 | +| `radioshaq message process <text>` | Send message through REACT orchestrator | |
| 100 | +| `radioshaq message inject <text>` | Inject into RX path (demo). Options: `--band`, `--mode`, `--source-callsign` | |
| 101 | +| `radioshaq message whitelist-request <text>` | Whitelist request (orchestrator + optional TTS) | |
| 102 | +| `radioshaq message relay <msg> --source-band X --target-band Y` | Relay message between bands | |
| 103 | +| **Transcripts** | | |
| 104 | +| `radioshaq transcripts list` | List transcripts. Options: `--callsign`, `--band`, `--since`, `--limit` | |
| 105 | +| `radioshaq transcripts get <id>` | Get one transcript | |
| 106 | +| `radioshaq transcripts play <id>` | Play transcript as TTS over radio | |
| 107 | +| **Radio** | | |
| 108 | +| `radioshaq radio bands` | List bands | |
| 109 | +| `radioshaq radio send-tts <message>` | Send TTS over radio. Options: `--frequency-hz`, `--mode` | |
| 110 | + |
| 111 | +Use `radioshaq --help` and `radioshaq <command> --help` for options. API base URL: `RADIOSHAQ_API` (default `http://localhost:8000`). |
| 112 | + |
| 113 | +--- |
| 114 | + |
| 115 | +## Remote receiver (SDR listen-only) |
| 116 | + |
| 117 | +For a listen-only station (e.g. Raspberry Pi + RTL-SDR) that streams to HQ: |
| 118 | + |
| 119 | +```bash |
| 120 | +pip install radioshaq[sdr] # or radioshaq[hackrf] for HackRF |
| 121 | +export JWT_SECRET=your-secret |
| 122 | +export STATION_ID=RECEIVER-01 |
| 123 | +export HQ_URL=http://your-hq:8000 |
| 124 | +radioshaq run-receiver |
| 125 | +``` |
| 126 | + |
| 127 | +HQ accepts uploads at `POST /receiver/upload` (Bearer JWT). Default receiver port: `8765` (`--port` to change). |
| 128 | + |
| 129 | +--- |
| 130 | + |
| 131 | +## After install (no interactive setup) |
| 132 | + |
| 133 | +If you prefer to configure by hand: |
| 134 | + |
| 135 | +1. **Database:** Set `DATABASE_URL` or `POSTGRES_*` (and run migrations with your Alembic config). |
| 136 | +2. **Config:** Copy `config.example.yaml` to `config.yaml` and set `mode`, `database`, `auth`, etc. See [Configuration](https://Josephrp.github.io/RadioShaq/configuration/). |
| 137 | +3. **Start:** `radioshaq run-api`. |
| 138 | + |
| 139 | +--- |
| 140 | + |
| 141 | +## Documentation |
| 142 | + |
| 143 | +- [Quick Start](https://Josephrp.github.io/RadioShaq/quick-start/) |
| 144 | +- [Configuration](https://Josephrp.github.io/RadioShaq/configuration/) |
| 145 | +- [API Reference](https://Josephrp.github.io/RadioShaq/api-reference/) |
| 146 | +- [Radio / hardware](https://Josephrp.github.io/RadioShaq/radio-usage/) |
| 147 | + |
| 148 | +--- |
| 149 | + |
| 150 | +## License |
| 151 | + |
| 152 | +GPL-2.0-only |
0 commit comments