lgh_clone
Clone a registered LGH repository to restore a working copy after data loss or materialize a backup on a new machine; it never overwrites existing files.
Instructions
Clone a repository from the LGH local server into a new working directory on this machine — the restore side of the backup loop and the inverse of lgh_up. Use it to recover a working copy after data loss or to materialize an existing backup on a new machine: find the exact registered name with lgh_list, make sure the server is up (lgh_status, otherwise lgh_serve_start), then clone. The name may carry a .git suffix. Refuses with a clear error when the name is not registered, the server is not running, or the destination directory already exists and is not empty — it never overwrites existing files. Returns JSON with name, clone_url, destination (absolute path), and the checked-out branch and HEAD commit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dest | No | Optional destination directory (absolute path recommended; defaults to ./<name> under the MCP server's working directory) | |
| name | Yes | Name of the repository registered with LGH, with or without .git suffix (find exact names with lgh_list) |