Skip to content

feat: add replicator init command (per-repo setup) #5

Closed

Description

@jflowers

Context

The unbound-force CLI separates per-machine setup (uf setup) from per-repo initialization (uf init). Replicator currently has replicator setup (per-machine: creates ~/.config/swarm-tools/ + initializes SQLite DB) but no per-repo init command.

uf init delegates to sub-tool init commands for per-repo setup:

  • dewey init — creates .dewey/ workspace
  • replicator init — needed: creates .hive/ directory

Without this, .hive/ is only created organically on first hive_sync call, which means the project directory is not visibly ready for swarm operations after uf init.

Blocks: unbound-force/unbound-force#82 (replace Swarm plugin with Replicator)

Proposed Behavior

replicator init
  1. Create .hive/ directory in the current working directory (or --path if provided)
  2. Create .hive/cells.json with empty array ([]) if it does not exist
  3. Idempotent — skip silently if .hive/ already exists and is valid
  4. Print status: initialized .hive/ or already initialized

Design Notes

  • Should be idempotent (safe to run multiple times)
  • Should NOT require the SQLite database to exist (replicator setup may not have run yet — uf init may run before uf setup in some flows)
  • Should NOT run git commands (no git add / git commit) — that is hive_sync's job
  • Exit 0 on success or already-initialized, exit 1 on error

Acceptance Criteria

  • replicator init in a directory without .hive/ creates it with an empty cells.json
  • replicator init in a directory with existing .hive/ prints already initialized and exits 0
  • replicator init --path /some/dir creates .hive/ at the specified path
  • uf init can delegate to replicator init (same pattern as dewey init)

Activity

  1. added a commit that references this issue on Apr 6, 2026
    e24c5b7
  2. added 4 commits that reference this issue on Aug 7, 2026
  3. added a commit that references this issue on Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions