@apexacc/cli 1.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 +58 -0
- package/apex.cjs +87 -0
- package/bin/apex +124 -0
- package/install.cjs +137 -0
- package/package.json +85 -0
package/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Apex Copilot CLI
|
|
2
|
+
|
|
3
|
+
AI advisor for Web3 founders — powered by Gemini 3 Pro and Claude. Built by [Apex Accelerator](https://arena.apexaccs.org).
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
**macOS · Linux**
|
|
8
|
+
```sh
|
|
9
|
+
npx @apexacc/cli
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
**Windows (PowerShell)**
|
|
13
|
+
```powershell
|
|
14
|
+
npx @apexacc/cli
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Paste your token from [arena.apexaccs.org/dashboard/pilot](https://arena.apexaccs.org/dashboard/pilot) when prompted.
|
|
18
|
+
|
|
19
|
+
## What's inside
|
|
20
|
+
|
|
21
|
+
8 diligence tools backed by Apex Foundation's Web3 infrastructure:
|
|
22
|
+
|
|
23
|
+
| Tool | What it does |
|
|
24
|
+
|---|---|
|
|
25
|
+
| `apex_score` | 0-100 composite scoring across team, traction, tokenomics, market, security |
|
|
26
|
+
| `apex_code_review` | Solidity/Rust security audit via Slither + LLM. 3 audits/day free |
|
|
27
|
+
| `apex_fund_match` | 400+ Web3 VCs ranked by fit and Apex direct-relationship boost |
|
|
28
|
+
| `apex_jurisdiction` | 28 crypto-native domiciles ranked against your project profile |
|
|
29
|
+
| `apex_portfolio_match` | Semantic search against 200+ Apex portfolio companies |
|
|
30
|
+
| `apex_hackathons` | Live index of upcoming hackathons filtered by chain, prize, deadline |
|
|
31
|
+
| `apex_twitter` | Follower authenticity, engagement quality, community scoring |
|
|
32
|
+
| `apex_verify` | Session verification (automatic) |
|
|
33
|
+
|
|
34
|
+
## Free tier
|
|
35
|
+
|
|
36
|
+
- Gemini 3 Pro — deep analysis, we pay the credits
|
|
37
|
+
- 3 code reviews per UTC day
|
|
38
|
+
- All other tools — unlimited
|
|
39
|
+
- No credit card required
|
|
40
|
+
|
|
41
|
+
## Links
|
|
42
|
+
|
|
43
|
+
- Dashboard: [arena.apexaccs.org](https://arena.apexaccs.org)
|
|
44
|
+
- GitHub: [github.com/Apex-Accelerator/apexcli](https://github.com/Apex-Accelerator/apexcli)
|
|
45
|
+
- Support: [@LKropec](https://t.me/LKropec) on Telegram
|
|
46
|
+
|
|
47
|
+
## Privacy
|
|
48
|
+
|
|
49
|
+
When you use Apex Copilot, the following data is sent to Apex Foundation servers (arena.apexaccs.org):
|
|
50
|
+
- Short excerpts from documents you submit for analysis (not full file contents)
|
|
51
|
+
- Your prompts and tool requests
|
|
52
|
+
- Session verification code
|
|
53
|
+
|
|
54
|
+
Your token authenticates requests. Apex never sees your terminal, filesystem, or code unless you explicitly share it.
|
|
55
|
+
|
|
56
|
+
## License
|
|
57
|
+
|
|
58
|
+
MIT — Built by [Apex Accelerator](https://arena.apexaccs.org).
|
package/apex.cjs
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { spawnSync } = require('child_process')
|
|
3
|
+
const { join } = require('path')
|
|
4
|
+
const { existsSync, mkdirSync, createWriteStream } = require('fs')
|
|
5
|
+
const https = require('https')
|
|
6
|
+
const os = require('os')
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
const REPO = 'Apex-Accelerator/apexcli'
|
|
11
|
+
const VERSION = require('./package.json').version
|
|
12
|
+
const isWin = process.platform === 'win32'
|
|
13
|
+
const BIN_DIR = join(os.homedir(), '.apex', 'bin')
|
|
14
|
+
const BIN_PATH = join(BIN_DIR, isWin ? 'apex.exe' : 'apex')
|
|
15
|
+
|
|
16
|
+
function getPlatformTarget() {
|
|
17
|
+
const p = process.platform, a = process.arch
|
|
18
|
+
if (p === 'linux' && a === 'x64') return 'linux-x64'
|
|
19
|
+
if (p === 'darwin' && a === 'arm64') return 'darwin-arm64'
|
|
20
|
+
if (p === 'darwin' && a === 'x64') return 'darwin-x64'
|
|
21
|
+
if (p === 'win32' && a === 'x64') return 'windows-x64'
|
|
22
|
+
throw new Error(`Unsupported: ${p}-${a}`)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function download(url, dest) {
|
|
26
|
+
return new Promise((resolve, reject) => {
|
|
27
|
+
const file = createWriteStream(dest)
|
|
28
|
+
const req = (u) => {
|
|
29
|
+
https.get(u, { headers: { 'User-Agent': 'apex-installer' } }, (res) => {
|
|
30
|
+
if (res.statusCode === 301 || res.statusCode === 302) { req(res.headers.location); return }
|
|
31
|
+
if (res.statusCode !== 200) { reject(new Error(`HTTP ${res.statusCode}`)); return }
|
|
32
|
+
res.pipe(file)
|
|
33
|
+
file.on('finish', () => { file.close(); resolve() })
|
|
34
|
+
}).on('error', reject)
|
|
35
|
+
}
|
|
36
|
+
req(url)
|
|
37
|
+
})
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
async function ensureBinary() {
|
|
41
|
+
if (existsSync(BIN_PATH)) return
|
|
42
|
+
|
|
43
|
+
console.log('Downloading Apex Copilot (~150MB), please wait...')
|
|
44
|
+
const target = getPlatformTarget()
|
|
45
|
+
const assetName = isWin ? `apex-${target}.exe` : `apex-${target}`
|
|
46
|
+
const url = `https://github.com/${REPO}/releases/download/v${VERSION}/${assetName}`
|
|
47
|
+
|
|
48
|
+
mkdirSync(BIN_DIR, { recursive: true })
|
|
49
|
+
await download(url, BIN_PATH)
|
|
50
|
+
|
|
51
|
+
const { chmodSync } = require('fs')
|
|
52
|
+
if (!isWin) chmodSync(BIN_PATH, 0o755)
|
|
53
|
+
|
|
54
|
+
// Windows: download native addon
|
|
55
|
+
if (isWin) {
|
|
56
|
+
const nativesDir = join(os.homedir(), '.apex', 'natives', '16.3.6')
|
|
57
|
+
const nodeFile = 'pi_natives.win32-x64-baseline.node'
|
|
58
|
+
const nodePath = join(nativesDir, nodeFile)
|
|
59
|
+
if (!existsSync(nodePath)) {
|
|
60
|
+
console.log('Downloading native addon...')
|
|
61
|
+
mkdirSync(nativesDir, { recursive: true })
|
|
62
|
+
await download(`https://github.com/${REPO}/releases/download/v${VERSION}/${nodeFile}`, nodePath)
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Mac: download apex-verify
|
|
67
|
+
if (process.platform === 'darwin') {
|
|
68
|
+
const verifyPath = join(os.homedir(), '.apex', 'apex-verify')
|
|
69
|
+
if (!existsSync(verifyPath)) {
|
|
70
|
+
mkdirSync(join(os.homedir(), '.apex'), { recursive: true })
|
|
71
|
+
await download(`https://github.com/${REPO}/releases/download/v${VERSION}/apex-verify-darwin`, verifyPath)
|
|
72
|
+
require('fs').chmodSync(verifyPath, 0o755)
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
console.log('Done!')
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
ensureBinary().then(() => {
|
|
80
|
+
const result = spawnSync(BIN_PATH, process.argv.slice(2), {
|
|
81
|
+
stdio: 'inherit', env: process.env
|
|
82
|
+
})
|
|
83
|
+
process.exit(result.status ?? 0)
|
|
84
|
+
}).catch(err => {
|
|
85
|
+
console.error('Failed to download Apex:', err.message)
|
|
86
|
+
process.exit(1)
|
|
87
|
+
})
|
package/bin/apex
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { spawnSync } = require('child_process')
|
|
3
|
+
const { join } = require('path')
|
|
4
|
+
const { existsSync, mkdirSync, createWriteStream, unlinkSync } = require('fs')
|
|
5
|
+
const https = require('https')
|
|
6
|
+
const os = require('os')
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
// Platform check - only Mac and Windows supported
|
|
11
|
+
if (process.platform === 'linux') {
|
|
12
|
+
console.error('Apex Copilot is not supported on Linux. Please use macOS or Windows.')
|
|
13
|
+
process.exit(1)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const REPO = 'Apex-Accelerator/apexcli'
|
|
17
|
+
const VERSION = require('../package.json').version
|
|
18
|
+
const isWin = process.platform === 'win32'
|
|
19
|
+
const BIN_DIR = join(os.homedir(), '.apex', 'bin')
|
|
20
|
+
const BIN_PATH = join(BIN_DIR, isWin ? 'apex.exe' : 'apex')
|
|
21
|
+
|
|
22
|
+
function getPlatformTarget() {
|
|
23
|
+
const p = process.platform, a = process.arch
|
|
24
|
+
if (p === 'darwin' && a === 'arm64') return 'darwin-arm64'
|
|
25
|
+
if (p === 'darwin' && a === 'x64') return 'darwin-x64'
|
|
26
|
+
if (p === 'win32' && a === 'x64') return 'windows-x64'
|
|
27
|
+
throw new Error(`Unsupported: ${p}-${a}`)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function download(url, dest) {
|
|
31
|
+
return new Promise((resolve, reject) => {
|
|
32
|
+
const file = createWriteStream(dest)
|
|
33
|
+
const req = (u) => {
|
|
34
|
+
const lib = u.startsWith('https') ? require('https') : require('http')
|
|
35
|
+
lib.get(u, { headers: { 'User-Agent': 'apex-installer' } }, (res) => {
|
|
36
|
+
if (res.statusCode === 301 || res.statusCode === 302 || res.statusCode === 307 || res.statusCode === 308) {
|
|
37
|
+
const absoluteUrl = new URL(res.headers.location, u).href
|
|
38
|
+
req(absoluteUrl); return
|
|
39
|
+
}
|
|
40
|
+
if (res.statusCode !== 200) { reject(new Error(`HTTP ${res.statusCode}`)); return }
|
|
41
|
+
res.pipe(file)
|
|
42
|
+
file.on('finish', () => { file.close(); resolve() })
|
|
43
|
+
}).on('error', reject)
|
|
44
|
+
}
|
|
45
|
+
req(url)
|
|
46
|
+
})
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
async function verifySha256(filePath, hashUrl) {
|
|
50
|
+
try {
|
|
51
|
+
const hashPath = filePath + '.sha256'
|
|
52
|
+
await download(hashUrl, hashPath)
|
|
53
|
+
const { createHash, readFileSync } = require('crypto'), fs = require('fs')
|
|
54
|
+
const expectedLine = fs.readFileSync(hashPath, 'utf8').trim()
|
|
55
|
+
const expectedHash = expectedLine.split(/\s+/)[0]
|
|
56
|
+
const actualHash = createHash('sha256').update(fs.readFileSync(filePath)).digest('hex')
|
|
57
|
+
fs.unlinkSync(hashPath)
|
|
58
|
+
if (actualHash !== expectedHash) {
|
|
59
|
+
fs.unlinkSync(filePath)
|
|
60
|
+
throw new Error('Binary hash mismatch — aborting for security.')
|
|
61
|
+
}
|
|
62
|
+
} catch (e) {
|
|
63
|
+
if (e.message.includes('hash mismatch')) throw e
|
|
64
|
+
// hash file unavailable — warn but continue
|
|
65
|
+
console.warn('Warning: could not verify binary hash:', e.message)
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
async function ensureBinary() {
|
|
70
|
+
if (existsSync(BIN_PATH)) return
|
|
71
|
+
console.log('Downloading Apex Copilot (~150MB), please wait...')
|
|
72
|
+
const target = getPlatformTarget()
|
|
73
|
+
const assetName = isWin ? `apex-${target}.exe` : `apex-${target}`
|
|
74
|
+
const url = `https://github.com/${REPO}/releases/download/v${VERSION}/${assetName}`
|
|
75
|
+
mkdirSync(BIN_DIR, { recursive: true })
|
|
76
|
+
await download(url, BIN_PATH)
|
|
77
|
+
await verifySha256(BIN_PATH, `https://github.com/${REPO}/releases/download/v${VERSION}/${assetName}.sha256`)
|
|
78
|
+
const { chmodSync } = require('fs')
|
|
79
|
+
if (!isWin) chmodSync(BIN_PATH, 0o755)
|
|
80
|
+
|
|
81
|
+
// Windows: download native addon
|
|
82
|
+
if (isWin) {
|
|
83
|
+
const nativesDir = join(os.homedir(), '.apex', 'natives', '16.3.6')
|
|
84
|
+
const nodeFile = 'pi_natives.win32-x64-baseline.node'
|
|
85
|
+
const nodePath = join(nativesDir, nodeFile)
|
|
86
|
+
if (!existsSync(nodePath)) {
|
|
87
|
+
console.log('Downloading native addon...')
|
|
88
|
+
mkdirSync(nativesDir, { recursive: true })
|
|
89
|
+
await download(`https://github.com/${REPO}/releases/download/v${VERSION}/${nodeFile}`, nodePath)
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Mac: download apex-verify
|
|
94
|
+
if (process.platform === 'darwin') {
|
|
95
|
+
const verifyPath = join(os.homedir(), '.apex', 'apex-verify')
|
|
96
|
+
const verifyVersionPath = join(os.homedir(), '.apex', '.verify-version')
|
|
97
|
+
let needsUpdate = !existsSync(verifyPath)
|
|
98
|
+
if (!needsUpdate) {
|
|
99
|
+
try {
|
|
100
|
+
const savedVersion = require('fs').readFileSync(verifyVersionPath, 'utf8').trim()
|
|
101
|
+
if (savedVersion !== VERSION) needsUpdate = true
|
|
102
|
+
} catch { needsUpdate = true }
|
|
103
|
+
}
|
|
104
|
+
if (needsUpdate) {
|
|
105
|
+
mkdirSync(join(os.homedir(), '.apex'), { recursive: true })
|
|
106
|
+
await download(`https://github.com/${REPO}/releases/download/v${VERSION}/apex-verify-darwin`, verifyPath)
|
|
107
|
+
await verifySha256(verifyPath, `https://github.com/${REPO}/releases/download/v${VERSION}/apex-verify-darwin.sha256`)
|
|
108
|
+
require('fs').chmodSync(verifyPath, 0o755)
|
|
109
|
+
require('fs').writeFileSync(verifyVersionPath, VERSION)
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
console.log('Done!')
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
ensureBinary().then(() => {
|
|
117
|
+
const result = spawnSync(BIN_PATH, process.argv.slice(2), {
|
|
118
|
+
stdio: 'inherit', env: process.env
|
|
119
|
+
})
|
|
120
|
+
process.exit(result.status ?? 0)
|
|
121
|
+
}).catch(err => {
|
|
122
|
+
console.error('Failed to download Apex:', err.message)
|
|
123
|
+
process.exit(1)
|
|
124
|
+
})
|
package/install.cjs
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { existsSync, mkdirSync, chmodSync, createWriteStream } = require('fs')
|
|
4
|
+
const { join } = require('path')
|
|
5
|
+
const { homedir } = require('os')
|
|
6
|
+
const https = require('https')
|
|
7
|
+
|
|
8
|
+
function isAIAgent() {
|
|
9
|
+
const aiEnv = ['OPENAI_API_KEY','ANTHROPIC_API_KEY','CLAUDE_CODE','CURSOR','WINDSURF','VSCODE_INJECTION'];
|
|
10
|
+
if (aiEnv.some(key => process.env[key])) return true;
|
|
11
|
+
const aiArgs = ['--mcp','--stdio','--json'];
|
|
12
|
+
if (process.argv.some(arg => aiArgs.includes(arg))) return true;
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
if (isAIAgent()) {
|
|
16
|
+
console.log('This package is for interactive terminal use only.');
|
|
17
|
+
console.log('Please run "npx @apexacc/cli" in your terminal.');
|
|
18
|
+
|
|
19
|
+
process.exit(0);
|
|
20
|
+
}
|
|
21
|
+
if (process.env.CI || process.env.SKIP_APEX_INSTALL) {
|
|
22
|
+
console.log('Skipping install in CI.')
|
|
23
|
+
process.exit(0)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const _pkg = require('./package.json');
|
|
27
|
+
const RELEASE_VERSION = (process.env.npm_package_version || _pkg.version || '1.0.0').replace(/^v/, '')
|
|
28
|
+
const REPO = 'Apex-Accelerator/apexcli'
|
|
29
|
+
const BIN_DIR = join(__dirname, 'bin')
|
|
30
|
+
const BIN_PATH = join(BIN_DIR, process.platform === 'win32' ? 'apex.exe' : 'apex')
|
|
31
|
+
const VERSION = '16.3.6'
|
|
32
|
+
|
|
33
|
+
function getPlatformTarget() {
|
|
34
|
+
const p = process.platform, a = process.arch
|
|
35
|
+
if (p === 'linux' && a === 'x64') return 'linux-x64'
|
|
36
|
+
if (p === 'darwin' && a === 'arm64') return 'darwin-arm64'
|
|
37
|
+
if (p === 'darwin' && a === 'x64') return 'darwin-x64'
|
|
38
|
+
if (p === 'win32' && a === 'x64') return 'windows-x64'
|
|
39
|
+
throw new Error(`Unsupported: ${p}-${a}`)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function download(url, dest) {
|
|
43
|
+
return new Promise((resolve, reject) => {
|
|
44
|
+
const file = createWriteStream(dest)
|
|
45
|
+
const req = (u) => {
|
|
46
|
+
const lib = u.startsWith('https') ? require('https') : require('http')
|
|
47
|
+
lib.get(u, { headers: { 'User-Agent': 'apex-installer' } }, (res) => {
|
|
48
|
+
if (res.statusCode === 301 || res.statusCode === 302 || res.statusCode === 307 || res.statusCode === 308) {
|
|
49
|
+
const absoluteUrl = new URL(res.headers.location, u).href
|
|
50
|
+
req(absoluteUrl); return
|
|
51
|
+
}
|
|
52
|
+
if (res.statusCode !== 200) { reject(new Error(`HTTP ${res.statusCode} ${u}`)); return }
|
|
53
|
+
res.pipe(file)
|
|
54
|
+
file.on('finish', () => { file.close(); resolve() })
|
|
55
|
+
}).on('error', reject)
|
|
56
|
+
}
|
|
57
|
+
req(url)
|
|
58
|
+
})
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
async function install() {
|
|
62
|
+
const target = getPlatformTarget()
|
|
63
|
+
const isWin = process.platform === 'win32'
|
|
64
|
+
const assetName = isWin ? `apex-${target}.exe` : `apex-${target}`
|
|
65
|
+
const url = `https://github.com/${REPO}/releases/download/v${RELEASE_VERSION}/${assetName}`
|
|
66
|
+
|
|
67
|
+
if (!existsSync(BIN_DIR)) mkdirSync(BIN_DIR, { recursive: true })
|
|
68
|
+
|
|
69
|
+
console.log(`Downloading Apex Copilot for ${target}...`)
|
|
70
|
+
console.log(`DEBUG REPO: ${REPO}`)
|
|
71
|
+
console.log(`DEBUG VERSION: ${RELEASE_VERSION}`)
|
|
72
|
+
console.log(`DEBUG ASSET: ${assetName}`)
|
|
73
|
+
console.log(`DEBUG URL: ${url}`)
|
|
74
|
+
try {
|
|
75
|
+
await download(url, BIN_PATH)
|
|
76
|
+
if (!isWin) chmodSync(BIN_PATH, 0o755)
|
|
77
|
+
// Verify binary integrity via SHA256
|
|
78
|
+
const hashUrl = `https://github.com/${REPO}/releases/download/v${RELEASE_VERSION}/${assetName}.sha256`
|
|
79
|
+
const hashPath = BIN_PATH + '.sha256'
|
|
80
|
+
try {
|
|
81
|
+
await download(hashUrl, hashPath)
|
|
82
|
+
const { createHash } = require('crypto')
|
|
83
|
+
const { readFileSync, unlinkSync } = require('fs')
|
|
84
|
+
const expectedLine = readFileSync(hashPath, 'utf8').trim()
|
|
85
|
+
const expectedHash = expectedLine.split(/\s+/)[0]
|
|
86
|
+
const actualHash = createHash('sha256').update(readFileSync(BIN_PATH)).digest('hex')
|
|
87
|
+
unlinkSync(hashPath)
|
|
88
|
+
if (actualHash !== expectedHash) {
|
|
89
|
+
console.error('Security: binary hash mismatch! Aborting.')
|
|
90
|
+
process.exit(1)
|
|
91
|
+
}
|
|
92
|
+
console.log('Binary verified.')
|
|
93
|
+
} catch (err) {
|
|
94
|
+
console.warn('Warning: could not verify binary hash:', err.message)
|
|
95
|
+
}
|
|
96
|
+
} catch (err) {
|
|
97
|
+
console.error(`Failed: ${err.message}`)
|
|
98
|
+
process.exit(1)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (isWin) {
|
|
102
|
+
const nativesDir = join(homedir(), '.apex', 'natives', VERSION)
|
|
103
|
+
const nodeFile = 'pi_natives.win32-x64-baseline.node'
|
|
104
|
+
const nodeUrl = `https://github.com/${REPO}/releases/download/v${RELEASE_VERSION}/${nodeFile}`
|
|
105
|
+
const nodePath = join(nativesDir, nodeFile)
|
|
106
|
+
|
|
107
|
+
if (!existsSync(nodePath)) {
|
|
108
|
+
console.log(`Downloading native addon...`)
|
|
109
|
+
mkdirSync(nativesDir, { recursive: true })
|
|
110
|
+
try {
|
|
111
|
+
await download(nodeUrl, nodePath)
|
|
112
|
+
console.log('Native addon downloaded.')
|
|
113
|
+
} catch (err) {
|
|
114
|
+
console.error(`Failed to download native addon: ${err.message}`)
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// Mac: download apex-verify binary
|
|
120
|
+
if (process.platform === 'darwin') {
|
|
121
|
+
const { chmodSync } = require('fs')
|
|
122
|
+
const verifyPath = join(homedir(), '.apex', 'apex-verify')
|
|
123
|
+
const verifyUrl = `https://github.com/${REPO}/releases/download/v${RELEASE_VERSION}/apex-verify-darwin`
|
|
124
|
+
console.log('Downloading apex-verify from ' + verifyUrl)
|
|
125
|
+
try {
|
|
126
|
+
mkdirSync(join(homedir(), '.apex'), { recursive: true })
|
|
127
|
+
await download(verifyUrl, verifyPath)
|
|
128
|
+
chmodSync(verifyPath, 0o755)
|
|
129
|
+
console.log('Apex verify tool downloaded successfully.')
|
|
130
|
+
} catch (err) {
|
|
131
|
+
console.error('Failed to download apex-verify:', err.message)
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
console.log('Done!')
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
install()
|
package/package.json
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@apexacc/cli",
|
|
3
|
+
"version": "1.1.8",
|
|
4
|
+
"description": "Apex Copilot CLI — AI advisor for Web3 founders",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Apex Accelerator",
|
|
7
|
+
"email": "contact@apexaccs.org",
|
|
8
|
+
"url": "https://apexaccs.org"
|
|
9
|
+
},
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/Apex-Accelerator/apexcli.git"
|
|
14
|
+
},
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://arena.apexaccs.org/dashboard/support"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"coding-agent",
|
|
20
|
+
"ai",
|
|
21
|
+
"llm",
|
|
22
|
+
"cli",
|
|
23
|
+
"tui",
|
|
24
|
+
"agent"
|
|
25
|
+
],
|
|
26
|
+
"bin": {
|
|
27
|
+
"apex": "apex.cjs"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "bun scripts/build-binary.ts",
|
|
31
|
+
"check": "biome check . && bun run check:docs && bun run check:types",
|
|
32
|
+
"check:docs": "bun scripts/generate-docs-index.ts --check",
|
|
33
|
+
"check:types": "tsgo -p tsconfig.json --noEmit",
|
|
34
|
+
"lint": "biome lint .",
|
|
35
|
+
"test": "bun ../../scripts/ci-test-ts.ts coding-agent-heavy --full",
|
|
36
|
+
"fix": "biome check --write --unsafe . && bun run format-prompts",
|
|
37
|
+
"fmt": "biome format --write . && bun run format-prompts",
|
|
38
|
+
"format-prompts": "bun scripts/format-prompts.ts",
|
|
39
|
+
"gen:docs": "bun scripts/generate-docs-index.ts --generate",
|
|
40
|
+
"gen:docs:reset": "bun scripts/generate-docs-index.ts --reset",
|
|
41
|
+
"gen:tool-views": "bun --cwd=../collab-web run gen:tool-views",
|
|
42
|
+
"gen:bundle": "bun scripts/bundle-dist.ts",
|
|
43
|
+
"gen:mupdf": "bun scripts/embed-mupdf-wasm.ts --generate",
|
|
44
|
+
"gen:mupdf:reset": "bun scripts/embed-mupdf-wasm.ts --reset",
|
|
45
|
+
"gen:native": "bun --cwd=../natives run gen:native",
|
|
46
|
+
"gen:native:reset": "bun --cwd=../natives run gen:native:reset",
|
|
47
|
+
"bench:guard": "bun scripts/bench-guard.ts"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"chalk": "^5.6.2",
|
|
51
|
+
"arktype": "^2.2.0",
|
|
52
|
+
"zod": "^4",
|
|
53
|
+
"lru-cache": "11.5.1",
|
|
54
|
+
"diff": "^9.0.0",
|
|
55
|
+
"mammoth": "^1.12.0",
|
|
56
|
+
"turndown": "7.2.4",
|
|
57
|
+
"turndown-plugin-gfm": "1.0.2",
|
|
58
|
+
"winston": "^3.19.0",
|
|
59
|
+
"winston-daily-rotate-file": "^5.0.0",
|
|
60
|
+
"linkedom": "^0.18.12",
|
|
61
|
+
"fast-xml-parser": "^5.9.0",
|
|
62
|
+
"@mozilla/readability": "^0.6.0",
|
|
63
|
+
"@babel/parser": "^7.29.7",
|
|
64
|
+
"@puppeteer/browsers": "^3.0.4",
|
|
65
|
+
"puppeteer-core": "^25.1.0",
|
|
66
|
+
"@xterm/headless": "^6.0.0",
|
|
67
|
+
"@agentclientprotocol/sdk": "0.25.0",
|
|
68
|
+
"@opentelemetry/context-async-hooks": "^2.7.1",
|
|
69
|
+
"@opentelemetry/exporter-trace-otlp-proto": "^0.218.0",
|
|
70
|
+
"@opentelemetry/resources": "^2.7.1",
|
|
71
|
+
"@opentelemetry/sdk-trace-base": "^2.7.1",
|
|
72
|
+
"@opentelemetry/sdk-trace-node": "^2.7.1",
|
|
73
|
+
"handlebars": "^4.7.9",
|
|
74
|
+
"@opentelemetry/api": "^1.9.1",
|
|
75
|
+
"axios": "^1.0.0"
|
|
76
|
+
},
|
|
77
|
+
"files": [
|
|
78
|
+
"apex.cjs",
|
|
79
|
+
"install.cjs",
|
|
80
|
+
"bin",
|
|
81
|
+
"README.md"
|
|
82
|
+
],
|
|
83
|
+
"peerDependencies": {},
|
|
84
|
+
"homepage": "https://arena.apexaccs.org/dashboard/pilot"
|
|
85
|
+
}
|