aethercore-cli 0.0.0-stage → 1.0.0
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 +21 -0
- package/README.md +54 -2
- package/bin/aethercore.js +177 -0
- package/package.json +10 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 AETHER-CORE
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,55 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center"><img src="https://raw.githubusercontent.com/aethercore-ai/aether/main/.github/assets/banner.jpg" alt="AETHER" width="100%"></p>
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<h1 align="center">AETHER-CORE</h1>
|
|
4
|
+
<p align="center"><b>Read any token before you trade it.</b><br>Four agents read live market, contract, holder and wallet data on Solana, Base, Ethereum and Robinhood Chain, and return one verdict: a conviction score, a risk tier and the level that breaks the thesis.</p>
|
|
5
|
+
|
|
6
|
+
<p align="center">
|
|
7
|
+
<a href="https://aethercoreai.xyz">Website</a> ·
|
|
8
|
+
<a href="https://aethercoreai.xyz/#/terminal">Terminal</a> ·
|
|
9
|
+
<a href="https://aethercoreai.xyz/#/docs">Docs</a> ·
|
|
10
|
+
<a href="https://www.npmjs.com/package/aethercore-cli">npm</a>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## What it does
|
|
16
|
+
|
|
17
|
+
| Agent | Reads | Red flags |
|
|
18
|
+
|---|---|---|
|
|
19
|
+
| **QUANT-01** · microstructure | liquidity vs market cap, volume velocity, 1 h order-flow imbalance, pool age | liquidity under 5 % of mcap, volume over 300 % of mcap |
|
|
20
|
+
| **FORENSICS-02** · on-chain integrity | mint / freeze / pause, proxy, blacklist, honeypot, sell tax, LP lock, top-10 non-LP holders | top-10 over 20 %, mintable, sell tax |
|
|
21
|
+
| **SENTINEL-03** · capital flow | wallet-level flow from real trades; smart money, whales, dev, snipers and bundlers on Robinhood Chain | large wallets net selling, dev selling |
|
|
22
|
+
| **RISK-04** · synthesis | the three reports | conviction 1–99, risk tier, regime, observation and hard invalidation |
|
|
23
|
+
|
|
24
|
+
**No invented numbers.** Every figure is computed by the engine from live sources. A value a source did not return prints as `[DATA_UNAVAILABLE]`. Claude writes only the prose of a log, and a guard drops any sentence containing a number that is not in the data.
|
|
25
|
+
|
|
26
|
+
**Sources:** DexScreener, GoPlus Security and GeckoTerminal trades (Solana, Base, Ethereum), the GOD'S EYE index (Robinhood Chain), CoinGecko (macro and sectors).
|
|
27
|
+
|
|
28
|
+
## Use it from your terminal
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npx aethercore-cli scan <contract> # four-agent TELEMETRY LOG
|
|
32
|
+
npx aethercore-cli forensics <contract> # contract security and holders
|
|
33
|
+
npx aethercore-cli flow <contract | sector> # wallet flow, or a sector (ai agents, meme, rwa)
|
|
34
|
+
npx aethercore-cli macro # regime, sector rotation, trending pools
|
|
35
|
+
npx aethercore-cli watch <contract> liq<250k
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Give it to your AI agent (MCP)
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
claude mcp add aether -- npx -y aethercore-cli mcp
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Claude Desktop, Cursor and other MCP clients:
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{ "mcpServers": { "aether": { "command": "npx", "args": ["-y", "aethercore-cli", "mcp"] } } }
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Tools: `aether_scan`, `aether_forensics`, `aether_flow`, `aether_macro`, `aether_watch_check`.
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
## $AETHER
|
|
54
|
+
|
|
55
|
+
Research output only. Not financial advice. MIT License.
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// AETHER-CORE from your terminal and from AI agents (MCP). No dependencies; Node 18+.
|
|
3
|
+
// npx aethercore-cli scan <contract> full four-agent TELEMETRY LOG
|
|
4
|
+
// npx aethercore-cli forensics <contract> contract security and holders
|
|
5
|
+
// npx aethercore-cli flow <contract|sector> wallet flow, or a sector's capital flow
|
|
6
|
+
// npx aethercore-cli macro market regime, sector rotation, trending pools
|
|
7
|
+
// npx aethercore-cli watch <contract> <rule> re-check a rule (liq<250k, top10>30, score<40...)
|
|
8
|
+
// npx aethercore-cli mcp MCP server over stdio (Claude, Cursor, any MCP client)
|
|
9
|
+
// npx aethercore-cli mcp setup how to add it to your agent
|
|
10
|
+
// Every number comes from the AETHER engine's live sources. Missing data prints as [DATA_UNAVAILABLE].
|
|
11
|
+
"use strict";
|
|
12
|
+
const API = (process.env.AETHER_API || "https://aethercoreai.xyz").replace(/\/$/, "");
|
|
13
|
+
const VERSION = "1.0.0";
|
|
14
|
+
const NA = "[DATA_UNAVAILABLE]";
|
|
15
|
+
const tty = process.stdout.isTTY && !process.env.NO_COLOR;
|
|
16
|
+
const c = (code) => (s) => (tty ? `\x1b[${code}m${s}\x1b[0m` : String(s));
|
|
17
|
+
const bold = c(1), dim = c(2), red = c(31), green = c(32), yellow = c(33), white = c(97);
|
|
18
|
+
const pct = (v) => (v == null ? NA : (Math.abs(v) >= 100 ? v.toFixed(0) : v.toFixed(1)) + "%");
|
|
19
|
+
const usd = (v) => (v == null ? NA : "$" + (v >= 1e12 ? (v / 1e12).toFixed(2) + "T" : v >= 1e9 ? (v / 1e9).toFixed(2) + "B" : v >= 1e6 ? (v / 1e6).toFixed(2) + "M" : v >= 1e3 ? (v / 1e3).toFixed(1) + "K" : v >= 1 ? v.toFixed(2) : v.toPrecision(3)));
|
|
20
|
+
const tierCol = (t) => (t === "LOW" ? green : t === "MODERATE" ? white : t === "HIGH" ? yellow : red);
|
|
21
|
+
const sigCol = (s) => (/BULL|VERIFIED|ACCUM/.test(s) ? green : /BEAR|CRITICAL|DISTRIB/.test(s) ? red : /WARN/.test(s) ? yellow : dim);
|
|
22
|
+
|
|
23
|
+
async function call(path) {
|
|
24
|
+
const ctl = new AbortController(); const t = setTimeout(() => ctl.abort(), 45000);
|
|
25
|
+
try {
|
|
26
|
+
const r = await fetch(API + path, { headers: { "user-agent": "aethercore-cli/" + VERSION, accept: "application/json" }, signal: ctl.signal });
|
|
27
|
+
let j = {}; try { j = await r.json(); } catch {}
|
|
28
|
+
if (!r.ok) { const e = new Error(j.error || `AETHER answered HTTP ${r.status}`); e.status = r.status; throw e; }
|
|
29
|
+
return j;
|
|
30
|
+
} catch (e) { if (e.name === "AbortError") throw new Error("AETHER did not answer within 45 s."); throw e; }
|
|
31
|
+
finally { clearTimeout(t); }
|
|
32
|
+
}
|
|
33
|
+
const isAddr = (a) => /^0x[0-9a-fA-F]{40}$/.test(a) || /^[1-9A-HJ-NP-Za-km-z]{32,44}$/.test(a);
|
|
34
|
+
const scan = (addr, mode = "scan", chain = "") => call(`/api/scan?addr=${encodeURIComponent(addr)}&mode=${mode}&chain=${encodeURIComponent(chain)}`);
|
|
35
|
+
|
|
36
|
+
// ---------- plain-text TELEMETRY LOG (also what MCP returns) ----------
|
|
37
|
+
function telemetry(j, mode = "scan") {
|
|
38
|
+
const r = j.r, q = r.q, f = r.f, ai = j.ai || {}, w = r.sentinel.wallets, yn = (v, a, b) => (v == null ? NA : v ? a : b);
|
|
39
|
+
const L = [];
|
|
40
|
+
L.push("[AETHER-CORE // TELEMETRY LOG]");
|
|
41
|
+
L.push(`> TARGET : ${q.symbol || ""}${q.symbol ? " · " : ""}${r.addr}`);
|
|
42
|
+
L.push(`> NETWORK : ${r.chainLabel}${q.dexId ? " · " + String(q.dexId).toUpperCase() : ""}`);
|
|
43
|
+
L.push("> AGENTS : QUANT-01 [ACTIVE] | FORENSICS-02 [ACTIVE] | SENTINEL-03 [ACTIVE]");
|
|
44
|
+
L.push(`> DATA STATUS : ${r.status}`, "");
|
|
45
|
+
if (mode === "scan") {
|
|
46
|
+
L.push("1 · EXECUTIVE INTELLIGENCE BRIEF", ` ${ai.thesis || r.brief}`, ` Conviction ${r.score}% · Risk tier ${r.tier} · Regime ${r.regime} · Price ${usd(q.price)} · Mcap ${usd(q.mcap)}`, "");
|
|
47
|
+
}
|
|
48
|
+
L.push("2 · MULTI-AGENT DIAGNOSTIC MATRIX");
|
|
49
|
+
if (mode === "scan") L.push(` QUANT-01 [${r.quantSig}] Liquidity ${usd(q.liqUsd)} (${pct(q.liqPct)} of mcap) · 24h volume ${usd(q.vol24)} (${pct(q.volPct)}) · 1h buy/sell Δ ${q.delta1 == null ? NA : (q.delta1 > 0 ? "+" : "") + q.delta1.toFixed(1) + "%"}`);
|
|
50
|
+
if (mode !== "flow") L.push(` FORENSICS-02 [${r.foreSig}] Mint ${yn(f.mint, "revoked", "ACTIVE")} · ${r.chain === "solana" ? "freeze " + yn(f.freeze, "revoked", "ACTIVE") : "pausable " + yn(f.freeze, "no", "YES")} · proxy ${yn(f.proxy, "YES", "no")} · honeypot ${yn(f.honeypot, "YES", "no")} · sell tax ${pct(f.sellTax)} · LP locked/burned ${pct(f.lpLockedPct)} · top-10 non-LP ${pct(f.top10)} · holders ${f.holderCount ?? NA}`);
|
|
51
|
+
if (mode !== "forensics") {
|
|
52
|
+
let flow = `flow ${r.sentinel.flow.toLowerCase()} (${r.sentinel.basis})`;
|
|
53
|
+
if (w && w.source === "trades") flow = `last ${w.trades} trades: buys ${usd(w.buyUsd)} vs sells ${usd(w.sellUsd)} · ` + (w.largeBuyUsd + w.largeSellUsd ? `large wallets (≥ ${usd(w.threshold)}) net ${w.largeNetUsd >= 0 ? "+" : "-"}${usd(Math.abs(w.largeNetUsd))}` : `no single trade ≥ ${usd(w.threshold)}`) + ` · ${w.buyers} net buyers vs ${w.sellers} net sellers · ` + flow;
|
|
54
|
+
if (w && w.source === "groups") flow = `24h wallet groups net: smart money ${usd(w.smart.netUsd)} · whales ${usd(w.whale.netUsd)} · dev ${usd(w.dev.netUsd)} · snipers ${usd(w.sniper.netUsd)} · bundlers ${usd(w.bundler.netUsd)} · ` + flow;
|
|
55
|
+
L.push(` SENTINEL-03 [${r.sentinel.flow}] ${flow}`);
|
|
56
|
+
}
|
|
57
|
+
L.push("", "3 · ANOMALY & RISK DETECTION", ` Red flags: ${r.flags.length ? r.flags.join("; ") : "None detected."}`, ` Catalysts: ${r.cats.length ? r.cats.join("; ") : "None detected in public data."}`, "");
|
|
58
|
+
L.push("4 · EXECUTION PARAMETERS", ` Observation: ${r.observation}`, ` Hard invalidation: ${r.invalidation}`);
|
|
59
|
+
if (ai.next) L.push(` Next: ${ai.next}`);
|
|
60
|
+
L.push("", `Sources: ${r.sources.join(", ") || NA}`, "Research output only. Not financial advice.");
|
|
61
|
+
return L.join("\n");
|
|
62
|
+
}
|
|
63
|
+
function paint(text) {
|
|
64
|
+
if (!tty) return text;
|
|
65
|
+
return text.split("\n").map((l) => {
|
|
66
|
+
if (/^\[AETHER-CORE/.test(l) || /^\d · /.test(l)) return bold(white(l));
|
|
67
|
+
if (/^> /.test(l)) return dim(l);
|
|
68
|
+
return l.replace(/\[(BULLISH|BEARISH|NEUTRAL|VERIFIED|WARNING|CRITICAL|UNAVAILABLE|ACCUMULATING|DISTRIBUTING)\]/g, (m, s) => sigCol(s)(m))
|
|
69
|
+
.replace(/Risk tier (LOW|MODERATE|HIGH|CRITICAL)/, (m, t) => "Risk tier " + tierCol(t)(bold(t)))
|
|
70
|
+
.replace(/\[DATA_UNAVAILABLE\]/g, dim(NA));
|
|
71
|
+
}).join("\n");
|
|
72
|
+
}
|
|
73
|
+
function macroText(m) {
|
|
74
|
+
const pc = (v) => (v == null ? NA : (v >= 0 ? "+" : "") + v.toFixed(2) + "%");
|
|
75
|
+
const L = ["[AETHER-CORE // MACRO]", `> REGIME : ${m.regime}`, "", `Total crypto market cap ${usd(m.mcap)} (${pc(m.change)} 24h) on ${usd(m.vol)} volume. BTC dominance ${m.btc.toFixed(1)}%, ETH ${m.eth.toFixed(1)}%, stablecoins ${m.stable.toFixed(1)}%.`];
|
|
76
|
+
L.push("Prices: " + Object.entries(m.prices).filter(([, v]) => v).map(([k, v]) => `${k} ${usd(v.usd)} ${pc(v.ch24)}`).join(" · "));
|
|
77
|
+
L.push("", "Sector rotation (trending categories):", ...m.sectors.map((s) => ` ${s.name} ${pc(s.ch24)} mcap ${usd(s.mcap)}`));
|
|
78
|
+
L.push("", "Trending pools per chain:", ...Object.entries(m.chains).map(([k, list]) => ` ${k.toUpperCase()}: ${list && list.length ? list.map((t) => `${t.name} ${pc(t.ch24)}`).join(" · ") : NA}`));
|
|
79
|
+
L.push("", `Sources: ${m.sources.join(", ")}`);
|
|
80
|
+
return L.join("\n");
|
|
81
|
+
}
|
|
82
|
+
function sectorText(s) {
|
|
83
|
+
const pc = (v) => (v == null ? NA : (v >= 0 ? "+" : "") + v.toFixed(2) + "%");
|
|
84
|
+
return ["[AETHER-CORE // FLOW]", `> SECTOR : ${s.sector}`, "", `Market cap ${usd(s.mcap)} (${pc(s.ch24)} 24h) · volume ${usd(s.vol24)} · turnover ${pct(s.turnover)} of sector cap.`, s.related.length ? "Related: " + s.related.map((r) => `${r.name} ${pc(r.ch24)}`).join(" · ") : "", `Source: ${s.source}`].filter(Boolean).join("\n");
|
|
85
|
+
}
|
|
86
|
+
const METRICS = { liq: (r) => r.q.liqUsd, liqpct: (r) => r.q.liqPct, top10: (r) => r.f.top10, score: (r) => r.score, price: (r) => r.q.price, mcap: (r) => r.q.mcap, vol: (r) => r.q.vol24 };
|
|
87
|
+
function parseRule(rule) {
|
|
88
|
+
const m = String(rule || "").match(/^([a-z0-9]+)\s*(<|>)\s*\$?([\d.]+)\s*([kmb%]?)$/i); if (!m || !METRICS[m[1].toLowerCase()]) return null;
|
|
89
|
+
return { metric: m[1].toLowerCase(), op: m[2], value: parseFloat(m[3]) * ({ k: 1e3, m: 1e6, b: 1e9 }[m[4].toLowerCase()] || 1) };
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// ---------- MCP server (stdio, JSON-RPC 2.0, newline-delimited) ----------
|
|
93
|
+
const TOOLS = [
|
|
94
|
+
{ name: "aether_scan", description: "Full AETHER-CORE four-agent scan of a token contract on Solana, Base, Ethereum or Robinhood Chain: liquidity and order flow (QUANT-01), contract security and holder concentration (FORENSICS-02), wallet-level flow (SENTINEL-03) and the synthesis (RISK-04: conviction score 1-99, risk tier, regime, invalidation level). Numbers come from live sources; missing data is [DATA_UNAVAILABLE].", inputSchema: { type: "object", properties: { address: { type: "string", description: "Token contract address (0x… EVM or base58 Solana)" }, chain: { type: "string", enum: ["solana", "base", "ethereum", "robinhood"], description: "Optional hint; the engine finds the chain the token trades on." } }, required: ["address"] } },
|
|
95
|
+
{ name: "aether_forensics", description: "Contract security only: mint/freeze/pause authority, proxy, blacklist, honeypot, sell tax, LP lock, top-10 non-LP holders, bundler and sniper share where indexed.", inputSchema: { type: "object", properties: { address: { type: "string" }, chain: { type: "string", enum: ["solana", "base", "ethereum", "robinhood"] } }, required: ["address"] } },
|
|
96
|
+
{ name: "aether_flow", description: "Capital flow. For a token address: wallet-level buying and selling from real trades (large wallets, net buyers vs sellers; smart money, whales, dev, snipers and bundlers on Robinhood Chain). For a sector name (e.g. 'ai agents', 'meme', 'rwa'): the sector's market cap change, volume and turnover.", inputSchema: { type: "object", properties: { target: { type: "string", description: "Token address or sector name" } }, required: ["target"] } },
|
|
97
|
+
{ name: "aether_macro", description: "Market regime: total crypto market cap and change, BTC/ETH dominance, stablecoin share, trending sectors and coins, trending pools on Solana, Base, Ethereum and Robinhood Chain.", inputSchema: { type: "object", properties: {} } },
|
|
98
|
+
{ name: "aether_watch_check", description: "Check one alert rule against a token right now. Rule format: <metric><op><value>, metrics liq, liqpct, top10, score, price, mcap, vol (e.g. 'liq<250k', 'top10>30', 'score<40'). Returns the current value and whether the rule is triggered.", inputSchema: { type: "object", properties: { address: { type: "string" }, rule: { type: "string" } }, required: ["address", "rule"] } }
|
|
99
|
+
];
|
|
100
|
+
async function runTool(name, a = {}) {
|
|
101
|
+
if (name === "aether_scan" || name === "aether_forensics") { if (!isAddr(a.address || "")) throw new Error("address must be a Solana (base58) or EVM (0x…) contract address"); const mode = name === "aether_scan" ? "scan" : "forensics"; return telemetry(await scan(a.address, mode, a.chain || ""), mode); }
|
|
102
|
+
if (name === "aether_flow") { const t = String(a.target || "").trim(); if (!t) throw new Error("target is required"); if (isAddr(t)) return telemetry(await scan(t, "flow"), "flow"); return sectorText((await call(`/api/flow?sector=${encodeURIComponent(t)}`)).s); }
|
|
103
|
+
if (name === "aether_macro") return macroText(await call("/api/macro"));
|
|
104
|
+
if (name === "aether_watch_check") {
|
|
105
|
+
const rule = parseRule(a.rule); if (!rule) throw new Error("rule must look like liq<250k, top10>30 or score<40");
|
|
106
|
+
if (!isAddr(a.address || "")) throw new Error("address must be a contract address");
|
|
107
|
+
const r = (await call(`/api/watch?addr=${encodeURIComponent(a.address)}`)).r, v = METRICS[rule.metric](r);
|
|
108
|
+
const hit = v != null && (rule.op === "<" ? v < rule.value : v > rule.value);
|
|
109
|
+
const fmt = (x) => x == null ? NA : ["liq", "mcap", "vol", "price"].includes(rule.metric) ? usd(x) : rule.metric === "score" ? String(x) : pct(x);
|
|
110
|
+
return `${r.q.symbol || a.address} ${rule.metric} is ${fmt(v)} (rule ${rule.metric}${rule.op}${fmt(rule.value)}): ${hit ? "TRIGGERED" : "not triggered"}.`;
|
|
111
|
+
}
|
|
112
|
+
throw new Error("Unknown tool: " + name);
|
|
113
|
+
}
|
|
114
|
+
function mcp() {
|
|
115
|
+
let buf = "";
|
|
116
|
+
const out = (msg) => process.stdout.write(JSON.stringify(msg) + "\n");
|
|
117
|
+
process.stdin.setEncoding("utf8");
|
|
118
|
+
process.stdin.on("data", (d) => { buf += d; let i; while ((i = buf.indexOf("\n")) >= 0) { const line = buf.slice(0, i).trim(); buf = buf.slice(i + 1); if (line) handle(line); } });
|
|
119
|
+
async function handle(line) {
|
|
120
|
+
let m; try { m = JSON.parse(line); } catch { return out({ jsonrpc: "2.0", id: null, error: { code: -32700, message: "Parse error" } }); }
|
|
121
|
+
const { id, method, params = {} } = m; if (id === undefined) return; // notifications need no answer
|
|
122
|
+
try {
|
|
123
|
+
if (method === "initialize") return out({ jsonrpc: "2.0", id, result: { protocolVersion: params.protocolVersion || "2025-06-18", capabilities: { tools: {} }, serverInfo: { name: "aethercore", version: VERSION }, instructions: "AETHER-CORE on-chain intelligence. Use aether_scan for any token contract a user mentions, aether_macro for market context, aether_flow for wallet or sector flow. Quote numbers exactly as returned; never invent missing values." } });
|
|
124
|
+
if (method === "ping") return out({ jsonrpc: "2.0", id, result: {} });
|
|
125
|
+
if (method === "tools/list") return out({ jsonrpc: "2.0", id, result: { tools: TOOLS } });
|
|
126
|
+
if (method === "tools/call") { try { const text = await runTool(params.name, params.arguments || {}); return out({ jsonrpc: "2.0", id, result: { content: [{ type: "text", text }] } }); } catch (e) { return out({ jsonrpc: "2.0", id, result: { content: [{ type: "text", text: "AETHER error: " + e.message }], isError: true } }); } }
|
|
127
|
+
return out({ jsonrpc: "2.0", id, error: { code: -32601, message: "Method not found: " + method } });
|
|
128
|
+
} catch (e) { out({ jsonrpc: "2.0", id, error: { code: -32603, message: e.message } }); }
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// ---------- CLI ----------
|
|
133
|
+
const HELP = `${bold("AETHER-CORE")} ${dim("v" + VERSION)} · on-chain intelligence for Solana, Base, Ethereum and Robinhood Chain
|
|
134
|
+
|
|
135
|
+
aethercore scan <contract> [--chain c] [--json] four-agent TELEMETRY LOG
|
|
136
|
+
aethercore forensics <contract> contract security and holders
|
|
137
|
+
aethercore flow <contract | sector> wallet flow, or a sector's capital flow
|
|
138
|
+
aethercore macro regime, sector rotation, trending pools
|
|
139
|
+
aethercore watch <contract> <rule> [--every 120] re-check a rule: liq<250k, top10>30, score<40
|
|
140
|
+
aethercore mcp MCP server for Claude, Cursor and other agents
|
|
141
|
+
aethercore mcp setup how to add it to your agent
|
|
142
|
+
|
|
143
|
+
API: ${API} (override with AETHER_API)
|
|
144
|
+
Research output only. Not financial advice.`;
|
|
145
|
+
async function main(argv) {
|
|
146
|
+
const args = argv.filter((a) => !a.startsWith("--")), flag = (n) => { const i = argv.indexOf("--" + n); return i >= 0 ? (argv[i + 1] && !argv[i + 1].startsWith("--") ? argv[i + 1] : true) : null; };
|
|
147
|
+
const [cmd, a1, a2] = args;
|
|
148
|
+
if (!cmd || cmd === "help" || flag("help")) return console.log(HELP);
|
|
149
|
+
if (cmd === "version" || flag("version")) return console.log(VERSION);
|
|
150
|
+
if (cmd === "mcp") {
|
|
151
|
+
if (a1 === "setup") return console.log(`${bold("Claude Code")}\n claude mcp add aether -- npx -y aethercore-cli mcp\n\n${bold("Claude Desktop, Cursor, Windsurf")} (mcpServers in the client's config)\n "aether": { "command": "npx", "args": ["-y", "aethercore-cli", "mcp"] }\n\nTools: ${TOOLS.map((t) => t.name).join(", ")}`);
|
|
152
|
+
return mcp();
|
|
153
|
+
}
|
|
154
|
+
if (cmd === "scan" || cmd === "forensics") {
|
|
155
|
+
if (!a1 || !isAddr(a1)) throw new Error(`Usage: aethercore ${cmd} <contract address>`);
|
|
156
|
+
const j = await scan(a1, cmd, flag("chain") || ""); return console.log(flag("json") ? JSON.stringify(j, null, 2) : paint(telemetry(j, cmd)));
|
|
157
|
+
}
|
|
158
|
+
if (cmd === "flow") {
|
|
159
|
+
const t = args.slice(1).join(" "); if (!t) throw new Error("Usage: aethercore flow <contract | sector>");
|
|
160
|
+
if (isAddr(t)) { const j = await scan(t, "flow"); return console.log(flag("json") ? JSON.stringify(j, null, 2) : paint(telemetry(j, "flow"))); }
|
|
161
|
+
const j = await call(`/api/flow?sector=${encodeURIComponent(t)}`); return console.log(flag("json") ? JSON.stringify(j, null, 2) : sectorText(j.s));
|
|
162
|
+
}
|
|
163
|
+
if (cmd === "macro") { const m = await call("/api/macro"); return console.log(flag("json") ? JSON.stringify(m, null, 2) : macroText(m)); }
|
|
164
|
+
if (cmd === "watch") {
|
|
165
|
+
const rule = parseRule(a2); if (!a1 || !isAddr(a1) || !rule) throw new Error("Usage: aethercore watch <contract> <rule> e.g. liq<250k, top10>30, score<40");
|
|
166
|
+
const every = Math.max(60, Number(flag("every")) || 120);
|
|
167
|
+
console.log(dim(`Watching ${a1} for ${rule.metric}${rule.op}${rule.value}, every ${every}s. Ctrl+C to stop.`));
|
|
168
|
+
for (;;) {
|
|
169
|
+
const text = await runTool("aether_watch_check", { address: a1, rule: a2 });
|
|
170
|
+
console.log(`${new Date().toLocaleTimeString()} ${/TRIGGERED/.test(text) ? yellow(bold(text)) : text}`);
|
|
171
|
+
if (/TRIGGERED/.test(text)) { process.stdout.write("\x07"); return; }
|
|
172
|
+
await new Promise((r) => setTimeout(r, every * 1000));
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
throw new Error(`Unknown command "${cmd}". Run aethercore help.`);
|
|
176
|
+
}
|
|
177
|
+
main(process.argv.slice(2)).catch((e) => { console.error(red("✗ ") + e.message); process.exit(1); });
|
package/package.json
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aethercore-cli",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "AETHER-CORE on-chain intelligence from your terminal and your AI agent (MCP): four-agent token scans for Solana, Base, Ethereum and Robinhood Chain.",
|
|
5
|
+
"bin": { "aethercore": "bin/aethercore.js" },
|
|
6
|
+
"files": ["bin/", "README.md", "LICENSE"],
|
|
7
|
+
"engines": { "node": ">=18" },
|
|
8
|
+
"keywords": ["crypto", "onchain", "token-scanner", "rug-check", "mcp", "ai-agent", "solana", "base", "ethereum", "robinhood-chain"],
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"repository": { "type": "git", "url": "git+https://github.com/aethercore-ai/aether.git", "directory": "cli" },
|
|
11
|
+
"homepage": "https://aethercoreai.xyz"
|
|
12
|
+
}
|