@replaystage/cli 0.4.1 → 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 +16 -6
- package/dist/index.d.ts +15 -2
- package/dist/index.js +502 -140
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -1
- package/package.json +1 -1
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
|
|
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
|
|
16
|
-
--
|
|
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
|
|
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
|
@@ -8,6 +8,7 @@ interface ProjectConfig {
|
|
|
8
8
|
version?: string;
|
|
9
9
|
title?: string;
|
|
10
10
|
tagline?: string;
|
|
11
|
+
category?: string;
|
|
11
12
|
updatedAt?: string;
|
|
12
13
|
visibility?: "draft" | "unlisted" | "public" | string;
|
|
13
14
|
aspectRatio?: string;
|
|
@@ -140,6 +141,7 @@ interface UploadResponse {
|
|
|
140
141
|
success: boolean;
|
|
141
142
|
slug: string;
|
|
142
143
|
url: string;
|
|
144
|
+
fullUrl?: string;
|
|
143
145
|
shortUrl?: string;
|
|
144
146
|
embedUrl?: string;
|
|
145
147
|
claim_token?: string;
|
|
@@ -168,6 +170,7 @@ interface UpdateBundleOptions {
|
|
|
168
170
|
title?: string;
|
|
169
171
|
tagline?: string;
|
|
170
172
|
description?: string;
|
|
173
|
+
category?: string;
|
|
171
174
|
visibility?: "draft" | "unlisted" | "public" | string;
|
|
172
175
|
changelog?: string;
|
|
173
176
|
aspectRatio?: string;
|
|
@@ -184,6 +187,13 @@ interface UpdateBundleOptions {
|
|
|
184
187
|
}
|
|
185
188
|
type UpdateResponse = UploadResponse;
|
|
186
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;
|
|
187
197
|
declare function uploadGameBundle(options: UploadBundleOptions): Promise<UploadResponse>;
|
|
188
198
|
declare const uploadGame: typeof uploadGameBundle;
|
|
189
199
|
declare function updateGameBundle(slug: string, options: UpdateBundleOptions): Promise<UpdateResponse>;
|
|
@@ -211,7 +221,10 @@ declare function printPublishSuccess(res: {
|
|
|
211
221
|
tags?: string[];
|
|
212
222
|
}): void;
|
|
213
223
|
|
|
214
|
-
declare function createProgram(
|
|
224
|
+
declare function createProgram(opts?: {
|
|
225
|
+
jsonMode?: boolean;
|
|
226
|
+
}): Command;
|
|
215
227
|
declare function runCli(argv?: string[]): Promise<void>;
|
|
228
|
+
declare function isDirectCliExecution(argv1?: string | undefined, moduleUrl?: string): boolean;
|
|
216
229
|
|
|
217
|
-
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 };
|