Skip to main content
batch operations allow you to create or delete multiple records concurrently, dramatically improving performance for bulk operations.

batch delete

delete multiple records in one command with automatic concurrency control.

multiple URIs as arguments

output:

from file via stdin

where uris.txt contains:

control concurrency

batch create

create multiple records from JSONL (JSON Lines) format.

single record (backward compatible)

batch create from JSONL

where posts.jsonl contains one JSON object per line:
output:

control concurrency

batch update

update multiple records from JSONL format with uri field.

single update (backward compatible)

batch update from JSONL

where updates.jsonl contains one JSON object per line with a uri field:
output:
note: the uri field can be a shorthand URI (just the record key) or a full AT-URI. the uri field is extracted from each JSON object, and the remaining fields are used as the update data.

control concurrency

JSONL format

JSONL (JSON Lines) is one JSON object per line:
rules:
  • one complete JSON object per line
  • no commas between objects
  • empty lines are ignored
  • no array wrapper [...]
generate JSONL:

performance

batch operations use concurrent execution with rate limiting:
  • default concurrency: 10 simultaneous operations
  • respects rate limits: semaphore-based throttling
  • progress tracking: shows progress bar in interactive terminals
  • error handling: continues on error by default, reports failures at end

real-world performance

sequential deletion (old way):
batch deletion (new way):
5x faster for bulk operations.

common workflows

backup and restore

bulk delete by pattern

migrate records

bulk update posts

limitations

  • authentication required: batch operations need valid credentials
  • rate limits apply: respect PDS rate limits with --concurrency
  • memory usage: large batches held in memory during processing

error handling

continue on error (default)

if some URIs fail, it continues and reports:

fail-fast mode

stops immediately on first error - useful for testing.