@atollhq/skill-codex 0.1.6 → 0.1.7
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 +2 -2
- package/bin/install.mjs +19 -12
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Gives your Codex agent the ability to manage tasks, goals, KPIs, initiatives, mi
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npx @atollhq/skill-codex --key sk_atoll_... --org your-org-
|
|
10
|
+
npx @atollhq/skill-codex --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.
|
|
@@ -16,7 +16,7 @@ This does three things:
|
|
|
16
16
|
|
|
17
17
|
1. Appends (or updates) an `# Atoll Integration` section in `~/.codex/AGENTS.md`
|
|
18
18
|
2. Copies API reference files to `~/.codex/atoll-references/`
|
|
19
|
-
3. Appends `ATOLL_API_KEY` and `
|
|
19
|
+
3. Appends `ATOLL_API_KEY` and `ATOLL_ORG_ID` exports to your shell profile (`~/.zshrc` or `~/.bashrc`)
|
|
20
20
|
|
|
21
21
|
Open a fresh shell (or `source` your profile) and Codex has the Atoll integration.
|
|
22
22
|
|
package/bin/install.mjs
CHANGED
|
@@ -19,16 +19,16 @@ function parseArgs(argv) {
|
|
|
19
19
|
|
|
20
20
|
function printUsage() {
|
|
21
21
|
console.log(`
|
|
22
|
-
Usage: npx @atollhq/skill-codex --key <api-key> --org <org-
|
|
22
|
+
Usage: npx @atollhq/skill-codex --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 Codex CLI:
|
|
30
30
|
- Writes AGENTS.md with API reference to ~/.codex/
|
|
31
|
-
- Sets ATOLL_API_KEY and
|
|
31
|
+
- Sets ATOLL_API_KEY and ATOLL_ORG_ID env vars
|
|
32
32
|
`)
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -63,7 +63,7 @@ ${body}
|
|
|
63
63
|
## Credentials
|
|
64
64
|
|
|
65
65
|
- API Key: set as ATOLL_API_KEY environment variable
|
|
66
|
-
- Org: ${args.org}
|
|
66
|
+
- Org ID: ${args.org}
|
|
67
67
|
`
|
|
68
68
|
|
|
69
69
|
const agentsPath = join(codexDir, 'AGENTS.md')
|
|
@@ -96,19 +96,26 @@ const profilePath = shell.includes('zsh')
|
|
|
96
96
|
? join(homedir(), '.zshrc')
|
|
97
97
|
: join(homedir(), '.bashrc')
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
function upsertExport(profile, name, value) {
|
|
100
|
+
const line = `export ${name}="${value}"`
|
|
101
|
+
const pattern = new RegExp(`^export ${name}=.*$`, 'm')
|
|
102
|
+
if (pattern.test(profile)) return profile.replace(pattern, line)
|
|
103
|
+
return `${profile.trimEnd()}\n${line}\n`
|
|
104
|
+
}
|
|
100
105
|
|
|
101
106
|
if (existsSync(profilePath)) {
|
|
102
|
-
|
|
103
|
-
if (profile.includes('
|
|
104
|
-
|
|
105
|
-
} else {
|
|
106
|
-
writeFileSync(profilePath, profile.trimEnd() + '\n' + envBlock)
|
|
107
|
-
console.log(`Added ATOLL_API_KEY and ATOLL_ORG_SLUG to ${profilePath}`)
|
|
107
|
+
let profile = readFileSync(profilePath, 'utf-8')
|
|
108
|
+
if (!profile.includes('# Atoll (added by @atollhq/skill-codex)')) {
|
|
109
|
+
profile = `${profile.trimEnd()}\n\n# Atoll (added by @atollhq/skill-codex)\n`
|
|
108
110
|
}
|
|
111
|
+
profile = upsertExport(profile, 'ATOLL_API_KEY', args.key)
|
|
112
|
+
profile = upsertExport(profile, 'ATOLL_ORG_ID', args.org)
|
|
113
|
+
writeFileSync(profilePath, profile)
|
|
114
|
+
console.log(`Configured ATOLL_API_KEY and ATOLL_ORG_ID in ${profilePath}`)
|
|
109
115
|
} else {
|
|
116
|
+
const envBlock = `\n# Atoll (added by @atollhq/skill-codex)\nexport ATOLL_API_KEY="${args.key}"\nexport ATOLL_ORG_ID="${args.org}"\n`
|
|
110
117
|
writeFileSync(profilePath, envBlock)
|
|
111
|
-
console.log(`Created ${profilePath} with ATOLL_API_KEY and
|
|
118
|
+
console.log(`Created ${profilePath} with ATOLL_API_KEY and ATOLL_ORG_ID`)
|
|
112
119
|
}
|
|
113
120
|
|
|
114
121
|
console.log(`\nDone! Restart your shell, then Codex will have access to the Atoll API.`)
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atollhq/skill-codex",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Install the Atoll project management integration for Codex CLI",
|
|
5
5
|
"bin": {
|
|
6
|
-
"skill-codex": "
|
|
6
|
+
"skill-codex": "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-codex"
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|