3.6 KiB
3.6 KiB
title, status, folder, tags, created, updated, version
| title | status | folder | tags | created | updated | version | ||||
|---|---|---|---|---|---|---|---|---|---|---|
| GitHub CLI (gh) | active | 000-configs/tools |
|
2026-07-29 | 2026-07-29 | 1.0.0 |
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
gh --help # full help
gh auth status # confirm you're logged in
gh repo list # list all repos
gh repo view <repo> # 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:
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
gh repo create <owner>/<name> --private --description "what it is"
Flags:
--privateor--public--clone— also clone it locally after creating--push— push local branch to remote
List repos
gh repo list stateofshit --limit 50
View a repo
gh repo view stateofshit/shit_in_a_vault
Delete a repo
⚠️ Irreversible.
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:
cat /home/user/02-repos/shit_in_a_vault/04-models/model-boot.md
Everyday flow
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
cd /home/user/02-repos/shit_in_a_vault
git pull
Issues
Create an issue
gh issue create --title "Bug: thing broken" --body "Details here"
List issues
gh issue list
View / close
gh issue view <number>
gh issue close <number>
Pull Requests
Create a PR
# 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
gh pr list
gh pr view <number>
gh pr merge <number>
Gists
# Create
gh gist create file.txt
# List
gh gist list
# View
gh gist view <gist-id>
Working With Other Repos
Models can work with any repo stateofshit has access to.
Clone any accessible repo
gh repo clone stateofshit/webby /home/user/02-repos/webby
Already cloned repos are in /home/user/02-repos/:
webby—stateofshit/webbyshit_in_a_vault—stateofshit/shit_in_a_vault
Environment
ghbinary:/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.ymlcontents into chat output. - Never run
gh auth logout— it will break all future model access. - Deleting a repo is permanent. Use
--yeswith extreme care. ghrespects the current directory's git remote. Run it inside a repo to act on that repo.