@aicraftalchemy/aca 0.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 +25 -0
- package/cli-wrapper.cjs +30 -0
- package/install.cjs +82 -0
- package/package.json +24 -0
package/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# ACA
|
|
2
|
+
|
|
3
|
+
**ACA — agentic coding CLI. Any model, any provider.** Developed by Aicraftalchemy.
|
|
4
|
+
|
|
5
|
+
Works with Claude, Gemini, OpenAI, NVIDIA, Groq, Cerebras, OpenRouter, and Hugging Face.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
npm install -g @aicraftalchemy/aca
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Run
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
aca
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Set a provider API key with `/login` (or an environment variable), then type your task.
|
|
20
|
+
|
|
21
|
+
Homepage: https://aca.aicraftalchemy.com
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
Inspired by Claude Code · Built by Aicraftalchemy.
|
package/cli-wrapper.cjs
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* ACA launcher. This is the `bin` entry npm links as `aca`. It just execs the
|
|
4
|
+
* compiled binary that install.cjs downloaded into bin/, forwarding all args
|
|
5
|
+
* and stdio, and exits with the binary's exit code.
|
|
6
|
+
*/
|
|
7
|
+
const { spawnSync } = require('node:child_process')
|
|
8
|
+
const path = require('node:path')
|
|
9
|
+
const fs = require('node:fs')
|
|
10
|
+
|
|
11
|
+
const bin = path.join(
|
|
12
|
+
__dirname,
|
|
13
|
+
'bin',
|
|
14
|
+
process.platform === 'win32' ? 'aca.exe' : 'aca',
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
if (!fs.existsSync(bin)) {
|
|
18
|
+
console.error(
|
|
19
|
+
'ACA binary not found. The post-install download may have failed.\n' +
|
|
20
|
+
'Reinstall with: npm install -g @aicraftalchemy/aca',
|
|
21
|
+
)
|
|
22
|
+
process.exit(1)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const result = spawnSync(bin, process.argv.slice(2), { stdio: 'inherit' })
|
|
26
|
+
if (result.error) {
|
|
27
|
+
console.error(`Failed to launch ACA: ${result.error.message}`)
|
|
28
|
+
process.exit(1)
|
|
29
|
+
}
|
|
30
|
+
process.exit(result.status ?? 0)
|
package/install.cjs
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* ACA npm post-install bootstrapper.
|
|
4
|
+
*
|
|
5
|
+
* This is (almost) the only code published to npm. It runs at `npm install`
|
|
6
|
+
* time, detects the platform, downloads the matching compiled ACA binary from
|
|
7
|
+
* the releases host, verifies its SHA-256 against the published manifest, and
|
|
8
|
+
* drops it at bin/aca(.exe). The real application code is inside that binary —
|
|
9
|
+
* it is never published to npm.
|
|
10
|
+
*/
|
|
11
|
+
const https = require('node:https')
|
|
12
|
+
const fs = require('node:fs')
|
|
13
|
+
const path = require('node:path')
|
|
14
|
+
const crypto = require('node:crypto')
|
|
15
|
+
|
|
16
|
+
const pkg = require('./package.json')
|
|
17
|
+
const VERSION = pkg.version
|
|
18
|
+
|
|
19
|
+
// Where the compiled binaries + manifest.json live. Override with the env var
|
|
20
|
+
// at install time if needed. Point this at a PUBLIC releases host that contains
|
|
21
|
+
// ONLY the binaries (keep your source repo private).
|
|
22
|
+
const BASE =
|
|
23
|
+
process.env.ACA_RELEASE_BASE_URL ||
|
|
24
|
+
`https://github.com/lokeshe09/aca-releases/releases/download/v${VERSION}`
|
|
25
|
+
|
|
26
|
+
function platformKey() {
|
|
27
|
+
const p = process.platform
|
|
28
|
+
const a = process.arch
|
|
29
|
+
if (p === 'win32' && a === 'x64') return 'win32-x64'
|
|
30
|
+
if (p === 'darwin') return a === 'arm64' ? 'darwin-arm64' : 'darwin-x64'
|
|
31
|
+
if (p === 'linux') return a === 'arm64' ? 'linux-arm64' : 'linux-x64'
|
|
32
|
+
throw new Error(`Unsupported platform: ${p}/${a}`)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** GET a URL following redirects; resolves to a Buffer. */
|
|
36
|
+
function get(url, redirects = 0) {
|
|
37
|
+
return new Promise((resolve, reject) => {
|
|
38
|
+
if (redirects > 5) return reject(new Error('Too many redirects'))
|
|
39
|
+
https
|
|
40
|
+
.get(url, { headers: { 'User-Agent': 'aca-installer' } }, res => {
|
|
41
|
+
const { statusCode, headers } = res
|
|
42
|
+
if (statusCode >= 300 && statusCode < 400 && headers.location) {
|
|
43
|
+
res.resume()
|
|
44
|
+
return resolve(get(headers.location, redirects + 1))
|
|
45
|
+
}
|
|
46
|
+
if (statusCode !== 200) {
|
|
47
|
+
res.resume()
|
|
48
|
+
return reject(new Error(`HTTP ${statusCode} for ${url}`))
|
|
49
|
+
}
|
|
50
|
+
const chunks = []
|
|
51
|
+
res.on('data', c => chunks.push(c))
|
|
52
|
+
res.on('end', () => resolve(Buffer.concat(chunks)))
|
|
53
|
+
})
|
|
54
|
+
.on('error', reject)
|
|
55
|
+
})
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async function main() {
|
|
59
|
+
const key = platformKey()
|
|
60
|
+
const manifest = JSON.parse((await get(`${BASE}/manifest.json`)).toString('utf8'))
|
|
61
|
+
const info = manifest.platforms && manifest.platforms[key]
|
|
62
|
+
if (!info) throw new Error(`No ACA binary published for ${key} (v${VERSION})`)
|
|
63
|
+
|
|
64
|
+
const bin = await get(`${BASE}/${info.file}`)
|
|
65
|
+
const sha = crypto.createHash('sha256').update(bin).digest('hex')
|
|
66
|
+
if (sha !== info.sha256) {
|
|
67
|
+
throw new Error(`Checksum mismatch for ${key}: expected ${info.sha256}, got ${sha}`)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const binDir = path.join(__dirname, 'bin')
|
|
71
|
+
fs.mkdirSync(binDir, { recursive: true })
|
|
72
|
+
const dest = path.join(binDir, process.platform === 'win32' ? 'aca.exe' : 'aca')
|
|
73
|
+
fs.writeFileSync(dest, bin)
|
|
74
|
+
if (process.platform !== 'win32') fs.chmodSync(dest, 0o755)
|
|
75
|
+
console.log(`ACA ${VERSION} installed for ${key}.`)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
main().catch(err => {
|
|
79
|
+
console.error(`\nACA install failed: ${err.message}`)
|
|
80
|
+
console.error('You can retry with: npm install -g @aicraftalchemy/aca')
|
|
81
|
+
process.exit(1)
|
|
82
|
+
})
|
package/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aicraftalchemy/aca",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "ACA — agentic coding CLI. Any model, any provider (Claude, Gemini, OpenAI, NVIDIA, Groq, Cerebras, OpenRouter, Hugging Face). Developed by Aicraftalchemy.",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"bin": {
|
|
7
|
+
"aca": "cli-wrapper.cjs"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"cli-wrapper.cjs",
|
|
11
|
+
"install.cjs",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"postinstall": "node install.cjs"
|
|
16
|
+
},
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public"
|
|
19
|
+
},
|
|
20
|
+
"homepage": "https://aca.aicraftalchemy.com",
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=18"
|
|
23
|
+
}
|
|
24
|
+
}
|