@atollhq/skill-gemini 0.1.7 → 0.1.8
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 -4
- package/bin/install.mjs +11 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,11 +12,12 @@ npx @atollhq/skill-gemini --key sk_atoll_... --org your-org-id
|
|
|
12
12
|
|
|
13
13
|
Get an API key from **Settings > Members > Add Agent** (or **Create API Key** for integrations) in the Atoll app.
|
|
14
14
|
|
|
15
|
-
This does
|
|
15
|
+
This does four things:
|
|
16
16
|
|
|
17
|
-
1.
|
|
18
|
-
2.
|
|
19
|
-
3.
|
|
17
|
+
1. Installs the `atoll-api` skill to `~/.gemini/skills/atoll-api/`
|
|
18
|
+
2. Appends (or updates) an `# Atoll Integration` section in `~/.gemini/GEMINI.md`
|
|
19
|
+
3. Copies API reference files to `~/.gemini/atoll-references/`
|
|
20
|
+
4. Appends `ATOLL_API_KEY` and `ATOLL_ORG_ID` exports to your shell profile (`~/.zshrc` or `~/.bashrc`)
|
|
20
21
|
|
|
21
22
|
Open a fresh shell (or `source` your profile) and Gemini has the Atoll integration.
|
|
22
23
|
|
package/bin/install.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { existsSync, mkdirSync, readFileSync, writeFileSync, copyFileSync } from 'node:fs'
|
|
3
|
+
import { cpSync, existsSync, mkdirSync, readFileSync, writeFileSync, copyFileSync } from 'node:fs'
|
|
4
4
|
import { join, dirname } from 'node:path'
|
|
5
5
|
import { homedir } from 'node:os'
|
|
6
6
|
import { fileURLToPath } from 'node:url'
|
|
@@ -27,6 +27,7 @@ Options:
|
|
|
27
27
|
--help Show this help message
|
|
28
28
|
|
|
29
29
|
Installs the Atoll integration for Gemini CLI:
|
|
30
|
+
- Installs the atoll-api skill to ~/.gemini/skills/atoll-api/
|
|
30
31
|
- Writes GEMINI.md with API reference to ~/.gemini/
|
|
31
32
|
- Sets ATOLL_API_KEY and ATOLL_ORG_ID env vars
|
|
32
33
|
`)
|
|
@@ -47,11 +48,17 @@ if (!args.key.startsWith('sk_atoll_')) {
|
|
|
47
48
|
process.exit(1)
|
|
48
49
|
}
|
|
49
50
|
|
|
50
|
-
// 1.
|
|
51
|
+
// 1. Install the Gemini skill to ~/.gemini/skills/atoll-api/
|
|
51
52
|
const geminiDir = join(homedir(), '.gemini')
|
|
52
53
|
mkdirSync(geminiDir, { recursive: true })
|
|
53
54
|
|
|
54
55
|
const skillDir = join(__dirname, '..', 'skill')
|
|
56
|
+
const skillDest = join(geminiDir, 'skills', 'atoll-api')
|
|
57
|
+
mkdirSync(skillDest, { recursive: true })
|
|
58
|
+
cpSync(skillDir, skillDest, { recursive: true })
|
|
59
|
+
console.log(`Installed Atoll skill to ${skillDest}`)
|
|
60
|
+
|
|
61
|
+
// 2. Write GEMINI.md to ~/.gemini/
|
|
55
62
|
const skillMd = readFileSync(join(skillDir, 'SKILL.md'), 'utf-8')
|
|
56
63
|
const body = skillMd.replace(/^---[\s\S]*?---\n*/, '')
|
|
57
64
|
|
|
@@ -79,7 +86,7 @@ if (existsSync(geminiPath)) {
|
|
|
79
86
|
}
|
|
80
87
|
console.log(`Wrote Atoll instructions to ${geminiPath}`)
|
|
81
88
|
|
|
82
|
-
//
|
|
89
|
+
// 3. Copy reference files for compatibility with older installs
|
|
83
90
|
const refsDir = join(geminiDir, 'atoll-references')
|
|
84
91
|
mkdirSync(refsDir, { recursive: true })
|
|
85
92
|
for (const file of ['api-endpoints.md', 'api-fields.md']) {
|
|
@@ -87,7 +94,7 @@ for (const file of ['api-endpoints.md', 'api-fields.md']) {
|
|
|
87
94
|
}
|
|
88
95
|
console.log(`Copied API references to ${refsDir}`)
|
|
89
96
|
|
|
90
|
-
//
|
|
97
|
+
// 4. Set env vars in shell profile
|
|
91
98
|
const shell = process.env.SHELL || '/bin/bash'
|
|
92
99
|
const profilePath = shell.includes('zsh')
|
|
93
100
|
? join(homedir(), '.zshrc')
|