Skip to content

Commit 9abedf2

Browse files
authored
Merge pull request #124 from guplem/feature/github-plus-cli-alias
Add CLI documentation with usage and alias instructions
2 parents b135b0a + b7dec04 commit 9abedf2

2 files changed

Lines changed: 43 additions & 0 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,10 @@ Finally, double-click the .AppImage file to run it.
282282

283283
Before opening a new issue, please check the [Known Issues](docs/known-issues.md) document for common issues and their workarounds.
284284

285+
## Command Line Interface
286+
287+
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.
288+
285289
## Running the app locally 💻
286290

287291
### From the terminal

docs/cli.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Command Line Interface
2+
3+
GitHub Desktop Plus includes a CLI that lets you open repositories and clone them directly from the terminal.
4+
5+
## Usage
6+
7+
```
8+
github-desktop-plus-cli Open the current directory
9+
github-desktop-plus-cli open [path] Open the provided path
10+
github-desktop-plus-cli clone [-b branch] <url> Clone a repository by URL or name/owner (e.g. torvalds/linux)
11+
```
12+
13+
## Creating a shorter alias
14+
15+
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`):
16+
17+
### Windows (PowerShell)
18+
19+
Add this line to your PowerShell profile (open it with `notepad $PROFILE`):
20+
21+
```powershell
22+
Set-Alias github-plus github-desktop-plus-cli
23+
```
24+
25+
### macOS / Linux (Bash or Zsh)
26+
27+
Add this line to your `~/.bashrc` or `~/.zshrc`:
28+
29+
```bash
30+
alias github-plus='github-desktop-plus-cli'
31+
```
32+
33+
### macOS / Linux (Fish)
34+
35+
Run once:
36+
37+
```fish
38+
alias --save github-plus github-desktop-plus-cli
39+
```

0 commit comments

Comments
 (0)