CLI Reference
The fgp command-line tool for managing FGP daemons.
Installation
Global Options
fgp [OPTIONS] <COMMAND>
Options:
-v, --verbose Enable verbose output
-q, --quiet Suppress output
-h, --help Print help
-V, --version Print version
Commands
install
Install a daemon.
list
List installed daemons.
Output:
start
Start a daemon.
Options: - --foreground: Run in foreground (don't daemonize) - --log-level <LEVEL>: Set log level (debug, info, warn, error)
stop
Stop a running daemon.
status
Check daemon status.
Output:
call
Call a daemon method.
Examples:
# Simple call
fgp call browser health
# With parameters
fgp call browser open "https://example.com"
# Named parameters
fgp call browser fill --selector "#email" --value "test@example.com"
# JSON parameters
fgp call browser fill '{"selector": "#email", "value": "test@example.com"}'
logs
View daemon logs.
Options: - -f, --follow: Follow log output - -n, --lines <N>: Number of lines to show
update
Update a daemon to the latest version.
uninstall
Remove a daemon.
Configuration
Configuration file: ~/.fgp/config.toml
[defaults]
log_level = "info"
[browser]
chrome_path = "/usr/bin/google-chrome"
[gmail]
credentials_path = "~/.fgp/gmail-credentials.json"
Environment Variables
| Variable | Description |
|---|---|
FGP_HOME | FGP directory (default: ~/.fgp) |
FGP_LOG_LEVEL | Default log level |
CHROME_PATH | Chrome executable path |
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Daemon not found |
| 3 | Daemon not running |
| 4 | Connection failed |