@atollhq/skill-codex 0.1.7 → 0.1.9

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 CHANGED
@@ -8,15 +8,18 @@ Gives your Codex agent the ability to manage tasks, goals, KPIs, initiatives, mi
8
8
 
9
9
  ```bash
10
10
  npx @atollhq/skill-codex --key sk_atoll_... --org your-org-id
11
+ # or
12
+ ATOLL_API_KEY=sk_atoll_... ATOLL_ORG_ID=your-org-id npx @atollhq/skill-codex
11
13
  ```
12
14
 
13
15
  Get an API key from **Settings > Members > Add Agent** (or **Create API Key** for integrations) in the Atoll app.
14
16
 
15
- This does three things:
17
+ This does four things:
16
18
 
17
- 1. Appends (or updates) an `# Atoll Integration` section in `~/.codex/AGENTS.md`
18
- 2. Copies API reference files to `~/.codex/atoll-references/`
19
- 3. Appends `ATOLL_API_KEY` and `ATOLL_ORG_ID` exports to your shell profile (`~/.zshrc` or `~/.bashrc`)
19
+ 1. Installs the `atoll-api` skill to `~/.codex/skills/atoll-api/`
20
+ 2. Appends (or updates) an `# Atoll Integration` section in `~/.codex/AGENTS.md`
21
+ 3. Copies API reference files to `~/.codex/atoll-references/`
22
+ 4. Appends `ATOLL_API_KEY` and `ATOLL_ORG_ID` exports to your shell profile (`~/.zshrc` or `~/.bashrc`)
20
23
 
21
24
  Open a fresh shell (or `source` your profile) and Codex has the Atoll integration.
22
25
 
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'
@@ -20,24 +20,28 @@ function parseArgs(argv) {
20
20
  function printUsage() {
21
21
  console.log(`
22
22
  Usage: npx @atollhq/skill-codex --key <api-key> --org <org-id>
23
+ or: ATOLL_API_KEY=<api-key> ATOLL_ORG_ID=<org-id> npx @atollhq/skill-codex
23
24
 
24
25
  Options:
25
- --key Atoll API key (sk_atoll_...)
26
- --org Organization ID
26
+ --key Atoll API key (sk_atoll_...). Defaults to ATOLL_API_KEY.
27
+ --org Organization ID. Defaults to ATOLL_ORG_ID.
27
28
  --help Show this help message
28
29
 
29
30
  Installs the Atoll integration for Codex CLI:
31
+ - Installs the atoll-api skill to ~/.codex/skills/atoll-api/
30
32
  - Writes AGENTS.md with API reference to ~/.codex/
31
33
  - Sets ATOLL_API_KEY and ATOLL_ORG_ID env vars
32
34
  `)
33
35
  }
34
36
 
35
37
  const args = parseArgs(process.argv)
38
+ args.key ??= process.env.ATOLL_API_KEY
39
+ args.org ??= process.env.ATOLL_ORG_ID
36
40
 
37
41
  if (args.help) { printUsage(); process.exit(0) }
38
42
 
39
43
  if (!args.key || !args.org) {
40
- console.error('Error: --key and --org are required\n')
44
+ console.error('Error: provide --key and --org, or set ATOLL_API_KEY and ATOLL_ORG_ID\n')
41
45
  printUsage()
42
46
  process.exit(1)
43
47
  }
@@ -47,11 +51,17 @@ if (!args.key.startsWith('sk_atoll_')) {
47
51
  process.exit(1)
48
52
  }
49
53
 
50
- // 1. Write AGENTS.md to ~/.codex/
54
+ // 1. Install the Codex skill to ~/.codex/skills/atoll-api/
51
55
  const codexDir = join(homedir(), '.codex')
52
56
  mkdirSync(codexDir, { recursive: true })
53
57
 
54
58
  const skillDir = join(__dirname, '..', 'skill')
59
+ const skillDest = join(codexDir, 'skills', 'atoll-api')
60
+ mkdirSync(skillDest, { recursive: true })
61
+ cpSync(skillDir, skillDest, { recursive: true })
62
+ console.log(`Installed Atoll skill to ${skillDest}`)
63
+
64
+ // 2. Write AGENTS.md to ~/.codex/
55
65
  const skillMd = readFileSync(join(skillDir, 'SKILL.md'), 'utf-8')
56
66
  // Strip YAML frontmatter for AGENTS.md
57
67
  const body = skillMd.replace(/^---[\s\S]*?---\n*/, '')
@@ -82,7 +92,7 @@ if (existsSync(agentsPath)) {
82
92
  }
83
93
  console.log(`Wrote Atoll instructions to ${agentsPath}`)
84
94
 
85
- // 2. Copy reference files
95
+ // 3. Copy reference files for compatibility with older installs
86
96
  const refsDir = join(codexDir, 'atoll-references')
87
97
  mkdirSync(refsDir, { recursive: true })
88
98
  for (const file of ['api-endpoints.md', 'api-fields.md']) {
@@ -90,7 +100,7 @@ for (const file of ['api-endpoints.md', 'api-fields.md']) {
90
100
  }
91
101
  console.log(`Copied API references to ${refsDir}`)
92
102
 
93
- // 3. Set env vars in shell profile
103
+ // 4. Set env vars in shell profile
94
104
  const shell = process.env.SHELL || '/bin/bash'
95
105
  const profilePath = shell.includes('zsh')
96
106
  ? join(homedir(), '.zshrc')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atollhq/skill-codex",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "Install the Atoll project management integration for Codex CLI",
5
5
  "bin": {
6
6
  "skill-codex": "bin/install.mjs"