@ghfs/cli 0.0.1 → 0.0.3

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 CHANGED
@@ -19,9 +19,10 @@ It will sync the open issues and pull requests to the local filesystem under `.g
19
19
 
20
20
  ```txt
21
21
  .ghfs/
22
- repo.json # repository basic information
23
- issues.md # index of fetched issues
24
- pulls.md # index of fetched pull requests
22
+ repo.json # repository basic information
23
+ issues.md # index of fetched issues
24
+ pulls.md # index of fetched pull requests
25
+ execute.md # queued operations
25
26
  issues/
26
27
  00134-some-bug.md
27
28
  closed/
@@ -35,22 +36,53 @@ It will sync the open issues and pull requests to the local filesystem under `.g
35
36
 
36
37
  Then you can view them offline, or ask your local agent to summarize them for you.
37
38
 
38
- ## CLI feedback
39
+ ## Execute operations
39
40
 
40
- `ghfs` now provides stage-based sync feedback.
41
+ `ghfs` also allows you to take actions on the issues and pull requests in batch.
41
42
 
42
- - In interactive terminals (TTY), `ghfs` uses rich progress indicators.
43
- - In CI or piped output, `ghfs` prints deterministic plain-text progress lines.
44
- - `ghfs sync --full` bypasses metadata early-return and runs full pagination.
43
+ `ghfs execute` merges operations from multiple sources:
45
44
 
46
- `ghfs status` now also includes diagnostics from the latest sync run (duration, request count, counters, and stage timings) from `.ghfs/.sync.json`.
45
+ 1. `execute.md` (human-friendly commands)
46
+ 2. `per-issue` markdown frontmatter changes (from `.ghfs/issues/**/*.md` and `.ghfs/pulls/**/*.md`)
47
+ 3. `execute.yml` (explicit YAML operations)
47
48
 
48
- ## Execute operations
49
+ Note: execution merge order is `execute.yml` -> `execute.md` -> `per-issue` generated operations.
49
50
 
50
- `ghfs` also allows you to take actions on the issues and pull requests in batch.
51
+ ### 1) `execute.md` (recommended)
52
+
53
+ `execute.md` is best for quick/manual batching:
54
+
55
+ ```md
56
+ close #123 #234
57
+ set-title #125 "New title"
58
+ label #125 bug, enhancement
59
+ close-comment #126 "Closing this as completed"
60
+ ```
61
+
62
+ Action names in both `execute.yml` and `execute.md` are case-insensitive and support aliases, including:
63
+
64
+ - `closes` -> `close`
65
+ - `open` -> `reopen`
66
+ - `close-comment` / `comment-close` / `close-and-comment` / `comment-and-close` -> `close-with-comment`
67
+
68
+ `execute.md` also supports comment lines with `#` and `//`, plus HTML comment blocks using `<!-- ... -->`. These comments are preserved when operations are rewritten.
69
+
70
+ ### 2) Per-issue operations
71
+
72
+ Edit frontmatter directly in issue/PR markdown files:
73
+
74
+ - `title`
75
+ - `state` (`open` / `closed`)
76
+ - `labels`
77
+ - `assignees`
78
+ - `milestone`
79
+
80
+ `ghfs execute` will diff these values and generate operations automatically (for example `set-title`, `close`/`reopen`, label updates, assignee updates, milestone updates).
81
+
82
+ ### 3) `execute.yml`
51
83
 
52
84
  `ghfs sync` or `ghfs execute` will auto-create `.ghfs/execute.yml` and `.ghfs/schema/execute.schema.json` if missing.
53
- Then edit `.ghfs/execute.yml` with content like:
85
+ Use `execute.yml` for explicit/low-level operations:
54
86
 
55
87
  ```yaml
56
88
  # close the issue #123
@@ -68,20 +100,13 @@ Then edit `.ghfs/execute.yml` with content like:
68
100
  labels: [bug, feature]
69
101
  ```
70
102
 
71
- Then run
103
+ Then run `ghfs execute` to preview, and `ghfs execute --run` to execute.
72
104
 
73
105
  ```bash
74
106
  ghfs execute
107
+ ghfs execute --run
75
108
  ```
76
109
 
77
- to execute the operations in batch.
78
-
79
- When running `ghfs execute --apply`:
80
- - Each successfully applied operation is removed from `.ghfs/execute.yml`.
81
- - After execution, `ghfs` runs a targeted sync only for affected issue/PR numbers.
82
-
83
- > TODO: directly editing the `<5-digit-number>-<slug>.md` file to apply the operations will be rolled out in the future.
84
-
85
110
  ## Agent Skill
86
111
 
87
112
  This repository ships an [agent skill](https://agentskills.io/home) at [`skills/ghfs/SKILL.md`](skills/ghfs/SKILL.md).
@@ -118,9 +143,10 @@ export default defineConfig({
118
143
 
119
144
  ## TODOs
120
145
 
121
- - [ ] `execute.md` file with human-friendly instructions (`close #123 #234`, `set-title #125 "New title"`).
146
+ - [x] `execute.md` file with human-friendly instructions (`close #123 #234`, `set-title #125 "New title"`).
122
147
  - [x] Directly editing the `<5-digit-number>-<slug>.md` file to apply the operations.
123
148
  - [ ] Add a VS Code extension for guided sync/execute.
124
149
  - [ ] Documentation.
125
150
  - [x] Index page, and basic repo info
126
151
  - [x] Agent Skills.
152
+ - [ ] Local Web UI for managing the local mirror.
package/dist/cli.d.mts ADDED
@@ -0,0 +1 @@
1
+ export { };