@webdeb/gogi 1.0.0 ā 1.0.1
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 +13 -14
- package/dist/auth.js +17 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,28 +6,27 @@ Unlike other CLI assistants that require you to manage your own paid API keys, G
|
|
|
6
6
|
|
|
7
7
|
## ⨠Features
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
**Natural Language to Shell**: Tell Gogi what you want to do
|
|
10
|
+
`gogi how much space is left on my machine`
|
|
11
|
+
|
|
12
|
+
**Safe Execution Loop**: Gogi intercepts the AI's proposed commands and explicitly asks for your permission (`Allow? (y/N)`) before running anything. It will capture the `stdout` and `stderr` and feed it back to the LLM so it can learn from mistakes or chain commands together.
|
|
13
|
+
|
|
14
|
+
**Multi-Provider OAuth**: Sign in securely using your existing AI accounts. Supported providers include:
|
|
12
15
|
- `codex` (ChatGPT Plus/Pro subscription)
|
|
13
16
|
- `gemini` (Google Cloud)
|
|
14
17
|
- `github` (GitHub Copilot)
|
|
15
|
-
|
|
18
|
+
|
|
19
|
+
**Auto-Generated System Context**: On first run, Gogi automatically profiles your machine (OS, architecture, shell) and generates a `~/.gogi/system.md` file. It injects this into the LLM's system prompt so the AI always knows what operating system and shell it's working with.
|
|
16
20
|
|
|
17
21
|
---
|
|
18
22
|
|
|
19
23
|
## š Installation
|
|
20
24
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
3. Build the TypeScript source and link it globally:
|
|
27
|
-
```bash
|
|
28
|
-
npm run build
|
|
29
|
-
npm link
|
|
30
|
-
```
|
|
25
|
+
Install the package globally via npm:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm install -g @webdeb/gogi
|
|
29
|
+
```
|
|
31
30
|
|
|
32
31
|
You can now use the `gogi` command from anywhere in your terminal!
|
|
33
32
|
|
package/dist/auth.js
CHANGED
|
@@ -50,11 +50,20 @@ async function loginFlow(provider = 'codex') {
|
|
|
50
50
|
console.log(`\nš Opening browser for sign-in... If it doesn't open automatically, visit:\n${info.url}`);
|
|
51
51
|
if (info.instructions)
|
|
52
52
|
console.log(info.instructions);
|
|
53
|
+
console.log(`\nIf you are on a headless machine or the browser doesn't redirect back:`);
|
|
54
|
+
console.log(`1. Open the URL above in any browser`);
|
|
55
|
+
console.log(`2. Complete the sign-in process`);
|
|
56
|
+
console.log(`3. Copy the URL you are redirected to (it will start with http://localhost...)`);
|
|
57
|
+
console.log(`4. Paste it here:`);
|
|
53
58
|
(0, open_1.default)(info.url);
|
|
54
59
|
},
|
|
55
60
|
onPrompt: async (prompt) => {
|
|
56
61
|
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
57
62
|
return new Promise((resolve) => rl.question(`${prompt.message} `, (answer) => { rl.close(); resolve(answer); }));
|
|
63
|
+
},
|
|
64
|
+
onManualCodeInput: async () => {
|
|
65
|
+
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
66
|
+
return new Promise((resolve) => rl.question(`> `, (answer) => { rl.close(); resolve(answer); }));
|
|
58
67
|
}
|
|
59
68
|
});
|
|
60
69
|
}
|
|
@@ -63,7 +72,15 @@ async function loginFlow(provider = 'codex') {
|
|
|
63
72
|
console.log(`\nš Opening browser for sign-in... If it doesn't open automatically, visit:\n${info.url}`);
|
|
64
73
|
if (info.instructions)
|
|
65
74
|
console.log(info.instructions);
|
|
75
|
+
console.log(`\nIf you are on a headless machine or the browser doesn't redirect back:`);
|
|
76
|
+
console.log(`1. Open the URL above in any browser`);
|
|
77
|
+
console.log(`2. Complete the sign-in process`);
|
|
78
|
+
console.log(`3. Copy the URL you are redirected to (it will start with http://localhost...)`);
|
|
79
|
+
console.log(`4. Paste it here:`);
|
|
66
80
|
(0, open_1.default)(info.url);
|
|
81
|
+
}, undefined, async () => {
|
|
82
|
+
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
83
|
+
return new Promise((resolve) => rl.question(`> `, (answer) => { rl.close(); resolve(answer); }));
|
|
67
84
|
});
|
|
68
85
|
}
|
|
69
86
|
else if (provider === 'github') {
|