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