# CLI for GitHub and GitLab --- ## Simple, modern, powerfull, Fast * Multiserver, repository-aware --- 1) Install, Info 2) auth login --- ## View 1) -w 2) --json --- ## Completion ```bash command -v gh >/dev/null 2>&1 && eval "$(gh completion -s bash)" command -v glab >/dev/null 2>&1 && eval "$(glab completion -s bash)" ``` --- ## Get started! ```bash= gh repo clone pdostal/github_repo glab repo clone pdostal/gitlab_repo ``` --- ## pr / mr 1) create 2) list * --author * --state (open|closed|merged|all) * --search * --limit 3) comment ID note ID 4) gh pr review ID (-a/-r/-c) glab mr ID (approve / revoke) 5) edit 6) checks 7) merge / close --- ## issue 1) issue list 2) issue create 3) issue edit ID (--body|--title) 4) gh issue comment ID glab issue note ID 6) issue close ID --- ## release 1) release list 2) release create --- ## repo 1) repo clone 2) repo create --- ## Github Actions ### gh workflow 1) list 2) run 3) view ID 4) enable / disable ### gh run 1) list 2) view 3) watch --- ## GitLab CI/CD ### glab ci 1) list 2) view 3) status 4) run --- ## Gists 1) gh gist list 2) dmesg | gh gist create (--public) --- ## ssh-key / gpg-key 1) list 2) create 3) delete --- ## gh extensions 1) list --- ## codespaces ## labels --- ## scripts ```bash= git log -1 --pretty=%B gh pr edit -b "TEST PULL REQUEST" gh pr edit -b "$(git log -1 --pretty=%B)" gh pr view --json title,body gh pr view --json title,body | jq -r '(.title) + "\n\n" + (.body)' git commit --amend -m "$(gh pr view --json title,body | jq -r '(.title) + "\n\n" + (.body)')" ``` --- ## Hub The `hub` is still alive but unsupported and less user-friendly. --- ## Resources * https://cli.github.com * https://github.com/cli/cli * https://github.com/pdostal/github_repo * https://docs.gitlab.com/ee/integration/glab/ * https://gitlab.com/gitlab-org/cli * https://github.com/github/hub
{"metaMigratedAt":"2023-06-17T20:11:43.515Z","metaMigratedFrom":"Content","title":"CLI for GitHub and GitLab","breaks":true,"contributors":"[{\"id\":\"7532d045-1b8e-4c23-8c13-9f618f05edac\",\"add\":2324,\"del\":405}]"}
    327 views