@witchpot/gmc 0.1.0 → 0.1.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.
package/CHANGELOG.md CHANGED
@@ -2,7 +2,18 @@
2
2
 
3
3
  All notable changes to the Game Market Copilot CLI will be recorded here.
4
4
 
5
- ## 0.1.0 - Unreleased
5
+ ## 0.1.2 - Unreleased
6
+
7
+ - Fixed the npm executable entrypoint so `gmc` runs correctly through npm,
8
+ Volta, and other package-manager shims.
9
+ - Added packed-tarball smoke validation for actual CLI stdout to catch silent
10
+ executable startup regressions.
11
+
12
+ ## 0.1.1 - 2026-06-01
13
+
14
+ - Updated npm package description and README introduction for public beta users.
15
+
16
+ ## 0.1.0 - 2026-06-01
6
17
 
7
18
  - Added the initial JSON-first `gmc` command set for status, schema, Steam game
8
19
  search, resolve, detail, analysis, topics, compare, benchmark, review
package/README.md CHANGED
@@ -1,30 +1,26 @@
1
1
  # Game Market Copilot CLI
2
2
 
3
- `gmc` is the JSON-first command line client for Game Market Copilot. It wraps
4
- stable `/api/v1` endpoints so Codex, Claude Code, and other agents can answer
5
- market questions from bounded API evidence instead of reading Supabase directly.
3
+ `gmc` lets you use Game Market Copilot from your terminal or coding agent to
4
+ research Steam games, compare peers, review market signals, and find relevant
5
+ showcases.
6
6
 
7
7
  ## Install
8
8
 
9
- The CLI package is published to npm with a public package and beta dist-tag. If
10
- the beta package has not been published in the current environment yet, run from
11
- this repository:
9
+ Install the beta CLI:
12
10
 
13
11
  ```bash
14
- npm run gmc -- --help
12
+ npm install -g @witchpot/gmc@beta
13
+ gmc --version
15
14
  ```
16
15
 
17
- The package name for beta distribution is `@witchpot/gmc` with the
18
- `gmc` binary. Before publishing a beta build, run:
16
+ Or run it without a global install:
19
17
 
20
18
  ```bash
21
- npm run gmc:release:check
22
- npm run gmc:publish:beta:dry-run
23
- npm run gmc:publish:beta
19
+ npx @witchpot/gmc@beta --version
24
20
  ```
25
21
 
26
- Closed-beta setup details live in
27
- [`docs/closed-beta-onboarding.md`](../../docs/closed-beta-onboarding.md).
22
+ A fuller user guide lives in
23
+ [`docs/gmc-cli-user-guide.md`](../../docs/gmc-cli-user-guide.md).
28
24
 
29
25
  Closed-beta access is controlled by GMC API credentials, not npm package
30
26
  visibility. Installing the public package does not grant access to paid or beta
package/bin/gmc.mjs CHANGED
@@ -1,50 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { isCliEntryPoint, runCliEntryPoint } from "../src/main.js";
3
+ import { runCliEntryPoint } from "../src/main.js";
4
4
 
