replicate

replicate is a command for Claude Code, Codex from benbjohnson/litestream-skills. It costs 0 tokens per session (962 once invoked), scanned A, original, Apache-2.0.

A command that continuously copies changes from SQLite databases to configured backup storage using Litestream.

In plain words
What is it for?
Use it to replicate one or more databases, run replication beside an application, restore a missing database automatically, or perform a single replication run.
Why use it?
It keeps an up-to-date remote copy of database changes, so the database can be recovered after local data loss.

Command for Claude CodeCodex

Written for Codex and Claude Code: installed under .codex/, but also a Claude Code command (commands/*.md).

Good fit Use it to replicate one or more databases, run replication beside an application, restore a missing database automatically, or perform a single replication run.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/benbjohnson/litestream-skills/replicate
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/benbjohnson/litestream-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for replicate

README.md
[![agentmods](https://agentmods.dev/badge/commands/benbjohnson/litestream-skills/replicate/github.svg)](https://agentmods.dev/commands/benbjohnson/litestream-skills/replicate)
Your own site
<a href="https://agentmods.dev/commands/benbjohnson/litestream-skills/replicate"><img src="https://agentmods.dev/badge/commands/benbjohnson/litestream-skills/replicate/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for replicate

Your own site · 80×15
<a href="https://agentmods.dev/commands/benbjohnson/litestream-skills/replicate"><img src="https://agentmods.dev/badge/commands/benbjohnson/litestream-skills/replicate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 962 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00962
Opus 5.5 $0.00000 $0.00385
Sonnet 5.5 $0.00000 $0.00192
Haiku 4.5 $0.00000 $0.00096

Measured 2mo ago against content hash 63f37a0978fb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

replicate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.codex/skills/litestream/commands/replicate.md · 166 lines

How it starts

The opening of the file, as written. The whole thing — 166 lines — stays where its author put it; the contents beside it link to each section on GitHub.

replicate Command

Continuously replicate SQLite databases to cloud storage.

Synopsis

# With config file
litestream replicate [-config PATH]

# With command line arguments
litestream replicate [flags] DB_PATH REPLICA_URL [REPLICA_URL...]

# Run application alongside replication
litestream replicate -exec "myapp serve"

Description

The replicate command is the main Litestream daemon. It:

  1. Opens configured SQLite databases
  2. Monitors the WAL for changes
  3. Converts changes to LTX format
  4. Uploads to configured storage backends
  5. Manages checkpoints and compaction

Flags

Flag Description
-config PATH Configuration file path (default: /etc/litestream.yml)
-no-expand-env Disable environment variable expansion
-exec COMMAND Run command as subprocess (shutdown when it exits)
-restore-if-db-not-exists Restore from replica if database doesn't exist
-once Replicate once and exit
-force-snapshot Force snapshot creation (requires -once)
-enforce-retention Enforce snapshot retention (requires -once)

Examples

Using Config File

# Use default config location
litestream replicate

# Specify config file
litestream replicate -config /path/to/litestream.yml

Command Line Arguments

# Single replica
litestream replicate /data/app.db s3://bucket/backup

# Multiple replicas (deprecated: use config file)
litestream replicate /data/app.db s3://bucket/backup sftp://user@host/backup

Run Application Subprocess

# Via command line
litestream replicate -exec "myapp serve --port 8080"

# Via config file
# exec: "myapp serve --port 8080"

Litestream will:

  1. Start replication
  2. Execute the command
  3. Shut down gracefully when command exits

Auto-Restore on Startup

litestream replicate -restore-if-db-not-exists

If the database doesn't exist, restore it from the replica before starting replication.

One-Shot Replication

Read the full file on GitHub · 166 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 166 lines · 0 tokens per session scan A 63f37a0978fb

Subscribe to this mod's changes

replicate is a command published in the GitHub repository benbjohnson/litestream-skills (5 stars, last pushed 9mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 962 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

replicate compared with commands from other repositories

replicate next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
replicatebenbjohnson/litestream-skillsCommand59mo agoApache-2.0A0Claude Code, Codex
pullfcakyon/claude-codex-settingsCommand1.2ktodayApache-2.0A0Claude Code
d1-migrationjezweb/claude-skillsCommand1.1k28d agoMITA11Claude Code
datasphere-clisecondsky/sap-skillsCommand4933d agoGPL-3.0A12Claude Code
bootstrapbuild-with-dhiraj/ai-workflow-framework-portability-kitCommand51mo agoMITA31Claude Code
vector-searchfrankxai/claude-code-oracle-skillsCommand213d agoApache-2.0A9Claude Code
setup-bigquery.esminicoohei/ai-agent-campCommand3471mo agononeA2Claude Code