XibeCode

Xibe Daemon (24/7)

Xibe Daemon — long-lived coding agent for Telegram, Discord, Slack, cron, and systemd start/stop.

Xibe Daemon (24/7)

Xibe Daemon is the always-on coding agent: Telegram / Discord / Slack, cron, pairing, and delivery ledger.

CLI primary: xibecode daemon
Alias: xibecode gateway (same process)

This is separate from the E2B cloud gateway (sandbox HTTP proxy). See Cloud / E2B.

Home layout (~/.xibecode or $XIBECODE_HOME)

PathPurpose
profile-*.jsonInteractive CLI profiles
.env / daemon.env / gateway.envSecrets (API keys, bot tokens)
daemon/Daemon runtime (migrates from legacy gateway/)
daemon/sessions/Messaging chat sessions
daemon/logs/daemon.logDaemon log
daemon/pairing.jsonDM pairing state
daemon/delivery-ledger.jsonAt-least-once outbound delivery
cron/Scheduled jobs
memories/Curated MEMORY.md / USER.md
skills/Learned / user skills
projects/JSONL transcripts per project cwd
logs/Shared logs

Override root with XIBECODE_HOME.

Quick start

# Configure tokens (wizard)
xibecode setup gateway

# Or edit secrets manually:
# ~/.xibecode/daemon.env  (or gateway.env / .env)
# TELEGRAM_BOT_TOKEN=...
# TELEGRAM_ALLOWED_USERS=123456789
# ANTHROPIC_API_KEY=...

# Foreground
xibecode daemon --workdir /path/to/repo

# Always-on (systemd user service)
xibecode daemon --install --workdir /path/to/repo
xibecode daemon --start
xibecode daemon --status

Start / stop / status

CommandEffect
xibecode daemonRun in foreground (Ctrl+C stops)
xibecode daemon --installInstall systemd unit xibecode-daemon.service
xibecode daemon --startStart the service
xibecode daemon --stopStop the service
xibecode daemon --statusService status
xibecode daemon --cron-onlyCron only (no messaging)
xibecode daemon --workdir <path>Default project directory

xibecode gateway … is a full alias for the same flags.

Systemd helpers after install:

systemctl --user daemon-reload
systemctl --user enable --now xibecode-gateway
# Optional: keep running after logout
sudo loginctl enable-linger $USER

Environment (~/.xibecode/gateway.env)

VariablePurpose
TELEGRAM_BOT_TOKENBotFather token
TELEGRAM_ALLOWED_USERSComma-separated Telegram user ids
TELEGRAM_HOME_CHANNELDefault channel for cron delivery
DISCORD_* / SLACK_*Optional adapters
Provider API keysANTHROPIC_API_KEY, OPENAI_API_KEY, OPENROUTER_API_KEY, …
XIBECODE_FALLBACK_PROVIDERSFailover pool string
XIBECODE_GATEWAY_WORKDIRDefault workdir
GATEWAY_ALLOW_ALL_USERSDev-only; do not enable on public bots

In-chat commands

SlashMeaning
/stopAbort the current agent run (not the gateway process)
/new / /resetClear conversation history
/statusBusy state, workdir, adapters
/workdir [path]Set project directory for this chat
/progress on|offTool progress edits
/sethomeCron delivery home
/helpHelp

Process lifecycle = gateway --start / --stop.
Run lifecycle = /stop or natural completion.

Security

  • Prefer allowlists (TELEGRAM_ALLOWED_USERS) or pairing (xibecode pair).
  • Never commit gateway.env.
  • Treat bot tokens like production secrets.

Pairing

xibecode pair list
xibecode pair approve telegram <code>
xibecode pair revoke telegram <userId>

Logs & sessions

  • Logs: ~/.xibecode/gateway/logs/gateway.log
  • Sessions: ~/.xibecode/gateway/sessions/

Iterations

Gateway agent runs default to unlimited iterations (0). Abort with /stop if needed. See Agent engine.

  • Cron — scheduled tasks (requires gateway running)
  • Setup — wizard path for Telegram
  • Providers — API keys for the agent
Ctrl+I
Assistant

How can I help?

Ask me about configuration, installation, or specific features.