5
- export { BOOLEAN_OPTIONS, matches, parseArgs } from "../src/args.js";
6
- export {
7
- buildLoginUrl,
8
- exchangeAuthorizationCode,
9
- extractCredentialFromTokenPayload,
10
- runBrowserLogin
11
- } from "../src/browser-login.js";
12
- export { handleLocalCommand, loadConfig, parseBaseUrl } from "../src/config.js";
13
- export {
14
- CLI_BETA_PACKAGE_NAME,
15
- CLI_PACKAGE_NAME,
16
- CLI_VERSION,
17
- PROVISIONAL_BETA_COMMANDS,
18
- SUPPORTED_BETA_COMMANDS
19
- } from "../src/constants.js";
20
- export { writeJsonError } from "../src/output.js";
21
- export { applyFieldsProjection, applyOutputProjection } from "../src/projection.js";
22
- export {
23
- buildRequest,
24
- buildRequestHeaders,
25
- createRequestUrl,
26
- filterShowcasesByDeadline
27
- } from "../src/requests.js";
28
- export {
29
- buildHttpApiError,
30
- buildNonJsonApiError,
31
- composeBenchmarkPayload,
32
- composeCampaignSignalsPayload,
33
- composeCohortEvidencePayload,
34
- composeComparePayload,
35
- composeReviewPatternsPayload,
36
- composeResolvePayload,
37
- composeShowcaseFitPayload,
38
- executeRequestPlan
39
- } from "../src/workflows.js";
40
- export {
41
- buildCliAuthStatus,
42
- enrichAuthStatusOutput,
43
- isCliEntryPoint,
44
- main,
45
- runCliEntryPoint
46
- } from "../src/main.js";
47
-
48
- if (isCliEntryPoint(import.meta.url)) {
49
- runCliEntryPoint();
50
- }
5
+ runCliEntryPoint();
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@witchpot/gmc",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "private": false,
5
- "description": "JSON-first CLI for Game Market Copilot API and agent workflows.",
5
+ "description": "Command line tools for Game Market Copilot market research.",
6
6
  "license": "UNLICENSED",
7
7
  "repository": {
8
8
  "type": "git",
@@ -14,6 +14,11 @@
14
14
  "url": "https://gamemarketcopilot.com"
15
15
  },
16
16
  "type": "module",
17
+ "main": "./src/index.js",
18
+ "exports": {
19
+ ".": "./src/index.js",
20
+ "./package.json": "./package.json"
21
+ },
17
22
  "bin": {
18
23
  "gmc": "bin/gmc.mjs"
19
24
  },
@@ -9,6 +9,7 @@ const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf8"));
9
9
 
