@only1btayy/g2w 1.0.0 → 1.0.2
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 +5 -21
- package/lib/install.js +7 -25
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ This is not a workflow system. Not a task runner. This is a protocol for buildin
|
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
-
[](https://www.npmjs.com/package/@only1btayy/g2w)
|
|
20
20
|
[](LICENSE)
|
|
21
21
|
[](https://claude.ai/code)
|
|
22
22
|
[]()
|
|
@@ -24,7 +24,7 @@ This is not a workflow system. Not a task runner. This is a protocol for buildin
|
|
|
24
24
|
---
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
npm install -g g2w
|
|
27
|
+
npm install -g @only1btayy/g2w
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
```bash
|
|
@@ -32,10 +32,7 @@ g2w install
|
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
```
|
|
35
|
-
|
|
36
|
-
2. Local ./.claude/ this project only
|
|
37
|
-
|
|
38
|
-
✅ G2W installed — 9 skills + hooks ready.
|
|
35
|
+
✅ G2W installed at ~/.claude/ — 9 skills + hooks ready.
|
|
39
36
|
```
|
|
40
37
|
|
|
41
38
|
**Works on Mac, Windows, and Linux.**
|
|
@@ -152,23 +149,10 @@ Safe git operations — add, commit, push, status, log — run without approval
|
|
|
152
149
|
## How 2 Install
|
|
153
150
|
|
|
154
151
|
```bash
|
|
155
|
-
npm install -g g2w
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
Then `cd` into your project and run:
|
|
159
|
-
|
|
160
|
-
```bash
|
|
161
|
-
g2w install
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
You'll be asked:
|
|
165
|
-
|
|
166
|
-
```
|
|
167
|
-
1. Global ~/.claude/ available in all projects
|
|
168
|
-
2. Local ./.claude/ this project only
|
|
152
|
+
npm install -g @only1btayy/g2w
|
|
169
153
|
```
|
|
170
154
|
|
|
171
|
-
|
|
155
|
+
That's it. G2W installs globally into `~/.claude/` automatically — skills and hooks ready in every project, everywhere.
|
|
172
156
|
|
|
173
157
|
> **Tip:** The logo renders in **bright green** in any terminal. On Windows Terminal or iTerm2, enable Retro/Bloom effects for the full glow.
|
|
174
158
|
|
package/lib/install.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
const fs = require('fs');
|
|
2
2
|
const path = require('path');
|
|
3
3
|
const os = require('os');
|
|
4
|
-
const readline = require('readline');
|
|
5
|
-
|
|
6
4
|
const SKILLS_SRC = path.join(__dirname, '../skills');
|
|
7
5
|
|
|
8
6
|
const G2W_HOOKS = {
|
|
@@ -30,11 +28,6 @@ const G2W_HOOKS = {
|
|
|
30
28
|
]
|
|
31
29
|
};
|
|
32
30
|
|
|
33
|
-
function prompt(question) {
|
|
34
|
-
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
35
|
-
return new Promise(resolve => rl.question(question, answer => { rl.close(); resolve(answer.trim()); }));
|
|
36
|
-
}
|
|
37
|
-
|
|
38
31
|
function copySkills(targetBase) {
|
|
39
32
|
const dest = path.join(targetBase, '.claude', 'skills', 'g2w');
|
|
40
33
|
fs.mkdirSync(dest, { recursive: true });
|
|
@@ -110,25 +103,12 @@ function removeHooks(targetBase) {
|
|
|
110
103
|
fs.writeFileSync(settingsPath, JSON.stringify(existing, null, 2));
|
|
111
104
|
}
|
|
112
105
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
G2W — Install
|
|
116
|
-
|
|
117
|
-
Where should G2W be installed?
|
|
118
|
-
|
|
119
|
-
1. Global ~/.claude/ available in all projects
|
|
120
|
-
2. Local ./.claude/ this project only
|
|
121
|
-
|
|
122
|
-
`);
|
|
123
|
-
const answer = await prompt('Enter 1 or 2: ');
|
|
124
|
-
if (answer === '1') return { base: os.homedir(), label: '~/.claude/' };
|
|
125
|
-
if (answer === '2') return { base: process.cwd(), label: `./.claude/` };
|
|
126
|
-
console.log('Invalid choice. Please enter 1 or 2.');
|
|
127
|
-
return getTarget();
|
|
106
|
+
function getTarget() {
|
|
107
|
+
return { base: os.homedir(), label: '~/.claude/' };
|
|
128
108
|
}
|
|
129
109
|
|
|
130
110
|
async function run() {
|
|
131
|
-
const { base, label } =
|
|
111
|
+
const { base, label } = getTarget();
|
|
132
112
|
const { dest, count } = copySkills(base);
|
|
133
113
|
const settingsPath = mergeHooks(base);
|
|
134
114
|
|
|
@@ -146,13 +126,13 @@ Open any project with Claude Code and type:
|
|
|
146
126
|
}
|
|
147
127
|
|
|
148
128
|
async function update() {
|
|
149
|
-
const { base, label } =
|
|
129
|
+
const { base, label } = getTarget();
|
|
150
130
|
copySkills(base);
|
|
151
131
|
console.log(`\n✅ G2W skills updated at ${label}\n`);
|
|
152
132
|
}
|
|
153
133
|
|
|
154
134
|
async function uninstall() {
|
|
155
|
-
const { base, label } =
|
|
135
|
+
const { base, label } = getTarget();
|
|
156
136
|
const removed = removeSkills(base);
|
|
157
137
|
removeHooks(base);
|
|
158
138
|
|
|
@@ -164,3 +144,5 @@ async function uninstall() {
|
|
|
164
144
|
}
|
|
165
145
|
|
|
166
146
|
module.exports = { run, update, uninstall };
|
|
147
|
+
|
|
148
|
+
if (require.main === module) run();
|
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@only1btayy/g2w",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "G2W — a relationship protocol for building trust with AI",
|
|
5
5
|
"bin": {
|
|
6
6
|
"g2w": "bin/g2w.js"
|
|
7
7
|
},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"postinstall": "node lib/install.js"
|
|
10
|
+
},
|
|
8
11
|
"files": [
|
|
9
12
|
"bin/",
|
|
10
13
|
"lib/",
|