@hemansubedi/aether-ai 1.0.1 → 1.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/dist/index.js +3 -1
- package/package.json +3 -1
- package/src/index.ts +82 -80
package/dist/index.js
CHANGED
|
@@ -169,7 +169,9 @@ import { GitTool } from "./git.js";
|
|
|
169
169
|
import { Checkpoint } from "./checkpoint.js";
|
|
170
170
|
import { Skills } from "./skills.js";
|
|
171
171
|
// CLI entrypoint
|
|
172
|
-
|
|
172
|
+
import { createRequire } from "node:module";
|
|
173
|
+
const require = createRequire(import.meta.url);
|
|
174
|
+
const VERSION = require("../package.json").version;
|
|
173
175
|
function getHelpText() {
|
|
174
176
|
const lines = [];
|
|
175
177
|
lines.push("Aether - the free, unlimited, multi-provider LLM CLI");
|
package/package.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hemansubedi/aether-ai",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "The Aether CLI: the free, unlimited, multi-provider LLM CLI - install like KiloCode, run like Claude Code.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"bin": {
|
|
8
|
+
"aether": "dist/index.js",
|
|
8
9
|
"aether-ai": "dist/index.js",
|
|
10
|
+
"aether-server": "dist/server.js",
|
|
9
11
|
"aether-ai-server": "dist/server.js"
|
|
10
12
|
},
|
|
11
13
|
"scripts": {
|
package/src/index.ts
CHANGED
|
@@ -178,86 +178,88 @@ import { GitTool } from "./git.js";
|
|
|
178
178
|
import { Checkpoint } from "./checkpoint.js";
|
|
179
179
|
import { Skills } from "./skills.js";
|
|
180
180
|
|
|
181
|
-
// CLI entrypoint
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
lines
|
|
188
|
-
lines.push("
|
|
189
|
-
lines.push("");
|
|
190
|
-
lines.push("
|
|
191
|
-
lines.push("
|
|
192
|
-
lines.push("
|
|
193
|
-
lines.push(" --
|
|
194
|
-
lines.push(" --
|
|
195
|
-
lines.push(" --
|
|
196
|
-
lines.push("");
|
|
197
|
-
lines.push("
|
|
198
|
-
lines.push("
|
|
199
|
-
lines.push("
|
|
200
|
-
lines.push(" /
|
|
201
|
-
lines.push(" /
|
|
202
|
-
lines.push(" /
|
|
203
|
-
lines.push(" /
|
|
204
|
-
lines.push(" /
|
|
205
|
-
lines.push(" /
|
|
206
|
-
lines.push(" /
|
|
207
|
-
lines.push(" /
|
|
208
|
-
lines.push(" /
|
|
209
|
-
lines.push(" /
|
|
210
|
-
lines.push(" /
|
|
211
|
-
lines.push("");
|
|
212
|
-
lines.push("
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
const
|
|
223
|
-
if (
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
const
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
modeFlag = "
|
|
247
|
-
} else if (arg === "--
|
|
248
|
-
|
|
249
|
-
} else if (arg === "--
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
process.
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
181
|
+
// CLI entrypoint
|
|
182
|
+
import { createRequire } from "node:module";
|
|
183
|
+
const require = createRequire(import.meta.url);
|
|
184
|
+
const VERSION: string = require("../package.json").version;
|
|
185
|
+
|
|
186
|
+
function getHelpText() {
|
|
187
|
+
const lines = [];
|
|
188
|
+
lines.push("Aether - the free, unlimited, multi-provider LLM CLI");
|
|
189
|
+
lines.push("");
|
|
190
|
+
lines.push("Usage: aether-ai [options] [prompt]");
|
|
191
|
+
lines.push("");
|
|
192
|
+
lines.push("Options:");
|
|
193
|
+
lines.push(" -h, --help Show this help text and exit");
|
|
194
|
+
lines.push(" -v, --version Print the version and exit");
|
|
195
|
+
lines.push(" --plan Run in plan mode (step-by-step approval)");
|
|
196
|
+
lines.push(" --yolo Run in yolo mode (autonomous execution)");
|
|
197
|
+
lines.push(" --no-stream Disable streaming output in one-shot mode");
|
|
198
|
+
lines.push("");
|
|
199
|
+
lines.push("Commands (prefix a prompt with /):");
|
|
200
|
+
lines.push(" /help Show all available commands");
|
|
201
|
+
lines.push(" /model <name> Switch the active model");
|
|
202
|
+
lines.push(" /provider <name> Switch the active provider");
|
|
203
|
+
lines.push(" /models List all available models across providers");
|
|
204
|
+
lines.push(" /providers Show provider health status");
|
|
205
|
+
lines.push(" /combo ... Manage named provider/model combos");
|
|
206
|
+
lines.push(" /session ... Manage sessions");
|
|
207
|
+
lines.push(" /arena Enter arena mode (compare models)");
|
|
208
|
+
lines.push(" /cost Show token usage and estimated cost summary");
|
|
209
|
+
lines.push(" /stats Show session stats, cost summary, and provider health");
|
|
210
|
+
lines.push(" /skills List available custom skills");
|
|
211
|
+
lines.push(" /connect ... Connect an API key for a provider");
|
|
212
|
+
lines.push(" /exit Exit the TUI");
|
|
213
|
+
lines.push("");
|
|
214
|
+
lines.push("When no prompt is given, Aether starts an interactive TUI.");
|
|
215
|
+
return lines.join("\n");
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
function isMainModule() {
|
|
219
|
+
// Robust across tsx/Node and Windows path formatting. The compiled bin is
|
|
220
|
+
// dist/index.js; tsx may also hand us src/index.ts directly.
|
|
221
|
+
const self = import.meta.url.replace(/\/$/g, "");
|
|
222
|
+
const argv1 = "file://" + path.resolve(process.argv[1] ?? "");
|
|
223
|
+
if (self === argv1) return true;
|
|
224
|
+
const binNames = ["dist/index.js", "src/index.ts"];
|
|
225
|
+
if (binNames.includes(path.basename(process.argv[1] ?? ""))) return true;
|
|
226
|
+
// Also match when invoked via tsx where argv may be a .ts source file.
|
|
227
|
+
try {
|
|
228
|
+
const selfPath = new URL(self).pathname;
|
|
229
|
+
const argvPath = path.resolve(process.argv[1] ?? "");
|
|
230
|
+
const norm = (p: string) => p.toLowerCase().replace(/\\/g, "/").replace(/^\//, "");
|
|
231
|
+
if (norm(selfPath) === norm(argvPath)) return true;
|
|
232
|
+
} catch {
|
|
233
|
+
// ignore
|
|
234
|
+
}
|
|
235
|
+
return false;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
if (isMainModule()) {
|
|
239
|
+
// Parse CLI flags: --plan, --yolo, --no-stream, --version and --help are
|
|
240
|
+
// consumed here and stripped from the prompt args.
|
|
241
|
+
let modeFlag = null;
|
|
242
|
+
let noStream = false;
|
|
243
|
+
const promptArgs = [];
|
|
244
|
+
for (const arg of process.argv.slice(2)) {
|
|
245
|
+
if (arg === "--plan") {
|
|
246
|
+
modeFlag = "plan";
|
|
247
|
+
} else if (arg === "--yolo") {
|
|
248
|
+
modeFlag = "yolo";
|
|
249
|
+
} else if (arg === "--no-stream") {
|
|
250
|
+
noStream = true;
|
|
251
|
+
} else if (arg === "--version" || arg === "-v") {
|
|
252
|
+
process.stdout.write("aether-ai " + VERSION + "\n");
|
|
253
|
+
process.exit(0);
|
|
254
|
+
} else if (arg === "--help" || arg === "-h") {
|
|
255
|
+
process.stdout.write(getHelpText() + "\n");
|
|
256
|
+
process.exit(0);
|
|
257
|
+
} else {
|
|
258
|
+
promptArgs.push(arg);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
const prompt = promptArgs.join(" ").trim();
|
|
262
|
+
|
|
261
263
|
if (!prompt) {
|
|
262
264
|
// Interactive TUI mode.
|
|
263
265
|
const { tui } = createTUIContext();
|