10
10
  const requiredFiles = [
11
11
  "bin/gmc.mjs",
12
+ "src/index.js",
12
13
  "src/main.js",
13
14
  "src/requests.js",
14
15
  "src/workflows.js",
@@ -26,6 +27,7 @@ const forbiddenPatterns = [
26
27
 
27
28
  const sourceFiles = [
28
29
  "bin/gmc.mjs",
30
+ "src/index.js",
29
31
  "src/args.js",
30
32
  "src/browser-login.js",
31
33
  "src/config.js",
@@ -56,6 +58,14 @@ if (packageJson.bin?.gmc !== "bin/gmc.mjs") {
56
58
  failures.push("bin.gmc must point to bin/gmc.mjs.");
57
59
  }
58
60
 
61
+ if (packageJson.main !== "./src/index.js") {
62
+ failures.push("main must point to ./src/index.js.");
63
+ }
64
+
65
+ if (packageJson.exports?.["."] !== "./src/index.js") {
66
+ failures.push("exports['.'] must point to ./src/index.js.");
67
+ }
68
+
59
69
  for (const required of requiredFileGlobs) {
60
70
  if (!packageJson.files?.includes(required)) {
61
71
  failures.push(`package.json files must include ${required}.`);
@@ -48,8 +48,22 @@ try {
48
48
  const binName = process.platform === "win32" ? "gmc.cmd" : "gmc";
49
49
  const gmcBin = path.join(workDir, "node_modules", ".bin", binName);
50
50
  const configPath = path.join(projectDir, "config.json");
51
- run(gmcBin, ["--help"], { env: { GMC_CONFIG_PATH: configPath } });
52
- run(gmcBin, ["config", "get", "--json"], { env: { GMC_CONFIG_PATH: configPath } });
51
+ const helpResult = run(gmcBin, ["--help"], {
52
+ env: { GMC_CONFIG_PATH: configPath },
53
+ capture: true
54
+ });
55
+ if (!helpResult.stdout.includes("Game Market Copilot CLI") || !helpResult.stdout.includes("gmc --version")) {
56
+ throw new Error("Packed gmc --help did not print the expected help text");
57
+ }
58
+
59
+ const configResult = run(gmcBin, ["config", "get", "--json"], {
60
+ env: { GMC_CONFIG_PATH: configPath },
61
+ capture: true
62
+ });
63
+ const configPayload = JSON.parse(configResult.stdout);
64
+ if (configPayload?.data?.configPath !== configPath || configPayload?.data?.authMode !== "anonymous") {
65
+ throw new Error("Packed gmc config get --json did not print the expected config payload");
66
+ }
53
67
  } finally {
54
68
  rmSync(workDir, { recursive: true, force: true });
55
69
  }
package/src/constants.js CHANGED
@@ -8,7 +8,7 @@ export const EXIT_API = 4;
8
8
 
9
9
  export const CLI_PACKAGE_NAME = "@witchpot/gmc";
10
10
  export const CLI_BETA_PACKAGE_NAME = "@witchpot/gmc";
11
- export const CLI_VERSION = "0.1.0";
11
+ export const CLI_VERSION = "0.1.2";
12
12
 
13
13
  export const DEFAULT_API_BASE_URL = "https://gamemarketcopilot.com";
14
14
  export const DEFAULT_CONFIG_PATH = path.join(homedir(), ".config", "gmc", "config.json");
package/src/index.js ADDED
@@ -0,0 +1,41 @@
1
+ export { BOOLEAN_OPTIONS, matches, parseArgs } from "./args.js";
2
+ export {
3
+ buildLoginUrl,
4
+ exchangeAuthorizationCode,
5
+ extractCredentialFromTokenPayload,
6
+ runBrowserLogin
7
+ } from "./browser-login.js";
8
+ export { handleLocalCommand, loadConfig, parseBaseUrl } from "./config.js";
9
+ export {
10
+ CLI_BETA_PACKAGE_NAME,
11
+ CLI_PACKAGE_NAME,
12
+ CLI_VERSION,
13
+ PROVISIONAL_BETA_COMMANDS,
14
+ SUPPORTED_BETA_COMMANDS
15
+ } from "./constants.js";
16
+ export { writeJsonError } from "./output.js";
17
+ export { applyFieldsProjection, applyOutputProjection } from "./projection.js";
18
+ export {
19
+ buildRequest,
20
+ buildRequestHeaders,
21
+ createRequestUrl,
22
+ filterShowcasesByDeadline
23
+ } from "./requests.js";
24
+ export {
25
+ buildCliAuthStatus,
26
+ enrichAuthStatusOutput,
27
+ main,
28
+ runCliEntryPoint
29
+ } from "./main.js";
30
+ export {
31
+ buildHttpApiError,
32
+ buildNonJsonApiError,
33
+ composeBenchmarkPayload,
34
+ composeCampaignSignalsPayload,
35
+ composeCohortEvidencePayload,
36
+ composeComparePayload,
37
+ composeReviewPatternsPayload,
38
+ composeResolvePayload,
39
+ composeShowcaseFitPayload,
40
+ executeRequestPlan
41
+ } from "./workflows.js";
package/src/main.js CHANGED
@@ -1,4 +1,3 @@
1
- import { pathToFileURL } from "node:url";
2
1
  import {
3
2
  CLI_PACKAGE_NAME,
4
3
  CLI_VERSION,
@@ -89,10 +88,6 @@ export function runCliEntryPoint() {
89
88
  });
90
89
  }
91
90
 
92
- export function isCliEntryPoint(importMetaUrl, argvEntry = process.argv[1]) {
93
- return Boolean(argvEntry && importMetaUrl === pathToFileURL(argvEntry).href);
94
- }
95
-
96
91
  export function enrichAuthStatusOutput(payload, config) {
97
92
  if (!payload || typeof payload !== "object" || !payload.data || typeof payload.data !== "object") {
98
93
  return payload;