#192·lore

Add a public command or API to attach a remote URL to an existing local repository

Author: dtmlandCreated Sep 6, 2026Updated Sep 6, 2026
Labelsenhancementneeds-triage

Problem

Use case: An application creates and uses a repository entirely offline, then later lets the user promote that same repository to a server without changing its repository identity or replaying its history.

Current behavior: repository config exposes get but no setter or attach operation. repository create and clone initialize new local repositories rather than attaching an existing one.

Proposed solution

Requested behavior: Provide a supported command and C API operation that:

  1. accepts a remote URL for an existing local repository;
  2. optionally validates or registers the remote name with the local repository ID;
  3. atomically persists remote_url;
  4. rejects mismatched remote identities; and
  5. leaves the previous configuration unchanged on any failure.

Alternatives considered

The configuration reference permits editing .lore/config.toml by hand, and setting remote_url there works, but every embedding application must implement that mutation itself.