eximagent 0.0.0 → 0.0.3

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/LICENSE ADDED
@@ -0,0 +1,15 @@
1
+ All Rights Reserved.
2
+
3
+ Copyright (c) 2026 eximagent.ai.
4
+
5
+ This package is a thin client for the eximagent.ai backend. The package
6
+ itself is provided for convenience to coding agents and developers who
7
+ want to integrate with the eximagent service surface. Source is not
8
+ public. Redistribution, modification, sublicensing, and commercial use
9
+ of this package or any derivative work are not permitted without a
10
+ written agreement with eximagent.ai.
11
+
12
+ The package downloads a precompiled binary at install time from
13
+ https://install.eximagent.ai. The binary is also covered by this notice.
14
+
15
+ For licensing inquiries: hello@eximagent.ai
package/README.md ADDED
@@ -0,0 +1,64 @@
1
+ # eximagent
2
+
3
+ Trade-intelligence CLI for coding agents. B2B prospect discovery, contact enrichment, outreach with stage tracking, tariff + HS-code lookups, OFAC sanctions screening, trade corridor management, per-company negotiation memory.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm i -g eximagent
9
+ # or
10
+ curl -fsSL https://install.eximagent.ai | sh
11
+ ```
12
+
13
+ ## Login
14
+
15
+ ```bash
16
+ eximagent login # device flow (browser)
17
+ eximagent login --token <pat> # personal access token
18
+ ```
19
+
20
+ ## Skill for your coding agent
21
+
22
+ The canonical skill is served from the backend and can be dropped into your host agent’s skill path:
23
+
24
+ ```bash
25
+ eximagent skill > ~/.claude/skills/eximagent/SKILL.md # Claude Code
26
+ eximagent skill > AGENTS.md # Codex
27
+ eximagent skill > .cursor/rules/eximagent.mdc # Cursor
28
+ ```
29
+
30
+ Or via the open agent-skills directory:
31
+
32
+ ```bash
33
+ npx skills add EximAgent/cli
34
+ ```
35
+
36
+ ## What the CLI exposes
37
+
38
+ Trade-domain primitives, ~60 commands across:
39
+
40
+ - `profile get / extract / update` — user trade profile (defaults, signature, target markets, products)
41
+ - `search run / refine` — autonomous buyer/importer discovery pipeline; materializes a Collection
42
+ - `collection get / list / clone / stats` — Collection CRUD + AI columns
43
+ - `enrich company / contacts / contact` — company crawl + decision-maker contact enrichment
44
+ - `email draft / send / cancel / history / followup` — outreach with per-recipient timezone + language + stage tracking
45
+ - `template generate / save / list / edit / recall` — email templates with `{{variables}}` + file attachments
46
+ - `kb add / list / remove / preview` — knowledge-base files for outreach context
47
+ - `tariff / hscode search / country resolve / company / trade lookup` — trade-data Q&A
48
+ - `corridor save / list / remove` — recurring trade lanes as `@corridor:<name>` mentions
49
+ - `sanctions check` — OFAC SDN screening
50
+ - `companyMemory get` — per-company negotiation memory
51
+ - `reminder / monitor` — scheduled signal-driven reminders
52
+
53
+ All output is NDJSON on stdout. Typed errors on stderr. `--stream` flag for long-running commands.
54
+
55
+ ## License
56
+
57
+ UNLICENSED. See LICENSE.
58
+
59
+ ## Links
60
+
61
+ - Site: https://eximagent.ai
62
+ - Backend: https://cvex-backend.eximagent.ai
63
+ - Install endpoint: https://install.eximagent.ai
64
+ - Issues: https://github.com/EximAgent/cli/issues
@@ -0,0 +1,77 @@
1
+ #!/usr/bin/env node
2
+ 'use strict'
3
+ const { spawn } = require('node:child_process')
4
+ const { existsSync, chmodSync, mkdirSync, createWriteStream } = require('node:fs')
5
+ const { homedir, platform, arch } = require('node:os')
6
+ const { join } = require('node:path')
7
+ const { get } = require('node:https')
8
+ const PLATFORM_MAP = {
9
+ 'darwin-arm64': 'darwin-arm64',
10
+ 'darwin-x64': 'darwin-x64',
11
+ 'linux-arm64': 'linux-arm64',
12
+ 'linux-x64': 'linux-x64'
13
+ }
14
+ const targetKey = `${platform()}-${arch()}`
15
+ const target = PLATFORM_MAP[targetKey]
16
+ if (!target) {
17
+ console.error(`[eximagent] unsupported platform: ${targetKey}`)
18
+ console.error(`[eximagent] supported: ${Object.keys(PLATFORM_MAP).join(', ')}`)
19
+ process.exit(64)
20
+ }
21
+ const VERSION = require('../package.json').version
22
+ const installDir = process.env.EXIMAGENT_HOME || join(homedir(), '.eximagent')
23
+ const binDir = join(installDir, 'bin')
24
+ const binPath = join(binDir, `eximagent-${target}-${VERSION}`)
25
+ const downloadUrl =
26
+ process.env.EXIMAGENT_INSTALL_URL ||
27
+ `https://raw.githubusercontent.com/EximAgent/cli/v${VERSION}/bin/eximagent-${target}`
28
+ const download = (url, dest) =>
29
+ new Promise((resolve, reject) => {
30
+ const file = createWriteStream(dest, { mode: 0o755 })
31
+ const handle = res => {
32
+ if (res.statusCode === 301 || res.statusCode === 302) {
33
+ const next = res.headers.location
34
+ if (!next) return reject(new Error(`redirect without location from ${url}`))
35
+ return get(next, handle).on('error', reject)
36
+ }
37
+ if (res.statusCode !== 200) return reject(new Error(`HTTP ${res.statusCode} from ${url}`))
38
+ res.pipe(file)
39
+ file.on('finish', () => file.close(() => resolve()))
40
+ }
41
+ get(url, handle).on('error', e => {
42
+ try {
43
+ file.close()
44
+ } catch {}
45
+ reject(e)
46
+ })
47
+ })
48
+ const ensureBinary = async () => {
49
+ if (existsSync(binPath)) return
50
+ if (!existsSync(binDir)) mkdirSync(binDir, { recursive: true })
51
+ process.stderr.write(`[eximagent] fetching binary for ${target}...\n`)
52
+ try {
53
+ await download(downloadUrl, binPath)
54
+ chmodSync(binPath, 0o755)
55
+ } catch (error) {
56
+ console.error(`[eximagent] binary download failed: ${error.message}`)
57
+ console.error(`[eximagent] manual install: curl -fsSL ${downloadUrl} -o ${binPath} && chmod +x ${binPath}`)
58
+ process.exit(64)
59
+ }
60
+ }
61
+ const run = async () => {
62
+ await ensureBinary()
63
+ const args = process.argv.slice(2)
64
+ const child = spawn(binPath, args, { stdio: 'inherit' })
65
+ child.on('exit', (code, signal) => {
66
+ if (signal) process.kill(process.pid, signal)
67
+ else process.exit(code ?? 0)
68
+ })
69
+ child.on('error', e => {
70
+ console.error(`[eximagent] spawn failed: ${e.message}`)
71
+ process.exit(64)
72
+ })
73
+ }
74
+ run().catch(error => {
75
+ console.error(`[eximagent] ${error.message}`)
76
+ process.exit(64)
77
+ })
package/package.json CHANGED
@@ -1,4 +1,62 @@
1
1
  {
2
- "version": "0.0.0",
3
- "name": "eximagent"
4
- }
2
+ "name": "eximagent",
3
+ "version": "0.0.3",
4
+ "description": "Trade-intelligence CLI for coding agents. B2B prospect discovery, contact enrichment, outreach with stage tracking, tariff + HS-code lookups, OFAC sanctions screening, trade corridor management, per-company negotiation memory.",
5
+ "keywords": [
6
+ "trade",
7
+ "trade-intelligence",
8
+ "b2b",
9
+ "prospect",
10
+ "buyer",
11
+ "importer",
12
+ "exporter",
13
+ "tariff",
14
+ "hs-code",
15
+ "customs",
16
+ "ofac",
17
+ "sanctions",
18
+ "corridor",
19
+ "outreach",
20
+ "cold-email",
21
+ "cli",
22
+ "agent",
23
+ "coding-agent",
24
+ "claude-code",
25
+ "codex",
26
+ "cursor"
27
+ ],
28
+ "homepage": "https://eximagent.ai",
29
+ "bugs": "https://github.com/EximAgent/cli/issues",
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/EximAgent/cli.git"
33
+ },
34
+ "license": "UNLICENSED",
35
+ "type": "module",
36
+ "bin": {
37
+ "eximagent": "bin/eximagent.cjs"
38
+ },
39
+ "files": [
40
+ "bin/",
41
+ "scripts/install.cjs",
42
+ "LICENSE",
43
+ "README.md"
44
+ ],
45
+ "scripts": {
46
+ "build": "bun build --compile --target=bun-darwin-arm64 ./src/main.ts --outfile dist/eximagent",
47
+ "build:all": "bun run build:darwin-arm64 && bun run build:darwin-x64 && bun run build:linux-x64 && bun run build:linux-arm64",
48
+ "build:darwin-arm64": "bun build --compile --target=bun-darwin-arm64 ./src/main.ts --outfile dist/eximagent-darwin-arm64",
49
+ "build:darwin-x64": "bun build --compile --target=bun-darwin-x64 ./src/main.ts --outfile dist/eximagent-darwin-x64",
50
+ "build:linux-arm64": "bun build --compile --target=bun-linux-arm64 ./src/main.ts --outfile dist/eximagent-linux-arm64",
51
+ "build:linux-x64": "bun build --compile --target=bun-linux-x64 ./src/main.ts --outfile dist/eximagent-linux-x64",
52
+ "postinstall": "node ./scripts/install.cjs",
53
+ "smoke": "bun scripts/smoke.ts"
54
+ },
55
+ "engines": {
56
+ "node": ">=20"
57
+ },
58
+ "publishConfig": {
59
+ "access": "public",
60
+ "registry": "https://registry.npmjs.org/"
61
+ }
62
+ }
@@ -0,0 +1,61 @@
1
+ #!/usr/bin/env node
2
+ 'use strict'
3
+ const { existsSync, chmodSync, mkdirSync, createWriteStream } = require('node:fs')
4
+ const { homedir, platform, arch } = require('node:os')
5
+ const { join } = require('node:path')
6
+ const { get } = require('node:https')
7
+ const PLATFORM_MAP = {
8
+ 'darwin-arm64': 'darwin-arm64',
9
+ 'darwin-x64': 'darwin-x64',
10
+ 'linux-arm64': 'linux-arm64',
11
+ 'linux-x64': 'linux-x64'
12
+ }
13
+ const target = PLATFORM_MAP[`${platform()}-${arch()}`]
14
+ if (!target) process.exit(0)
15
+ const VERSION = require('../package.json').version
16
+ const installDir = process.env.EXIMAGENT_HOME || join(homedir(), '.eximagent')
17
+ const binDir = join(installDir, 'bin')
18
+ const binPath = join(binDir, `eximagent-${target}-${VERSION}`)
19
+ if (existsSync(binPath)) process.exit(0)
20
+ const url =
21
+ process.env.EXIMAGENT_INSTALL_URL ||
22
+ `https://raw.githubusercontent.com/EximAgent/cli/v${VERSION}/bin/eximagent-${target}`
23
+ const TIMEOUT_MS = 20_000
24
+ if (!existsSync(binDir)) {
25
+ try {
26
+ mkdirSync(binDir, { recursive: true })
27
+ } catch {
28
+ process.exit(0)
29
+ }
30
+ }
31
+ const file = createWriteStream(binPath, { mode: 0o755 })
32
+ const handle = res => {
33
+ if (res.statusCode === 301 || res.statusCode === 302) {
34
+ const next = res.headers.location
35
+ if (!next) return process.exit(0)
36
+ return get(next, handle).on('error', () => process.exit(0))
37
+ }
38
+ if (res.statusCode !== 200) {
39
+ try {
40
+ file.close()
41
+ } catch {}
42
+ process.exit(0)
43
+ }
44
+ res.pipe(file)
45
+ file.on('finish', () => {
46
+ file.close(() => {
47
+ try {
48
+ chmodSync(binPath, 0o755)
49
+ } catch {}
50
+ process.exit(0)
51
+ })
52
+ })
53
+ }
54
+ const req = get(url, handle)
55
+ req.setTimeout(TIMEOUT_MS, () => {
56
+ try {
57
+ req.destroy()
58
+ } catch {}
59
+ process.exit(0)
60
+ })
61
+ req.on('error', () => process.exit(0))