docs: update CLI commands to use python -m rf_mapper

- Replace rf-mapper with python -m rf_mapper throughout docs
- Add note about activating venv first
- Updated: CLAUDE.md, PROJECT.md, USAGE.md, CHEATSHEET.md, HOME_ASSISTANT.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
User
2026-02-01 17:38:44 +01:00
parent 322c53d513
commit 91536860ad
5 changed files with 72 additions and 58 deletions

View File

@@ -43,11 +43,12 @@ src/rf_mapper/
```bash
source venv/bin/activate
rf-mapper start # Start web server (background)
rf-mapper status # Check if running
rf-mapper stop # Stop server
rf-mapper scan -l room # CLI scan
rf-mapper --help # All commands
python -m rf_mapper start # Start web server (background)
python -m rf_mapper status # Check if running
python -m rf_mapper stop # Stop server
python -m rf_mapper restart # Restart server
python -m rf_mapper scan -l room # CLI scan
python -m rf_mapper --help # All commands
```
## Tech Stack

View File

@@ -122,14 +122,17 @@ pip install -e .
## Quick Start
```bash
# Activate virtual environment
source venv/bin/activate
# Start web server (background)
rf-mapper start
python -m rf_mapper start
# Check status
rf-mapper status
python -m rf_mapper status
# CLI scan
rf-mapper scan
python -m rf_mapper scan
# Open http://localhost:5000
```

View File

@@ -65,7 +65,7 @@ For auto-start on device boot, create `~/.termux/boot/start-rf-mapper.sh`:
termux-wake-lock
cd ~/git/rf-mapper
source venv/bin/activate
rf-mapper start
python -m rf_mapper start
```
Make it executable:
@@ -91,92 +91,97 @@ pip install -e .
source venv/bin/activate
# Run interactive scan
rf-mapper
python -m rf_mapper
# Start web server
rf-mapper start
python -m rf_mapper start
```
## CLI Commands
All commands require activating the virtual environment first:
```bash
source venv/bin/activate
```
### Scanning
```bash
# Basic scan (interactive mode)
rf-mapper
python -m rf_mapper
# Scan with location label
rf-mapper scan -l kitchen
python -m rf_mapper scan -l kitchen
# Scan WiFi only
rf-mapper scan --no-bt
python -m rf_mapper scan --no-bt
# Scan Bluetooth only
rf-mapper scan --no-wifi
python -m rf_mapper scan --no-wifi
# Use specific WiFi interface
rf-mapper scan -i wlan1
python -m rf_mapper scan -i wlan1
```
### Visualization (CLI)
```bash
# Visualize latest scan (ASCII radar + charts)
rf-mapper visualize
python -m rf_mapper visualize
# Visualize specific scan file
rf-mapper visualize -f data/scan_20240131_120000_kitchen.json
python -m rf_mapper visualize -f data/scan_20240131_120000_kitchen.json
# Analyze RF environment
rf-mapper analyze
python -m rf_mapper analyze
```
### Scan History
```bash
# List saved scans
rf-mapper list
python -m rf_mapper list
```
### Web Server
```bash
# Start web server (background daemon)
rf-mapper start
python -m rf_mapper start
# Start in foreground (for debugging)
rf-mapper start --foreground
python -m rf_mapper start --foreground
# Custom host/port
rf-mapper start -H 127.0.0.1 -p 8080
python -m rf_mapper start -H 127.0.0.1 -p 8080
# With debug mode
rf-mapper start --foreground --debug
python -m rf_mapper start --foreground --debug
# With request profiling
rf-mapper start --profile-requests
python -m rf_mapper start --profile-requests
# With request logging
rf-mapper start --log-requests
python -m rf_mapper start --log-requests
# Stop the server
rf-mapper stop
python -m rf_mapper stop
# Restart the server
rf-mapper restart
python -m rf_mapper restart
# Check server status
rf-mapper status
python -m rf_mapper status
```
### Configuration
```bash
# Show current configuration
rf-mapper config
python -m rf_mapper config
# Set GPS coordinates
rf-mapper config --set-gps 50.8585 4.3978 --save
python -m rf_mapper config --set-gps 50.8585 4.3978 --save
# Check Termux prerequisites (Android only)
rf-mapper check-termux
@@ -462,7 +467,7 @@ adb shell "settings put global settings_enable_monitor_phantom_procs false"
### Master Dashboard: Node selector not appearing
1. Verify `is_master: true` in config.yaml
2. Restart rf-mapper: `rf-mapper restart`
2. Restart rf-mapper: `python -m rf_mapper restart`
3. Check peers are registered: `curl http://localhost:5000/api/peers | jq '.peers | length'`
4. At least one peer must be registered for selector to appear

