peer-term 1.4.4 → 1.4.5

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
@@ -12,7 +12,7 @@ npx peer-term
12
12
 
13
13
  This will start a terminal sharing session and give you a 6-digit code.
14
14
 
15
- Share this code with your peer. They can view your terminal by going to https://relay.dhananjaybalekar.in/ and entering the code.
15
+ Share this code with your peer. They can view your terminal by going to https://peerterm.dhananjaybalekar.in/ and entering the code.
16
16
 
17
17
  ## Global Installation
18
18
 
@@ -51,6 +51,8 @@ peer-term --verbose # enable debug logging
51
51
  - **Custom Start Path**: Set the starting directory with `--path`.
52
52
  - **Resilient Connections**: Both host and client get a 2-minute rejoin window if their IP changes or connection drops. PTY state is fully preserved — no session restart needed.
53
53
  - **Multi-Session**: Manage multiple simultaneous sessions with the interactive CLI menu.
54
+ - **QR Code Support**: Displays a terminal QR code for instant connection from mobile or tablet devices without manually entering the code.
55
+ - **Interactive Controls**: Manage sessions directly from the CLI (`n` for new session, `l` to list, `k` to kill, `a` to authorize fingerprint, `q` to quit).
54
56
 
55
57
  ## How It Works
56
58
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peer-term",
3
- "version": "1.4.4",
3
+ "version": "1.4.5",
4
4
  "license": "MIT",
5
5
  "description": "Share your terminal instantly using a 6-digit code or QR code. Encrypted. No config.",
6
6
  "repository": {
package/src/index.js CHANGED
@@ -338,6 +338,12 @@ class Session {
338
338
  case 'code': {
339
339
  this.code = msg.code;
340
340
  this.hostToken = msg.hostToken || null;
341
+ const shareUrl = process.env.PEERTERM_CLIENT_URL || (
342
+ url.includes('relay.dhananjaybalekar.in')
343
+ ? 'https://peerterm.dhananjaybalekar.in'
344
+ : url.replace(/^wss:\/\//i, 'https://').replace(/^ws:\/\//i, 'http://')
345
+ );
346
+
341
347
  await printSessionBox({
342
348
  code: this.code,
343
349
  expiry: formatDuration(this.expiryMs),
@@ -345,7 +351,7 @@ class Session {
345
351
  mode: (this.readOnly ? 'Read-Only' : 'Read-Write') + (this.secureMode ? ' (Secure)' : ''),
346
352
  shell: this.shell,
347
353
  startPath: this.startPath,
348
- shareUrl: url.replace(/^wss:\/\//i, 'https://').replace(/^ws:\/\//i, 'http://')
354
+ shareUrl
349
355
  });
350
356
  if (resolve) resolve(this.code);
351
357
  break;
package/src/ui.js CHANGED
@@ -46,11 +46,11 @@ export function printBanner() {
46
46
  * @param {string} opts.mode - "Read-Write" or "Read-Only"
47
47
  * @param {string} opts.shell - Shell path (e.g. "/bin/zsh")
48
48
  * @param {string} [opts.startPath] - Starting directory for the session
49
- * @param {string} [opts.shareUrl] - URL to share (e.g. "https://peerterm.dev")
49
+ * @param {string} [opts.shareUrl] - URL to share (e.g. "https://peerterm.dhananjaybalekar.in")
50
50
  */
51
51
  export async function printSessionBox({ code, expiry, rejoinWindow, mode, shell, startPath, shareUrl }) {
52
52
  const spacedCode = code.split('').join(' ');
53
- const url = shareUrl || 'https://peerterm.dev';
53
+ const url = shareUrl || 'https://peerterm.dhananjaybalekar.in';
54
54
  const joinUrl = `${url}?code=${code}`;
55
55
 
56
56
  // Truncate long shell paths to keep box readable