lua git turns on automatic git commits for the Lua operations that change your project or its versions, and links a GitHub account so those commits can be pushed to origin. It only writes to your local repository and lua.skill.yaml; nothing changes on the Lua platform or for end users.
Verified against lua-cli 3.33.0.
Synopsis
Description
connect checks, in order, that git is on PATH, that the project is inside a repository, and that user.email and user.name are configured. On the first failure it prints the exact git command that fixes it and writes nothing; it never runs git init or git config for you. When every check passes it writes git: { enabled: true } to lua.skill.yaml. With --auto-push it also requires a linked GitHub account and an origin remote of the form https://github.com/<owner>/<repo>.git, then writes git.autoPush: true as well.
Once enabled, these operations commit automatically: bare lua push and lua push all (a single-primitive push or lua push backup does not commit), lua version create (a commit tagged lua/v<n>, with the commit hash recorded on the agent version), lua version promote and lua version delete (audit commits with no file changes), and lua pull. Commit messages start with lua: , for example lua: push staged code and lua: promote v3 to production. With auto-push on, each commit is pushed to origin using the linked account. A git or push failure never fails the Lua operation.
disconnect sets git.enabled: false and leaves existing commits and tags untouched. status prints whether the integration is enabled, the git version, the configured identity, and the most recent lua: commit and lua/ tag; it does not contact the server.
auth github links a GitHub account through the OAuth device flow and stores the token under ~/.lua-cli/. If an account is already linked it asks Already linked to GitHub as @<user>. Re-link? unless --force. auth status shows the linked user, the granted scopes, and when it was linked. auth disconnect [provider] removes the stored token; github is the default and the only supported provider.
Arguments
Options
Examples
Enable auto-commits for this project; the command never prompts, so the CI form only adds--ci:
connect, status prints one line:
Output
Output
Exit codes
See also
- Release an agent — what
lua version createtags lua versionlua pulllua.skill.yaml— thegitsection

