lgh_add
Register a local Git repository with the LGH server by creating a bare repo and adding an 'lgh' remote, enabling push and backup via lgh_up.
Instructions
Register a local Git repository with the LGH local server. Creates a bare repository under the LGH repos dir and adds an "lgh" remote pointing at it to the source repo. Initializes a git repo first if the directory is not one yet; refuses with an error if the path does not exist, the name is already registered, or a bare repo already exists at the target path. Returns the repository name and its clone URL. Use lgh_up to push subsequent commits and lgh_remove to unregister.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "lgh_add"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Optional custom name for the repository on LGH | |
| path | Yes | Absolute path to the LOCAL working directory containing the Git repository |