agendex-cli 0.9.1 → 0.10.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.
Files changed (3) hide show
  1. package/README.md +10 -2
  2. package/dist/cli.js +23 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # `agendex-cli`
2
2
 
3
- Node-compatible Agendex CLI for browser login, one-shot sync, daemon supervision, status checks, and daemon cleanup.
3
+ Node-compatible Agendex CLI for browser login, opening the web app, one-shot sync, daemon supervision, status checks, and daemon cleanup.
4
4
 
5
5
  ## Install
6
6
 
@@ -16,6 +16,8 @@ bun install -g agendex-cli
16
16
  ```bash
17
17
  agendex login # Authenticate via browser OAuth (agendex.dev)
18
18
  agendex login --url <url> # Login to a self-hosted instance
19
+ agendex open # Open the Agendex web app in your default browser
20
+ agendex open --url <url> # Open a self-hosted deployment
19
21
  agendex logout # Clear stored cloud token
20
22
  agendex configure # Select which agents/adapters to index
21
23
  agendex start # Start daemon (backgrounds itself)
@@ -86,7 +88,7 @@ Before running `start`, `configure`, or `sync`, the CLI checks for a newer publi
86
88
  [agendex] run: npm i -g agendex-cli
87
89
  ```
88
90
 
89
- The check is skipped for `stop`, `status`, `login`, `logout`, `cleanup`, and `help`.
91
+ The check is skipped for `stop`, `status`, `login`, `logout`, `open`, `cleanup`, and `help`.
90
92
 
91
93
  ## Supported Runtime
92
94
 
@@ -106,3 +108,9 @@ agendex login --url https://agendex.yourdomain.com
106
108
  This opens your deployment's OAuth flow and stores the returned `cloudToken` and `convexUrl` in your active config directory (`~/.agendex/config.json` for prod, `~/.agendex-dev/config.json` when using `--dev` or `AGENDEX_DEV=1`).
107
109
 
108
110
  The target can also be set via `AGENDEX_SITE_URL` env var. For local development against the default dev app URL, use `agendex login --dev` or set `AGENDEX_DEV=1` (see [Dev vs prod](#dev-vs-prod-config-directory) above).
111
+
112
+ ## Open the web app
113
+
114
+ `agendex open` launches your default browser to the same base URL as the default login target (`https://app.agendex.dev` in prod, or the local EE dev URL when using `--dev` / `AGENDEX_DEV=1`). Override with `agendex open --url <url>` or `AGENDEX_SITE_URL`.
115
+
116
+ If launching the browser is undesirable (for example in CI), set `AGENDEX_DISABLE_BROWSER=1`; the CLI still prints the URL to visit.
package/dist/cli.js CHANGED
@@ -3409,7 +3409,7 @@ import { join as join12 } from "node:path";
3409
3409
  // package.json
3410
3410
  var package_default = {
3411
3411
  name: "agendex-cli",
3412
- version: "0.9.1",
3412
+ version: "0.10.0",
3413
3413
  description: "Agendex CLI for login, sync, and daemon workflows",
3414
3414
  homepage: "https://github.com/Tyru5/Agendex#readme",
3415
3415
  repository: {
@@ -3519,6 +3519,19 @@ function isNewer(latest, current) {
3519
3519
  return false;
3520
3520
  }
3521
3521
 
3522
+ // src/web.ts
3523
+ async function openAgendexWeb(siteUrlOverride) {
3524
+ const base = siteUrlOverride ?? getDefaultSiteUrl();
3525
+ const url = base.replace(/\/$/, "");
3526
+ console.log("[agendex] Opening Agendex in your browser...");
3527
+ console.log(`[agendex] If it doesn't open, visit: ${url}`);
3528
+ if (process.env.AGENDEX_DISABLE_BROWSER === "1") {
3529
+ console.log("[agendex] Browser launch disabled by AGENDEX_DISABLE_BROWSER=1.");
3530
+ } else {
3531
+ openBrowser(url);
3532
+ }
3533
+ }
3534
+
3522
3535
  // src/cli.ts
3523
3536
  var args = process.argv.slice(2);
3524
3537
  var devFlag = args.includes("--dev");
@@ -3545,6 +3558,7 @@ async function main() {
3545
3558
  "status",
3546
3559
  "login",
3547
3560
  "logout",
3561
+ "open",
3548
3562
  "cleanup",
3549
3563
  "help",
3550
3564
  "--help",
@@ -3559,6 +3573,12 @@ async function main() {
3559
3573
  }
3560
3574
  }
3561
3575
  switch (command) {
3576
+ case "open": {
3577
+ const urlIdx = args.indexOf("--url");
3578
+ const siteUrl = urlIdx !== -1 ? args[urlIdx + 1] : undefined;
3579
+ await openAgendexWeb(siteUrl);
3580
+ return 0;
3581
+ }
3562
3582
  case "start": {
3563
3583
  if (args.includes("--daemon")) {
3564
3584
  await startSupervisor();
@@ -3760,6 +3780,8 @@ Usage:
3760
3780
  agendex stop Stop the running daemon
3761
3781
  agendex login Authenticate via browser OAuth (agendex.dev)
3762
3782
  agendex login --url <url> Login to a self-hosted instance
3783
+ agendex open Open the Agendex web app in your browser
3784
+ agendex open --url <url> Open a self-hosted instance
3763
3785
  agendex logout Clear stored cloud token
3764
3786
  agendex configure Select which agents/adapters to index
3765
3787
  agendex sync One-shot scan + sync to cloud (skips unchanged plans)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agendex-cli",
3
- "version": "0.9.1",
3
+ "version": "0.10.0",
4
4
  "description": "Agendex CLI for login, sync, and daemon workflows",
5
5
  "homepage": "https://github.com/Tyru5/Agendex#readme",
6
6
  "repository": {