diff --git a/README.md b/README.md index f3224f0b452..36b7ea6cfcf 100644 --- a/README.md +++ b/README.md @@ -282,6 +282,10 @@ Finally, double-click the .AppImage file to run it. Before opening a new issue, please check the [Known Issues](docs/known-issues.md) document for common issues and their workarounds. +## Command Line Interface + +GitHub Desktop Plus includes a CLI (`github-desktop-plus-cli`) for opening and cloning repositories from the terminal. See the [CLI documentation](docs/cli.md) for usage details and instructions on creating a shorter alias. + ## Running the app locally 💻 ### From the terminal diff --git a/docs/cli.md b/docs/cli.md new file mode 100644 index 00000000000..7f9fd6304b9 --- /dev/null +++ b/docs/cli.md @@ -0,0 +1,39 @@ +# Command Line Interface + +GitHub Desktop Plus includes a CLI that lets you open repositories and clone them directly from the terminal. + +## Usage + +``` +github-desktop-plus-cli Open the current directory +github-desktop-plus-cli open [path] Open the provided path +github-desktop-plus-cli clone [-b branch] Clone a repository by URL or name/owner (e.g. torvalds/linux) +``` + +## Creating a shorter alias + +If you find `github-desktop-plus-cli` too long to type, you can create a shorter alias in your shell (e.g. `github-plus`, or even just `github`): + +### Windows (PowerShell) + +Add this line to your PowerShell profile (open it with `notepad $PROFILE`): + +```powershell +Set-Alias github-plus github-desktop-plus-cli +``` + +### macOS / Linux (Bash or Zsh) + +Add this line to your `~/.bashrc` or `~/.zshrc`: + +```bash +alias github-plus='github-desktop-plus-cli' +``` + +### macOS / Linux (Fish) + +Run once: + +```fish +alias --save github-plus github-desktop-plus-cli +```