safia CLI is the single command you use to control every aspect of your SAFIA installation — from the first-time setup wizard to starting daemons, watching logs, and pulling updates. Once installed, the CLI wraps your bot and admin dashboard as background daemons that survive reboots, so you never have to manage processes manually.
Installation
- Linux / macOS
- Windows (PowerShell)
Run the one-line installer in your terminal. It automatically handles Git, Python 3.12, the SAFIA is installed to
uv package manager, Redis (installed and started if missing), all Python dependencies, and the safia command itself — no Docker required.~/.safia/safia and the safia binary is placed at ~/.local/bin/safia. The daemon auto-starts on reboot via systemd (Linux) or launchd (macOS).safia command is available:
If your shell reports Use
safia: command not found, ~/.local/bin is not in your PATH. Add it and reload your shell:~/.zshrc instead if you use Zsh.All commands at a glance
| Command | Description |
|---|---|
safia setup | Run the interactive setup wizard — creates .env |
safia config | View and edit configuration interactively |
safia start | Start the bot and admin dashboard as background daemons |
safia stop | Stop both daemons |
safia restart | Restart both daemons |
safia status | Show running/stopped status of both daemons |
safia logs [N] | Tail recent log output (default: 30 lines) |
safia test | Run the test suite |
safia update | Pull latest changes, update dependencies, and restart |
safia uninstall | Remove SAFIA completely from your system |
Getting help
Runsafia help (or safia --help) at any time to print a concise command reference directly in your terminal:
Common workflows
Initial setup
Follow these steps the first time you install SAFIA:Install SAFIA
Run the one-line installer for your platform (see Installation above). The installer clones the repository, installs Python and all dependencies, and registers the
safia command.Run the setup wizard
.env file when you confirm.Start the daemons
http://127.0.0.1:5454) as background daemons. Both are configured to restart automatically if they crash and to start on reboot.Daily use
Once the bot is up and running, most of your interaction with the CLI is limited to a few commands:Editing configuration
If you need to change an API key, switch LLM providers, or update the admin password after the initial setup:.env, lets you edit any section, and writes the updated file (creating a .env.backup automatically). Restart the bot to apply changes: