@replaystage/cli 0.4.0 → 0.5.0

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
@@ -1,30 +1,40 @@
1
1
  # @replaystage/cli (`replaystage`)
2
2
 
3
- Deploy, validate, and iterate playable web games on **ReplayStage** (`replaystage.com` & `replay.st`) directly from your terminal or autonomous AI coding agents (Antigravity, Claude Code, Cursor, Gemini CLI).
3
+ Deploy, validate, and iterate playable web games on **ReplayStage** (`replaystage.com` & `replay.st`) directly from your terminal or autonomous AI coding agents (Antigravity, Claude Code, Cursor, Codex, Windsurf, Gemini CLI).
4
4
 
5
5
  ## Quick Start
6
6
 
7
7
  ```bash
8
+ # Zero-config public launch (auto-detects title & defaults --category to arcade)
9
+ npx -y replaystage publish . --public
10
+
8
11
  # 1. Pre-flight offline validation (checks index.html, bundle size <= 25MB, and prohibited files)
9
12
  npx -y replaystage validate ./dist --json
10
13
 
11
- # 2. Publish as a playable draft preview (zero login required)
14
+ # 2. Publish with full AI model & genre attribution (zero login required)
12
15
  npx -y replaystage publish ./dist \
13
16
  --title "Neon Drift '86" \
14
17
  --tagline "Synthwave endless drift arcade" \
15
- --tool antigravity \
16
- --category racing \
18
+ --tool codex \
19
+ --model "Claude Sonnet 5.5" \
20
+ --category arcade \
21
+ --tags "retro,synth-audio" \
17
22
  --aspect-ratio 16:9 \
18
23
  --draft \
19
24
  --json
20
25
 
21
- # 3. Push an incremental update to the same URL (.replaystage.json)
26
+ # 3. Push an incremental update to the same 8-char stage ID (.replaystage.json)
22
27
  npx -y replaystage publish ./dist --changelog "Tuned drift physics" --json
23
28
 
24
29
  # 4. Promote draft to the public arcade leaderboard
25
30
  npx -y replaystage publish ./dist --public --changelog "v1.0 Launch" --json
26
31
  ```
27
32
 
33
+ ### Primary Categories (`--category`)
34
+
35
+ ReplayStage supports 8 pure gameplay genres (defaults to `arcade` when omitted):
36
+ `arcade`, `action`, `puzzle`, `strategy`, `simulation`, `racing` (Racing & Sports), `rpg`, `casual`.
37
+
28
38
  ## Responsive Aspect Ratio & Screen Formats
29
39
 
30
40
  ReplayStage automatically conforms game stages to specified aspect ratios:
@@ -39,7 +49,7 @@ ReplayStage automatically conforms game stages to specified aspect ratios:
39
49
 
40
50
  ## Creator Authentication (`rps_...` API Tokens)
41
51
 
42
- Generate a Personal API Token in `https://replaystage.com/settings` to bind all CLI & AI agent deployments directly to your `@handle`:
52
+ Generate a Personal API Token in `https://replaystage.com/settings#tokens` to bind all CLI & AI agent deployments directly to your `@handle`:
43
53
 
44
54
  ```bash
45
55
  npx -y replaystage login --token rps_<your_token>
package/dist/index.d.ts CHANGED
@@ -7,6 +7,8 @@ interface ProjectConfig {
7
7
  apiUrl?: string;
8
8
  version?: string;
9
9
  title?: string;
10
+ tagline?: string;
11
+ category?: string;
10
12
  updatedAt?: string;
11
13
  visibility?: "draft" | "unlisted" | "public" | string;
12
14
  aspectRatio?: string;
@@ -115,7 +117,7 @@ interface UploadBundleOptions {
115
117
  apiUrl: string;
116
118
  bundleBuffer: Buffer;
117
119
  title: string;
118
- tagline: string;
120
+ tagline?: string;
119
121
  description?: string;
120
122
  aiTool?: string;
121
123
  category?: string;
@@ -139,6 +141,7 @@ interface UploadResponse {
139
141
  success: boolean;
140
142
  slug: string;
141
143
  url: string;
144
+ fullUrl?: string;
142
145
  shortUrl?: string;
143
146
  embedUrl?: string;
144
147
  claim_token?: string;
@@ -167,6 +170,7 @@ interface UpdateBundleOptions {
167
170
  title?: string;
168
171
  tagline?: string;
169
172
  description?: string;
173
+ category?: string;
170
174
  visibility?: "draft" | "unlisted" | "public" | string;
171
175
  changelog?: string;
172
176
  aspectRatio?: string;
@@ -183,6 +187,13 @@ interface UpdateBundleOptions {
183
187
  }
184
188
  type UpdateResponse = UploadResponse;
185
189
  type UpdateResult = UpdateResponse;
190
+ declare function resolvePlayableUrl(apiUrl: string, result: {
191
+ fullUrl?: string;
192
+ url?: string;
193
+ slug?: string;
194
+ }, fallbackSlug?: string): string;
195
+ declare function extractFieldErrors(data: any): Record<string, string[]> | undefined;
196
+ declare function extractErrorMessage(data: any, fallback?: string, statusText?: string, statusCode?: number): string;
186
197
  declare function uploadGameBundle(options: UploadBundleOptions): Promise<UploadResponse>;
187
198
  declare const uploadGame: typeof uploadGameBundle;
188
199
  declare function updateGameBundle(slug: string, options: UpdateBundleOptions): Promise<UpdateResponse>;
@@ -210,7 +221,10 @@ declare function printPublishSuccess(res: {
210
221
  tags?: string[];
211
222
  }): void;
212
223
 
213
- declare function createProgram(): Command;
224
+ declare function createProgram(opts?: {
225
+ jsonMode?: boolean;
226
+ }): Command;
214
227
  declare function runCli(argv?: string[]): Promise<void>;
228
+ declare function isDirectCliExecution(argv1?: string | undefined, moduleUrl?: string): boolean;
215
229
 
216
- export { COVER_PRECEDENCE_FILES, type CliConfig, type DetectedCover, type PackagedBundle, type ProjectConfig, type UpdateBundleOptions, type UpdateResponse, type UpdateResult, type UploadBundleOptions, type UploadResponse, type UploadResult, type UserInfo, type ValidationResult, checkHtmlDependencies, clearConfig, clearToken, computeFileFingerprint, computeFingerprint, computeSha256, createProgram, createZipFromFiles, detectSiblingCover, extractHtmlMetadata, fetchWhoami, getConfigDir, getConfigPath, getProjectConfigPath, getToken, incrementVersion, logError, logInfo, logSuccess, logWarn, packageGame, printErrorJson, printJson, printPublishSuccess, promoteDraftVersion, readConfig, readProjectConfig, resolveApiUrl, resolveProjectDirectory, resolveToken, runCli, writeProjectConfig as saveProjectConfig, setToken, updateGame, updateGameBundle, uploadGame, uploadGameBundle, validateGamePackage, writeConfig, writeProjectConfig };
230
+ export { COVER_PRECEDENCE_FILES, type CliConfig, type DetectedCover, type PackagedBundle, type ProjectConfig, type UpdateBundleOptions, type UpdateResponse, type UpdateResult, type UploadBundleOptions, type UploadResponse, type UploadResult, type UserInfo, type ValidationResult, checkHtmlDependencies, clearConfig, clearToken, computeFileFingerprint, computeFingerprint, computeSha256, createProgram, createZipFromFiles, detectSiblingCover, extractErrorMessage, extractFieldErrors, extractHtmlMetadata, fetchWhoami, getConfigDir, getConfigPath, getProjectConfigPath, getToken, incrementVersion, isDirectCliExecution, logError, logInfo, logSuccess, logWarn, packageGame, printErrorJson, printJson, printPublishSuccess, promoteDraftVersion, readConfig, readProjectConfig, resolveApiUrl, resolvePlayableUrl, resolveProjectDirectory, resolveToken, runCli, writeProjectConfig as saveProjectConfig, setToken, updateGame, updateGameBundle, uploadGame, uploadGameBundle, validateGamePackage, writeConfig, writeProjectConfig };