View File

@@ -6,21 +6,26 @@ Quick reference for RF Mapper commands and configuration.
## CLI Commands
All commands require activating the virtual environment first:
```bash
source venv/bin/activate
```
| Command | Description |
|---------|-------------|
| `rf-mapper` | Interactive scan mode |
| `rf-mapper scan` | Run scan with defaults |
| `rf-mapper scan -l kitchen` | Scan with location label |
| `rf-mapper scan --no-bt` | WiFi only |
| `rf-mapper scan --no-wifi` | Bluetooth only |
| `rf-mapper visualize` | ASCII radar display |
| `rf-mapper analyze` | RF environment analysis |
| `rf-mapper list` | List saved scans |
| `rf-mapper start` | Start web server (background) |
| `rf-mapper stop` | Stop web server |
| `rf-mapper restart` | Restart web server |
| `rf-mapper status` | Check if server is running |
| `rf-mapper config` | Show configuration |
| `python -m rf_mapper` | Interactive scan mode |
| `python -m rf_mapper scan` | Run scan with defaults |
| `python -m rf_mapper scan -l kitchen` | Scan with location label |
| `python -m rf_mapper scan --no-bt` | WiFi only |
| `python -m rf_mapper scan --no-wifi` | Bluetooth only |
| `python -m rf_mapper visualize` | ASCII radar display |
| `python -m rf_mapper analyze` | RF environment analysis |
| `python -m rf_mapper list` | List saved scans |
| `python -m rf_mapper start` | Start web server (background) |
| `python -m rf_mapper stop` | Stop web server |
| `python -m rf_mapper restart` | Restart web server |
| `python -m rf_mapper status` | Check if server is running |
| `python -m rf_mapper config` | Show configuration |
---
@@ -28,18 +33,18 @@ Quick reference for RF Mapper commands and configuration.
```bash
# Lifecycle
rf-mapper start # Start (background daemon)
rf-mapper stop # Stop
rf-mapper restart # Restart
rf-mapper status # Check if running
python -m rf_mapper start # Start (background daemon)
python -m rf_mapper stop # Stop
python -m rf_mapper restart # Restart
python -m rf_mapper status # Check if running
# Start options
rf-mapper start -f # Foreground mode
rf-mapper start -H 127.0.0.1 # Bind to localhost only
rf-mapper start -p 8080 # Custom port
rf-mapper start --debug # Debug mode (requires -f)
rf-mapper start --profile-requests # Per-request profiling
rf-mapper start --log-requests # Request logging
python -m rf_mapper start -f # Foreground mode
python -m rf_mapper start -H 127.0.0.1 # Bind to localhost only
python -m rf_mapper start -p 8080 # Custom port
python -m rf_mapper start --debug # Debug mode (requires -f)
python -m rf_mapper start --profile-requests # Per-request profiling
python -m rf_mapper start --log-requests # Request logging
```
---
@@ -48,10 +53,10 @@ rf-mapper start --log-requests # Request logging
```bash
# Show current config
rf-mapper config
python -m rf_mapper config
# Set GPS coordinates
rf-mapper config --set-gps 50.8585 4.3978 --save
python -m rf_mapper config --set-gps 50.8585 4.3978 --save
```
---

View File

@@ -258,7 +258,7 @@ template:
1. **Enable integration**: Set `home_assistant.enabled: true` in config.yaml
2. **Add HA automations**: Copy webhook automations to HA
3. **Restart RF Mapper**: `rf-mapper restart`
3. **Restart RF Mapper**: `source venv/bin/activate && python -m rf_mapper restart`
4. **Run scan**: Trigger BT scan in RF Mapper web UI
5. **Check HA**: Verify `device_tracker.rf_*` entities appear
6. **Test new device**: Clear device from DB, re-scan, verify notification