@screenpipe-ui/tui 0.1.1 → 0.1.2

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/README.md CHANGED
@@ -28,7 +28,10 @@ bunx @screenpipe-ui/tui
28
28
 
29
29
  ## Configuration
30
30
 
31
- Connects to `http://localhost:3030` by default. Set `SCREENPIPE_BASE_URL` to override.
31
+ Connects to `http://localhost:3030` by default. Override with:
32
+
33
+ - `--url <url>` — e.g. `bunx @screenpipe-ui/tui --url http://custom:3030`
34
+ - `SCREENPIPE_BASE_URL` — environment variable
32
35
 
33
36
  ## License
34
37
 
package/dist/index.js CHANGED
@@ -385,9 +385,12 @@ function StatusBar({ client }) {
385
385
  // src/app.tsx
386
386
  import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
387
387
  var TABS = ["Search", "Timeline", "Meetings"];
388
- function App() {
388
+ function App({ baseUrl }) {
389
389
  const app = useApp();
390
- const client = useMemo(() => createClient(), []);
390
+ const client = useMemo(
391
+ () => createClient(baseUrl ? { baseUrl } : void 0),
392
+ [baseUrl]
393
+ );
391
394
  const [activeTab, setActiveTab] = useState4("Search");
392
395
  useInput4((input, key) => {
393
396
  if (input === "q" && !key.ctrl) {
@@ -425,7 +428,15 @@ function App() {
425
428
  ] });
426
429
  }
427
430
 
431
+ // src/get-base-url.ts
432
+ var DEFAULT = "http://localhost:3030";
433
+ function getBaseUrl(argv = process.argv, env = process.env) {
434
+ const idx = argv.indexOf("--url");
435
+ if (idx !== -1 && argv[idx + 1]) return argv[idx + 1];
436
+ return env.SCREENPIPE_BASE_URL || DEFAULT;
437
+ }
438
+
428
439
  // src/index.tsx
429
440
  import { jsx as jsx7 } from "react/jsx-runtime";
430
- var { waitUntilExit } = render(/* @__PURE__ */ jsx7(App, {}));
441
+ var { waitUntilExit } = render(/* @__PURE__ */ jsx7(App, { baseUrl: getBaseUrl() }));
431
442
  await waitUntilExit();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@screenpipe-ui/tui",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "bin": {
@@ -21,8 +21,8 @@
21
21
  "access": "public"
22
22
  },
23
23
  "dependencies": {
24
- "@screenpipe-ui/core": "workspace:*",
25
- "@screenpipe-ui/react": "workspace:*",
24
+ "@screenpipe-ui/core": "0.1.0",
25
+ "@screenpipe-ui/react": "0.1.0",
26
26
  "ink": "^5.1.0",
27
27
  "ink-text-input": "^6.0.0",
28
28
  "ink-spinner": "^5.0.0",