Skip to content

Persistent Configuration

Yousef Ghadiri edited this page May 28, 2026 · 1 revision

Persistent Configuration

Knightwatch stores settings such as the Telegram token and webhook URLs in a persistent config file, managed via the config subcommand. Persisted webhook URLs are merged with any --webhook flags provided at runtime and deduplicated.

telegram-token

# Set the token
knightwatch config set telegram-token <TOKEN>

# Clear the token
knightwatch config set telegram-token --clear

# Read the current value
knightwatch config get telegram-token

webhook-urls

# Add one or more URLs
knightwatch config set webhook-urls --add https://example.com/hook --add https://other.com/hook

# Remove a specific URL
knightwatch config set webhook-urls --remove https://example.com/hook

# Clear all stored URLs
knightwatch config set webhook-urls --clear

# List all stored URLs
knightwatch config get webhook-urls

Clone this wiki locally