@ghfs/cli 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,97 @@
1
+ # ghfs
2
+
3
+ Mirror GitHub issues and pull requests to local markdown files, then execute maintainer actions in batch from `.ghfs/execute.yml`.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pnpm install
9
+ pnpm build
10
+ ```
11
+
12
+ ## Commands
13
+
14
+ ```bash
15
+ ghfs # same as `ghfs sync`
16
+ ghfs sync [--repo owner/name] [--since ISO] [--full]
17
+ ghfs execute [--file .ghfs/execute.yml] [--apply] [--non-interactive] [--continue-on-error]
18
+ ghfs status
19
+ ghfs schema
20
+ ```
21
+
22
+ ## Config (`ghfs.config.ts`)
23
+
24
+ ```ts
25
+ import { defineConfig } from '@ghfs/cli'
26
+
27
+ export default defineConfig({
28
+ repo: 'owner/name',
29
+ storageDir: '.ghfs',
30
+ executeFile: '.ghfs/execute.yml',
31
+ })
32
+ ```
33
+
34
+ Precedence: `CLI flags > ghfs.config.ts > auto-detect (.git/package.json) > .ghfs/.sync.json`.
35
+
36
+ ## Local Files
37
+
38
+ ```txt
39
+ .ghfs/
40
+ .sync.json
41
+ execute.yml
42
+ schema/execute.schema.json
43
+ issues/
44
+ 123.md
45
+ 123.patch
46
+ closed/
47
+ 124.md
48
+ ```
49
+
50
+ - Open issues/PRs: `.ghfs/issues/<number>.md`
51
+ - Closed issues/PRs: `.ghfs/issues/closed/<number>.md`
52
+ - Open PR patch: `.ghfs/issues/<number>.patch`
53
+
54
+ ## Execute Actions
55
+
56
+ Supported `action` values:
57
+
58
+ - `close`
59
+ - `reopen`
60
+ - `set-title`
61
+ - `set-body`
62
+ - `add-comment`
63
+ - `add-labels`
64
+ - `remove-labels`
65
+ - `set-labels`
66
+ - `add-assignees`
67
+ - `remove-assignees`
68
+ - `set-assignees`
69
+ - `set-milestone`
70
+ - `clear-milestone`
71
+ - `lock`
72
+ - `unlock`
73
+ - `request-reviewers` (PR)
74
+ - `remove-reviewers` (PR)
75
+ - `mark-ready-for-review` (PR)
76
+ - `convert-to-draft` (PR)
77
+
78
+ Each entry is one action object with `action`, `number`, and action-specific payload fields.
79
+
80
+ ## Execute File Example
81
+
82
+ ```yaml
83
+ - action: add-labels
84
+ number: 12
85
+ labels: [triage]
86
+ - action: request-reviewers
87
+ number: 45
88
+ reviewers: [alice, bob]
89
+ ```
90
+
91
+ ## Authentication
92
+
93
+ 1. `gh auth token` (preferred)
94
+ 2. `GH_TOKEN` / `GITHUB_TOKEN`
95
+ 3. TTY prompt on first run
96
+
97
+ In non-TTY mode, missing auth token is a hard error.
package/dist/cli.d.mts ADDED
@@ -0,0 +1 @@
1
+ export { };