# GitHub CLI (gh) Instructions for Open WebUI Models `gh` is the GitHub CLI — v2.96.0, fully installed and authenticated as **`stateofshit`**. This document covers how any model on this server can use `gh` for repo management, issues, PRs, and everything GitHub-related. --- ## Quick Reference ```bash gh --help # full help gh auth status # confirm you're logged in gh repo list # list all repos gh repo view # view a repo gh issue list # list issues in current dir's repo gh pr create # create a pull request ``` --- ## Authentication Status Already logged in as **`stateofshit`** with token scopes: `admin:public_key`, `gist`, `read:org`, `repo`. To check: ```bash gh auth status ``` Expected output: ``` ✓ Logged in to github.com account stateofshit ✓ Git operations protocol: ssh ✓ Token scopes: 'admin:public_key', 'gist', 'read:org', 'repo' ``` --- ## Repo Management ### Create a new repo ```bash gh repo create / --private --description "what it is" ``` Flags: - `--private` or `--public` - `--clone` — also clone it locally after creating - `--push` — push local branch to remote ### List repos ```bash gh repo list stateofshit --limit 50 ``` ### View a repo ```bash gh repo view stateofshit/shit_in_a_vault ``` ### Delete a repo ⚠️ **Irreversible.** ```bash gh repo delete stateofshit/shit_in_a_vault --yes ``` --- ## Working With the Vault Repo The vault lives at `/home/user/02-repos/shit_in_a_vault/`. Before working with it, read the boot prompt: ```bash cat /home/user/02-repos/shit_in_a_vault/04-models/model-boot.md ``` ### Everyday flow ```bash cd /home/user/02-repos/shit_in_a_vault # Check status git status # Stage and commit git add -A git commit -m "description of changes" # Push git push ``` No need to authenticate — `git` uses SSH which is already set up via `~/.ssh/config`. ### Pull latest ```bash cd /home/user/02-repos/shit_in_a_vault git pull ``` --- ## Issues ### Create an issue ```bash gh issue create --title "Bug: thing broken" --body "Details here" ``` ### List issues ```bash gh issue list ``` ### View / close ```bash gh issue view gh issue close ``` --- ## Pull Requests ### Create a PR ```bash # From a feature branch git checkout -b my-feature # ... make changes, commit, push ... gh pr create --title "Add feature" --body "What it does" ``` ### List / view / merge ```bash gh pr list gh pr view gh pr merge ``` --- ## Gists ```bash # Create gh gist create file.txt # List gh gist list # View gh gist view ``` --- ## Working With Other Repos Models can work with any repo `stateofshit` has access to. ### Clone any accessible repo ```bash gh repo clone stateofshit/webby /home/user/02-repos/webby ``` Already cloned repos are in `/home/user/02-repos/`: - `webby` — `stateofshit/webby` - `shit_in_a_vault` — `stateofshit/shit_in_a_vault` --- ## Environment - `gh` binary: `/usr/bin/gh` (system-installed) - Config: `~/.config/gh/hosts.yml` - Token is stored in that config — **do not expose it in chat or in files** - Git protocol: SSH (key at `~/.ssh/github_openwebui`) --- ## Notes - **Never** paste the token or `~/.config/gh/hosts.yml` contents into chat output. - **Never** run `gh auth logout` — it will break all future model access. - Deleting a repo is permanent. Use `--yes` with extreme care. - `gh` respects the current directory's git remote. Run it inside a repo to act on that repo.