@ametyst/cli 0.2.0 → 0.2.2

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/dist/index.js +9 -6
  2. package/package.json +7 -4
package/dist/index.js CHANGED
@@ -106210,12 +106210,13 @@ function ensureDirectories() {
106210
106210
  if (!existsSync(AMETYST_DIR)) mkdirSync(AMETYST_DIR, { mode: 448 });
106211
106211
  if (!existsSync(WALLETS_DIR)) mkdirSync(WALLETS_DIR, { mode: 448 });
106212
106212
  }
106213
- var AMETYST_DIR, CONFIG_PATH, CREDENTIALS_ENC_PATH, WALLETS_DIR;
106213
+ var ENV_SUFFIX, AMETYST_DIR, CONFIG_PATH, CREDENTIALS_ENC_PATH, WALLETS_DIR;
106214
106214
  var init_paths = __esm({
106215
106215
  "src/config/paths.ts"() {
106216
106216
  "use strict";
106217
106217
  init_esm_shims();
106218
- AMETYST_DIR = join(homedir(), ".ametyst");
106218
+ ENV_SUFFIX = false ? "-staging" : "";
106219
+ AMETYST_DIR = join(homedir(), `.ametyst${ENV_SUFFIX}`);
106219
106220
  CONFIG_PATH = join(AMETYST_DIR, "config.json");
106220
106221
  CREDENTIALS_ENC_PATH = join(AMETYST_DIR, "credentials.enc");
106221
106222
  WALLETS_DIR = join(AMETYST_DIR, "wallets");
@@ -111517,8 +111518,10 @@ import {
111517
111518
  import { homedir as homedir2 } from "os";
111518
111519
  import { basename, dirname as dirname2, join as join2 } from "path";
111519
111520
  var CLAUDE_CODE_CONFIG_PATH = join2(homedir2(), ".claude.json");
111521
+ var AMETYST_MCP_COMMAND = process.argv[1] || "ametyst";
111522
+ var AMETYST_MCP_NAME = false ? "ametyst-staging" : "ametyst";
111520
111523
  var AMETYST_MCP_ENTRY = {
111521
- command: "ametyst",
111524
+ command: AMETYST_MCP_COMMAND,
111522
111525
  args: ["serve"]
111523
111526
  };
111524
111527
  var MAX_BACKUPS = 3;
@@ -111557,7 +111560,7 @@ function addAmetystMcpEntry() {
111557
111560
  if (!config.mcpServers || typeof config.mcpServers !== "object") {
111558
111561
  config.mcpServers = {};
111559
111562
  }
111560
- config.mcpServers.ametyst = AMETYST_MCP_ENTRY;
111563
+ config.mcpServers[AMETYST_MCP_NAME] = AMETYST_MCP_ENTRY;
111561
111564
  writeConfig(config);
111562
111565
  }
111563
111566
  function removeAmetystMcpEntry() {
@@ -111565,7 +111568,7 @@ function removeAmetystMcpEntry() {
111565
111568
  backupIfExists();
111566
111569
  const config = readConfig();
111567
111570
  if (config.mcpServers && typeof config.mcpServers === "object") {
111568
- delete config.mcpServers.ametyst;
111571
+ delete config.mcpServers[AMETYST_MCP_NAME];
111569
111572
  }
111570
111573
  writeConfig(config);
111571
111574
  }
@@ -113853,7 +113856,7 @@ async function statusCommand() {
113853
113856
  }
113854
113857
 
113855
113858
  // src/index.ts
113856
- var CLI_VERSION = true ? "0.2.0" : "0.0.0-dev";
113859
+ var CLI_VERSION = true ? "0.2.2" : "0.0.0-dev";
113857
113860
  var program2 = new Command();
113858
113861
  program2.name("ametyst").description("Ametyst CLI \u2014 local wallet + MCP server for agents").version(CLI_VERSION);
113859
113862
  program2.command("login").description("Validate API key, store it securely, and register Ametyst MCP in Claude Code").option("--api-key <key>", "API key from /join page").action(loginCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ametyst/cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "private": false,
5
5
  "description": "Ametyst CLI — embedded MCP server, wallet ops, agent payments",
6
6
  "type": "module",
@@ -14,6 +14,9 @@
14
14
  "index.d.ts",
15
15
  "native"
16
16
  ],
17
+ "imports": {
18
+ "#sdk": "@ametyst-dev/sdk-prod"
19
+ },
17
20
  "engines": {
18
21
  "node": ">=20",
19
22
  "pnpm": ">=9"
@@ -57,9 +60,9 @@
57
60
  "registry": "https://registry.npmjs.org"
58
61
  },
59
62
  "optionalDependencies": {
60
- "@ametyst/cli-darwin-arm64": "0.2.0",
61
- "@ametyst/cli-darwin-x64": "0.2.0",
62
- "@ametyst/cli-linux-x64-gnu": "0.2.0"
63
+ "@ametyst/cli-darwin-arm64": "0.2.2",
64
+ "@ametyst/cli-darwin-x64": "0.2.2",
65
+ "@ametyst/cli-linux-x64-gnu": "0.2.2"
63
66
  },
64
67
  "scripts": {
65
68
  "build:native": "cd native && cargo build --release && napi build --release",