Skip to content

Commit cd916ff

Browse files
committed
fix: replace sidecar with npx agentlytics spawn, add --no-open flag and xattr note
1 parent bbd787b commit cd916ff

File tree

6 files changed

+25
-16
lines changed

6 files changed

+25
-16
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ Download the native desktop app (no Node.js required):
5656

5757
Built with [Tauri](https://tauri.app) — lightweight, fast, runs entirely on your machine.
5858

59+
> **macOS:** If the app won't open, clear the quarantine flag first:
60+
> ```bash
61+
> xattr -cr /Applications/Agentlytics.app
62+
> ```
63+
5964
```
6065
$ npx agentlytics
6166

docs/index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,11 @@ <h3 class="text-white font-semibold text-sm mb-1">Linux</h3>
472472
</a>
473473
</div>
474474

475-
<p class="text-center mt-8 text-xs text-gray-500">Or install via CLI: <code class="text-indigo-400/80">npx agentlytics</code> &mdash; no download needed.</p>
475+
<div class="mt-8 max-w-lg mx-auto rounded-lg border border-amber-500/20 bg-amber-500/5 p-4 text-center">
476+
<p class="text-xs text-amber-400/90 mb-2"><strong>macOS users:</strong> If the app won't open, run this first:</p>
477+
<code class="font-mono text-xs text-white">xattr -cr /Applications/Agentlytics.app</code>
478+
</div>
479+
<p class="text-center mt-4 text-xs text-gray-500">Or install via CLI: <code class="text-indigo-400/80">npx agentlytics</code> &mdash; no download needed.</p>
476480
</div>
477481
</section>
478482

index.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const HOME = os.homedir();
1010
const PORT = process.env.PORT || 4637;
1111
const noCache = process.argv.includes('--no-cache');
1212
const collectOnly = process.argv.includes('--collect');
13+
const noOpen = process.argv.includes('--no-open');
1314

1415
// ── ASCII banner ─────────────────────────────────────────
1516
const c1 = chalk.hex('#818cf8'), c2 = chalk.hex('#f472b6'), c3 = chalk.hex('#34d399'), c4 = chalk.hex('#fbbf24');
@@ -174,8 +175,10 @@ const BOT_STYLES = [
174175
console.log('');
175176
console.log(chalk.dim(' Press Ctrl+C to stop\n'));
176177

177-
// Auto-open browser
178-
const open = require('open');
179-
open(url).catch(() => {});
178+
// Auto-open browser (skip when launched by Tauri)
179+
if (!noOpen) {
180+
const open = require('open');
181+
open(url).catch(() => {});
182+
}
180183
});
181184
})();

src-tauri/capabilities/default.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"allow": [
1212
{
1313
"args": true,
14-
"name": "binaries/node-backend",
15-
"sidecar": true
14+
"cmd": "npx",
15+
"name": "npx"
1616
}
1717
]
1818
}

src-tauri/src/lib.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ pub fn run() {
77
.plugin(tauri_plugin_shell::init())
88
.plugin(tauri_plugin_opener::init())
99
.setup(|app| {
10-
// Spawn the Node.js backend as a sidecar
11-
let sidecar_command = app
10+
// Spawn `npx agentlytics` in the background
11+
let command = app
1212
.shell()
13-
.sidecar("node-backend")
14-
.expect("failed to create sidecar command");
13+
.command("npx")
14+
.args(["agentlytics", "--no-open"]);
1515

16-
let (mut rx, _child) = sidecar_command
16+
let (mut rx, _child) = command
1717
.spawn()
18-
.expect("Failed to spawn node backend sidecar");
18+
.expect("Failed to spawn npx agentlytics");
1919

20-
// Log sidecar output
20+
// Log output
2121
tauri::async_runtime::spawn(async move {
2222
while let Some(event) = rx.recv().await {
2323
match event {

src-tauri/tauri.conf.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@
3636
"icons/icon.icns",
3737
"icons/icon.ico"
3838
],
39-
"externalBin": [
40-
"binaries/node-backend"
41-
],
4239
"license": "MIT"
4340
}
4441
}

0 commit comments

Comments
 (0)