Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/karimaziev/gh-repo

Create and manage gh repositories in emacs.
https://github.com/karimaziev/gh-repo

Last synced: 4 days ago
JSON representation

Create and manage gh repositories in emacs.

Awesome Lists containing this project

README

        

#+OPTIONS: ^:nil tags:nil

* About

This library provides interactive Emacs commands for interacting with GitHub
repositories using the GitHub API.

*Key features*:

- Creating new repositories
- Viewing repositories as a rich tree structure
- Viewing repositories files
- Listing user repositories
- Cloning repositories
- Deleting repositories
- Viewing repositories as a rich tree structure
- Searching for repositories with advanced filtering
- A transient menu is available to access all the key features.

[[./gh-repo.gif]]

* Table of Contents :TOC_2_gh:QUOTE:
#+BEGIN_QUOTE
- [[#about][About]]
- [[#requirements][Requirements]]
- [[#installation][Installation]]
- [[#with-use-package-and-straightel][With use-package and straight.el]]
- [[#manual-installation][Manual installation]]
- [[#auth][Auth]]
- [[#usage][Usage]]
#+END_QUOTE

* Requirements

| Name | Version |
|-------------+---------|
| Emacs | 29.1 |
| ~request~ | 0.3.2 |
| ~transient~ | 0.4.1 |
| ~ghub~ | 3.6.0 |
| ~ivy~ | 0.14.0 |

* Installation

** With use-package and straight.el
#+begin_src elisp :eval no
(use-package gh-repo
:straight (gh-repo
:repo "KarimAziev/gh-repo"
:type git
:host github)
:commands (gh-repo-menu)
:config
(setq gh-repo-ghub-auth-info '("YOUR_GITHUB_USERNAME" . gh-repo)))
#+end_src

** Manual installation

Download the source code and put it wherever you like, e.g. into =~/.emacs.d/gh-repo/=

#+begin_src shell :eval no
git clone https://github.com/KarimAziev/gh-repo.git ~/.emacs.d/gh-repo/
#+end_src

Add the downloaded directory to the load path:

#+begin_src elisp :eval no
(add-to-list 'load-path "~/.emacs.d/gh-repo/")
(require 'gh-repo)
#+end_src

** Auth
=gh-repo= manages authentication through customizable variable =gh-repo-ghub-auth-info=:

This a cons cell, which car is a string containing your GitHub username and cdr is either a string containing the OAuth token or a symbol indicating where to fetch the OAuth token.

For example, if your github username is =YOUR_GITHUB_USERNAME= is should be:

#+begin_src emacs-lisp
(setq gh-repo-ghub-auth-info '("YOUR_GITHUB_USERNAME" . gh-repo))
#+end_src

Next, add an entry to your =auth-sources=:

#+begin_example
machine api.github.com login YOUR-GITHUB-USERNAME^gh-repo password YOUR-GITHUB-TOKEN
#+end_example

You can add this entry to your =~/.authinfo.gpg= file (recommended for secure, encrypted storage) or =~/.authinfo= (see variable =auth-sources=).
** Usage

This library offers several interactive commands to work with GitHub
repositories.

A transient menu is available to access all the key features.
To open the transient menu, type:

=M-x gh-repo-menu=