@akms/mcp-ssh 0.1.3 → 0.1.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/lib/cli.js CHANGED
@@ -26,7 +26,7 @@ var CWD_MARKER = "__AKMS_SSH_CWD__";
26
26
  var MAX_DIRECTORY_ENTRIES = 1e3;
27
27
  var SERVER_NAME = "akms-mcp-ssh";
28
28
  var PACKAGE_NAME = "@akms/mcp-ssh";
29
- var SERVER_VERSION = "0.1.3";
29
+ var SERVER_VERSION = "0.1.5";
30
30
 
31
31
  // src/_defs/command-rules.ts
32
32
  var CRITICAL_PATH_PATTERN = new RegExp(
@@ -4825,7 +4825,7 @@ async function manageHost(prompter, output, target, entries, name) {
4825
4825
  }
4826
4826
  }
4827
4827
  }
4828
- async function runSetupCommand(options) {
4828
+ async function runConfigCommand(options) {
4829
4829
  const { input, output } = options;
4830
4830
  const targets = options.targets ?? listConfigTargets();
4831
4831
  let target = targets[0];
@@ -5635,12 +5635,11 @@ function createSshMcpServer() {
5635
5635
  }
5636
5636
 
5637
5637
  // src/cli.ts
5638
- var SETUP_COMMAND_NAMES = ["setup", "config"];
5639
5638
  function parseArguments(argv) {
5640
- const parsed = { showHelp: false, showVersion: false, checkOnly: false, setupMode: false };
5639
+ const parsed = { showHelp: false, showVersion: false, checkOnly: false, configMode: false };
5641
5640
  let rest = argv;
5642
- if (argv[0] != null && SETUP_COMMAND_NAMES.includes(argv[0]) == true) {
5643
- parsed.setupMode = true;
5641
+ if (argv[0] === "config") {
5642
+ parsed.configMode = true;
5644
5643
  rest = argv.slice(1);
5645
5644
  }
5646
5645
  for (let index = 0; index < rest.length; index += 1) {
@@ -5674,17 +5673,17 @@ var HELP_TEXT = [
5674
5673
  "",
5675
5674
  "Usage:",
5676
5675
  " akms-mcp-ssh [--check]",
5677
- " akms-mcp-ssh setup [--target <client>]",
5676
+ " akms-mcp-ssh config [--target <client>]",
5678
5677
  "",
5679
5678
  "Commands:",
5680
- " setup Manage the SSH hosts registered in an MCP client's config \u2014",
5679
+ " config Manage the SSH hosts registered in an MCP client's config \u2014",
5681
5680
  " list, add, edit, remove, check, print. Asks plain questions,",
5682
5681
  " so the SSH_* names below never have to be typed.",
5683
5682
  "",
5684
5683
  "Options:",
5685
5684
  " --check Connect to the configured host, report the result, and exit.",
5686
5685
  " Prints the host key fingerprint so it can be pinned.",
5687
- " --target <id> setup: claude-code | codex | claude-desktop | cursor",
5686
+ " --target <id> config: claude-code | codex | claude-desktop | cursor",
5688
5687
  " (default: the first one installed)",
5689
5688
  " -v, --version Print the version and exit",
5690
5689
  " -h, --help Print this help and exit",
@@ -5718,7 +5717,7 @@ var HELP_TEXT = [
5718
5717
  ].join("\n");
5719
5718
  async function runCheckCommand(profile) {
5720
5719
  if (profile == null) {
5721
- process.stdout.write(`No SSH host is registered \u2014 set ${SINGLE_HOST_ENV.HOST} and ${SINGLE_HOST_ENV.USER}, or run: akms-mcp-ssh setup
5720
+ process.stdout.write(`No SSH host is registered \u2014 set ${SINGLE_HOST_ENV.HOST} and ${SINGLE_HOST_ENV.USER}, or run: akms-mcp-ssh config
5722
5721
  `);
5723
5722
  return 1;
5724
5723
  }
@@ -5730,6 +5729,11 @@ async function runCheckCommand(profile) {
5730
5729
  }
5731
5730
  async function main() {
5732
5731
  const _logger = $logger.child({ context: "cli" });
5732
+ if (process.argv[2] === "setup") {
5733
+ process.stderr.write("The setup command has been removed. Use akms-mcp-ssh config.\n");
5734
+ process.exitCode = 1;
5735
+ return;
5736
+ }
5733
5737
  const cliArguments = parseArguments(process.argv.slice(2));
5734
5738
  if (cliArguments.showHelp == true) {
5735
5739
  process.stderr.write(`${HELP_TEXT}
@@ -5741,11 +5745,11 @@ async function main() {
5741
5745
  `);
5742
5746
  return;
5743
5747
  }
5744
- if (cliArguments.setupMode == true) {
5748
+ if (cliArguments.configMode == true) {
5745
5749
  if (process.env[LOG_LEVEL_ENV] == null) {
5746
5750
  process.env[LOG_LEVEL_ENV] = "warn";
5747
5751
  }
5748
- const exitCode = await runSetupCommand({
5752
+ const exitCode = await runConfigCommand({
5749
5753
  input: process.stdin,
5750
5754
  output: process.stdout,
5751
5755
  targetId: cliArguments.targetId