@atollhq/skill-gemini 0.1.6 → 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 +6 -5
- package/bin/install.mjs +30 -16
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -7,16 +7,17 @@ Gives your Gemini agent the ability to manage tasks, goals, KPIs, initiatives, m
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npx @atollhq/skill-gemini --key sk_atoll_... --org your-org-
|
|
10
|
+
npx @atollhq/skill-gemini --key sk_atoll_... --org your-org-id
|
|
11
11
|
```
|
|
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'
|
|
@@ -19,16 +19,17 @@ function parseArgs(argv) {
|
|
|
19
19
|
|
|
20
20
|
function printUsage() {
|
|
21
21
|
console.log(`
|
|
22
|
-
Usage: npx @atollhq/skill-gemini --key <api-key> --org <org-
|
|
22
|
+
Usage: npx @atollhq/skill-gemini --key <api-key> --org <org-id>
|
|
23
23
|
|
|
24
24
|
Options:
|
|
25
25
|
--key Atoll API key (sk_atoll_...)
|
|
26
|
-
--org Organization
|
|
26
|
+
--org Organization ID
|
|
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
|
-
- Sets ATOLL_API_KEY and
|
|
32
|
+
- Sets ATOLL_API_KEY and ATOLL_ORG_ID env vars
|
|
32
33
|
`)
|
|
33
34
|
}
|
|
34
35
|
|
|
@@ -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
|
|
|
@@ -62,7 +69,7 @@ ${body}
|
|
|
62
69
|
## Credentials
|
|
63
70
|
|
|
64
71
|
- API Key: set as ATOLL_API_KEY environment variable
|
|
65
|
-
- Org: ${args.org}
|
|
72
|
+
- Org ID: ${args.org}
|
|
66
73
|
`
|
|
67
74
|
|
|
68
75
|
const geminiPath = join(geminiDir, 'GEMINI.md')
|
|
@@ -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,25 +94,32 @@ 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')
|
|
94
101
|
: join(homedir(), '.bashrc')
|
|
95
102
|
|
|
96
|
-
|
|
103
|
+
function upsertExport(profile, name, value) {
|
|
104
|
+
const line = `export ${name}="${value}"`
|
|
105
|
+
const pattern = new RegExp(`^export ${name}=.*$`, 'm')
|
|
106
|
+
if (pattern.test(profile)) return profile.replace(pattern, line)
|
|
107
|
+
return `${profile.trimEnd()}\n${line}\n`
|
|
108
|
+
}
|
|
97
109
|
|
|
98
110
|
if (existsSync(profilePath)) {
|
|
99
|
-
|
|
100
|
-
if (profile.includes('
|
|
101
|
-
|
|
102
|
-
} else {
|
|
103
|
-
writeFileSync(profilePath, profile.trimEnd() + '\n' + envBlock)
|
|
104
|
-
console.log(`Added ATOLL_API_KEY and ATOLL_ORG_SLUG to ${profilePath}`)
|
|
111
|
+
let profile = readFileSync(profilePath, 'utf-8')
|
|
112
|
+
if (!profile.includes('# Atoll (added by @atollhq/skill-gemini)')) {
|
|
113
|
+
profile = `${profile.trimEnd()}\n\n# Atoll (added by @atollhq/skill-gemini)\n`
|
|
105
114
|
}
|
|
115
|
+
profile = upsertExport(profile, 'ATOLL_API_KEY', args.key)
|
|
116
|
+
profile = upsertExport(profile, 'ATOLL_ORG_ID', args.org)
|
|
117
|
+
writeFileSync(profilePath, profile)
|
|
118
|
+
console.log(`Configured ATOLL_API_KEY and ATOLL_ORG_ID in ${profilePath}`)
|
|
106
119
|
} else {
|
|
120
|
+
const envBlock = `\n# Atoll (added by @atollhq/skill-gemini)\nexport ATOLL_API_KEY="${args.key}"\nexport ATOLL_ORG_ID="${args.org}"\n`
|
|
107
121
|
writeFileSync(profilePath, envBlock)
|
|
108
|
-
console.log(`Created ${profilePath} with ATOLL_API_KEY and
|
|
122
|
+
console.log(`Created ${profilePath} with ATOLL_API_KEY and ATOLL_ORG_ID`)
|
|
109
123
|
}
|
|
110
124
|
|
|
111
125
|
console.log(`\nDone! Restart your shell, then Gemini CLI will have access to the Atoll API.`)
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atollhq/skill-gemini",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Install the Atoll project management integration for Gemini CLI",
|
|
5
5
|
"bin": {
|
|
6
|
-
"skill-gemini": "
|
|
6
|
+
"skill-gemini": "bin/install.mjs"
|
|
7
7
|
},
|
|
8
8
|
"files": [
|
|
9
9
|
"bin/",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
],
|
|
19
19
|
"repository": {
|
|
20
20
|
"type": "git",
|
|
21
|
-
"url": "https://github.com/atollhq/atoll.git",
|
|
21
|
+
"url": "git+https://github.com/atollhq/atoll.git",
|
|
22
22
|
"directory": "packages/skill-gemini"
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|