claude-code-rehab 1.0.2 → 1.1.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 (2) hide show
  1. package/index.mjs +6 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -118,12 +118,15 @@ const server = createServer(async (req, res) => {
118
118
  function tryListen(port) {
119
119
  server.listen(port, "0.0.0.0", () => {
120
120
  const ips = getLocalIPs();
121
+ const url = `http://localhost:${port}`;
121
122
  console.log("\n Claude Code Rehab — Ready!\n");
122
- console.log(` Open in browser:`);
123
- console.log(` http://localhost:${port}`);
124
- ips.forEach(ip => console.log(` http://${ip}:${port}`));
123
+ console.log(` Local: ${url}`);
124
+ ips.forEach(ip => console.log(` Network: http://${ip}:${port}`));
125
125
  console.log(`\n Phone? Same WiFi, open the Network URL above.`);
126
126
  console.log("\n Ctrl+C to stop\n");
127
+ // Auto-open browser
128
+ const cmd = process.platform === "darwin" ? "open" : process.platform === "win32" ? "start" : "xdg-open";
129
+ import("child_process").then(cp => cp.exec(`${cmd} ${url}`)).catch(() => {});
127
130
  });
128
131
  server.on("error", (e) => {
129
132
  if (e.code === "EADDRINUSE" && port < PORT + 10) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-rehab",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "description": "Claude Code usage data server — connects to the Rehab dashboard",
5
5
  "type": "module",
6
6
  "bin": {