You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: Add github-cli resource (auto-generated from issue #32)
* fix: settings not being quoted when called
* feat: improve deploy for beta
* feat: added interactive login for github
* chore: bump version
* chore: move all homebrew calls to the utils.installviapackagemgr
* feat: updated homebrew resource to support the new tap trust system
* fix: asdf on (we switched to nodeJS), let's use deno instead. Fixed github cli already being installed
* feat: collpase all jetbrains tests to a single test
* fix: for homebrew still prompting
* fix: auto-fix test failures from Test all (MacOS) (#66)
Co-authored-by: kevinwang5658 <20214115+kevinwang5658@users.noreply.github.com>
* fix: add guard around uninstall github
* fix: auto-fix test failures from Test all (Linux) (#67)
Co-authored-by: kevinwang5658 <20214115+kevinwang5658@users.noreply.github.com>
* feat: change cron for tests to run every day
* chore; bump plugin-lib version
---------
Co-authored-by: kevinwang5658 <20214115+kevinwang5658@users.noreply.github.com>
Co-authored-by: kevinwang <kevinwang5658@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
**`interactive: true` vs `stdin: true`** — these are distinct options:
262
+
263
+
-`interactive: true` — passes `-i` to the shell so it sources the user's RC file (`.zshrc`, `.bashrc`). Use this when the command needs PATH entries or shell aliases from the RC. It does **not** allow the user to type input.
264
+
-`stdin: true` — connects the user's terminal stdin directly to the spawned process. Use this when the command requires real user input (e.g. browser-based OAuth prompts, interactive wizards, password entry). Without this flag, interactive prompts will hang.
265
+
266
+
```typescript
267
+
// Command needs PATH from shell RC but no user input
**Never use `sudo` inside `$.spawn` or `$.spawnSafe`.** Use `{ requiresRoot: true }` in the options instead. The framework handles privilege escalation through the parent process.
262
275
263
276
```typescript
@@ -287,16 +300,34 @@ Utils.isWindows()
287
300
288
301
**Package Installation:**
289
302
290
-
Always use `Utils.installViaPkgMgr(pkg)` from `@codifycli/plugin-core` to install system packages. This is platform-agnostic and automatically dispatches to the correct package manager (Homebrew on macOS, apt on Debian/Ubuntu, etc.). Never hardcode package manager calls like `brew install`, `apt-get install -y`, or `sudo apt install` in resource code.
303
+
Always use `Utils.installViaPkgMgr(pkg)` from `@codifycli/plugin-core` to install system packages. This is platform-agnostic and automatically dispatches to the correct package manager (Homebrew on macOS, apt on Debian/Ubuntu, etc.). Never hardcode package manager calls like `brew install`, `apt-get install -y`, or `sudo apt install` in resource code — not even inside macOS-only branches.
304
+
305
+
The function accepts an optional `PkgMgrOptionsMap` (second arg) for per-PM flags, and an optional `forcePackageManager` (third arg) to skip OS detection:
This applies to prerequisite checks too. When a resource needs a system dependency (e.g. `curl`, `git`, `make`), always install via `Utils.installViaPkgMgr` rather than spawning a package manager directly.
description: Reference pages for the GitHub CLI (gh) resources
4
+
---
5
+
6
+
The GitHub CLI resources install and configure the [GitHub CLI (`gh`)](https://cli.github.com/manual/) tool. Four resources are provided to manage distinct concerns: installation and global configuration, authentication, command aliases, and GitHub account SSH keys.
7
+
8
+
---
9
+
10
+
## github-cli
11
+
12
+
Installs `gh` and manages global configuration settings such as the default git protocol, editor, pager, and browser.
13
+
14
+
### Parameters
15
+
16
+
-**gitProtocol**: *(string: `https` | `ssh`)* Default protocol for git operations. Defaults to `https`.
17
+
-**editor**: *(string)* Default text editor for gh commands (e.g. `vim`, `nano`, `code --wait`).
18
+
-**prompt**: *(string: `enabled` | `disabled`)* Whether interactive prompts are shown. Defaults to `enabled`.
19
+
-**pager**: *(string)* Pager program used to display long output (e.g. `less`).
20
+
-**browser**: *(string)* Default browser to open URLs (e.g. `firefox`).
21
+
22
+
### Example usage
23
+
24
+
```json title="codify.jsonc"
25
+
[
26
+
{
27
+
"type": "github-cli",
28
+
"gitProtocol": "ssh",
29
+
"editor": "vim"
30
+
}
31
+
]
32
+
```
33
+
34
+
---
35
+
36
+
## github-cli-auth
37
+
38
+
Authenticates the GitHub CLI using a Personal Access Token (PAT). Supports multiple accounts and GitHub Enterprise Server hostnames.
39
+
40
+
> **Security note:** The `token` field is marked sensitive and is never logged or displayed by Codify. Store PATs in a secrets manager and reference them via environment variables where possible.
41
+
42
+
### Parameters
43
+
44
+
-**token***(required)*: *(string)* GitHub personal access token (classic or fine-grained).
45
+
-**hostname**: *(string)* GitHub hostname. Defaults to `github.com`. Set to your GHE hostname (e.g. `github.mycompany.com`) for enterprise instances.
46
+
47
+
### Example usage
48
+
49
+
```json title="codify.jsonc"
50
+
[
51
+
{
52
+
"type": "github-cli",
53
+
"gitProtocol": "https"
54
+
},
55
+
{
56
+
"type": "github-cli-auth",
57
+
"token": "<Replace me here!>"
58
+
}
59
+
]
60
+
```
61
+
62
+
---
63
+
64
+
## github-cli-alias
65
+
66
+
Creates a short-hand alias for a `gh` command. Each alias is an independent resource, identified by its name.
67
+
68
+
### Parameters
69
+
70
+
-**alias***(required)*: *(string)* The alias name used to invoke the command (e.g. `prc`).
71
+
-**expansion***(required)*: *(string)* The gh command or shell command this alias expands to (e.g. `pr create`).
72
+
-**shell**: *(boolean)* When `true`, the expansion is executed as a shell command via `sh`, enabling pipes, redirects, and other shell features. Defaults to `false`.
73
+
74
+
### Example usage
75
+
76
+
```json title="codify.jsonc"
77
+
[
78
+
{
79
+
"type": "github-cli-alias",
80
+
"alias": "prc",
81
+
"expansion": "pr create"
82
+
},
83
+
{
84
+
"type": "github-cli-alias",
85
+
"alias": "prs",
86
+
"expansion": "pr status"
87
+
}
88
+
]
89
+
```
90
+
91
+
---
92
+
93
+
## github-cli-ssh-key
94
+
95
+
Uploads a local SSH public key to your GitHub account. This is distinct from the `ssh-key` resource, which manages local key files — this resource registers an existing key with GitHub via the `gh ssh-key add` command.
96
+
97
+
Requires authentication (`github-cli-auth`) to be configured.
98
+
99
+
### Parameters
100
+
101
+
-**title***(required)*: *(string)* Display name for the key on GitHub (e.g. `My Laptop`).
102
+
-**keyFile***(required)*: *(string)* Path to the local SSH public key file (e.g. `~/.ssh/id_ed25519.pub`).
103
+
-**keyType**: *(string: `authentication` | `signing`)* Key usage type. Use `authentication` (default) for git over SSH, or `signing` for commit signing.
Copy file name to clipboardExpand all lines: package.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "default",
3
-
"version": "1.10.0",
3
+
"version": "1.11.0",
4
4
"description": "Default plugin for Codify - provides 50+ declarative resources for managing development tools and system configuration across macOS and Linux",
0 commit comments