Documentation menu

CLI

atf CLI: Telegram Automation Commands

The atf command line: 29 command groups for setup, task control, log history, backups, diagnostics and releases.

Verified against the checkout built for v2.2.4 · updated 20 Oct 2026

On this page

atf is the operator interface to the whole installation: it installs, validates, diagnoses, controls tasks, reads log history, exports backups, regenerates gRPC stubs and supervises the running stack. Everything the dashboard can do, the CLI can do — and it can do it from a cron job.

29 command groups78 gRPC methods behind it201 test filesJSON output on demand

How it works

Invocation shape
atf <group> <command> [flags]

# Group listing and per-command help
atf --help
atf rules --help
atf rules settings --help

Conventions worth knowing

  • Task ids accept the short prefix shown by atf rules list.
  • --json is available on the read commands and is what scripts should parse.
  • atf validate is read-only; --strict turns warnings into failures for CI.
  • atf doctor --fix repairs what it can and reports what it cannot.

Everyday workflows

1 · Install and verify

  1. atf setup
  2. atf status
  3. atf validate --strict
  4. atf doctor

The wizard builds the stack, then proves each service is serving before it exits.

2 · Connect Telegram

  1. atf config set ATF_BOT_TOKEN
  2. atf auth token --save
  3. atf sessions list

Sessions are listed tenant-scoped; backups are encrypted before they touch disk.

3 · Create your first task

  1. atf rules create --name "News" --source -1001111111111 --target -1003333333333
  2. atf rules list
  3. atf rules settings set <id> clean_links=true
  4. atf rules simulate <id> --text "BUY NOW t.me/spam"

Simulate runs the full pipeline on text you supply — nothing is sent to Telegram.

4 · Watch it work

  1. atf logs tail --follow -n 50
  2. atf logs stats
  3. atf data queue
  4. atf data dlq --replay

The queue and dead-letter views are the same data the dashboard shows.

5 · Upgrade with a gate

  1. atf system upgrade
  2. atf release verify
  3. atf deploy --build

The upgrade path checks readiness and refuses to proceed on a failing stack.

All command groups

Read from the argument parser at build time, so this list is exactly what your binary accepts.

atf auth

Manage credentials, tokens, and authenticated sessions

  • atf auth whoami
  • atf auth token
  • atf auth login
  • atf auth logout

atf setup

One-command first-run setup: platform check, questionnaire, secrets, build, verify

  • atf setup

atf upgrade

Upgrade the stack: check for a newer revision, apply it, or roll back

  • atf upgrade check
  • atf upgrade plan
  • atf upgrade apply
  • atf upgrade rollback

atf platform

Detect this host and print the exact steps to run ATF here

  • atf platform

atf doctor

Diagnose the whole stack (and --fix the repairs that are safe)

  • atf doctor

atf validate

Validate config, secrets, catalogs, contracts, and data (CI-safe, read-only)

  • atf validate

atf status

Show service, port and health status for the whole stack

  • atf status

atf rules

Manage forwarding tasks: list, show, edit, pause, clone, settings, sources

  • atf rules list
  • atf rules show
  • atf rules logs
  • atf rules create

atf ai

AI provider configurations: list, create, check a key, switch the active model

  • atf ai list
  • atf ai show
  • atf ai create
  • atf ai update

atf prompts

Prompt templates: list, create, test against a live AI config

  • atf prompts list
  • atf prompts show
  • atf prompts create
  • atf prompts update

atf filters

Message filters: list, create, and see exactly what a filter drops

  • atf filters list
  • atf filters show
  • atf filters create
  • atf filters update

atf sessions

Manage connected Telegram client sessions

  • atf sessions list
  • atf sessions chats
  • atf sessions backup
  • atf sessions terminate

atf logs

Query, tail, export, and manage system and per-task logs

  • atf logs stats
  • atf logs query
  • atf logs tail
  • atf logs export

atf data

Manage backups, delivery queues, dead-letter items, and system statistics

  • atf data stats
  • atf data queue
  • atf data backup-export
  • atf data backup-import

atf admin

Manage system users, administrators, extensions, and global settings

  • atf admin overview
  • atf admin broadcast
  • atf admin users
  • atf admin list

atf audit

Query the audit trail: who did what, scoped to this tenant

  • atf audit events
  • atf audit outcomes

atf docker

Manage Docker containers, images, logs, builds, and lifecycle

  • atf docker ps
  • atf docker up
  • atf docker down
  • atf docker restart

atf deploy

Orchestrate full zero-downtime stack builds, recreations, network alias repairs, and health verification

  • atf deploy

atf db

Inspect, snapshot, and manage SQLite or PostgreSQL database state

  • atf db inspect
  • atf db backup

atf certs

Inspect, verify, and renew TLS/SSL certificates

  • atf certs inspect
  • atf certs renew

atf net

Manage Docker networks, DNS aliases, host ports, and inter-service connectivity

  • atf net inspect
  • atf net reconnect
  • atf net port
  • atf net status

atf test

Run automated test suites across Python, Go, and Flutter

  • atf test

atf i18n

Audit and enforce strict 1:1 translation catalog parity across all 10 locales

  • atf i18n

atf proto

Compile protocol buffers across Python and Go services

  • atf proto

atf release

Manage release versions, checksum manifests, and integrity checks

  • atf release version
  • atf release manifest
  • atf release verify
  • atf release portable

atf ci

Inspect GitHub Actions CI runs, check annotations, and monitor workflows

  • atf ci status
  • atf ci view
  • atf ci watch

atf watch

Live streaming terminal dashboard

  • atf watch

atf system

Manage full system lifecycle, version upgrades, and host diagnostics

  • atf system info
  • atf system upgrade
  • atf system start
  • atf system stop

atf config

Manage environment variables and configuration files (.env)

  • atf config list
  • atf config get
  • atf config set

Scripting with --json

Alert when the queue backs up
#!/usr/bin/env bash
set -euo pipefail

depth=$(atf data queue --json | jq '.pending')
if [ "$depth" -gt 500 ]; then
  atf admin broadcast --text "Queue depth is $depth — investigating"
fi
Gate a deployment on validation
# Fails the pipeline instead of deploying a broken stack
atf validate --strict --json | jq -e '.ok == true' > /dev/null

atf release verify
atf deploy --build
atf status --watch