@ludeo/cli 1.4.8 → 1.4.9
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 +43 -5
- package/README.npm.md +43 -5
- package/package.json +1 -1
- package/scripts/build-readme.js +48 -5
- package/scripts/postinstall.js +19 -43
package/README.md
CHANGED
|
@@ -15,12 +15,22 @@ ludeo version
|
|
|
15
15
|
|
|
16
16
|
## Quick Start
|
|
17
17
|
|
|
18
|
+
### Getting Your Game ID and Access Token
|
|
19
|
+
Both your **Game ID** and **Access Token** are available in the [Studio Lab](https://studio.ludeo.com) under **Environments**.
|
|
20
|
+
|
|
21
|
+
- **Access Token:** In Environments, click **Create Token**, name it, then copy and save the token (you won’t be able to see it again).
|
|
22
|
+
- **Game ID:** In Environments, it’s shown at the top of the page next to the API key.
|
|
23
|
+
|
|
18
24
|
### 1. Authentication
|
|
19
|
-
|
|
25
|
+
Save your access token:
|
|
26
|
+
|
|
27
|
+
**macOS / Linux:**
|
|
20
28
|
```bash
|
|
21
29
|
ludeo auth set-token --access-token YOUR_ACCESS_TOKEN
|
|
22
30
|
```
|
|
23
31
|
|
|
32
|
+
**Windows (Command Prompt):** use the same command; for multi-line commands use `^` at the end of each line instead of `\`.
|
|
33
|
+
|
|
24
34
|
You can also check if a token is saved:
|
|
25
35
|
```bash
|
|
26
36
|
ludeo auth status
|
|
@@ -30,10 +40,17 @@ ludeo auth status
|
|
|
30
40
|
|
|
31
41
|
#### Interactive Mode (Recommended for First-Time Users)
|
|
32
42
|
Simply run the upload command without flags to start the interactive wizard:
|
|
43
|
+
|
|
44
|
+
**macOS / Linux:**
|
|
33
45
|
```bash
|
|
34
46
|
ludeo builds upload
|
|
35
47
|
```
|
|
36
48
|
|
|
49
|
+
**Windows (Command Prompt):**
|
|
50
|
+
```cmd
|
|
51
|
+
ludeo builds upload
|
|
52
|
+
```
|
|
53
|
+
|
|
37
54
|
The interactive mode will guide you through:
|
|
38
55
|
1. **Game ID** - Enter your game's unique identifier
|
|
39
56
|
2. **Build Creation Type** - Choose between `new`, or `sdkFree`
|
|
@@ -56,6 +73,8 @@ ludeo builds upload --no-interactive [flags...]
|
|
|
56
73
|
Upload your game build with a simple command. The CLI supports two build creation types (**modification builds are not supported from the CLI—use [Studio Labs](https://studio.ludeo.com) for those**):
|
|
57
74
|
|
|
58
75
|
#### New Build (Complete build from scratch) - DEFAULT
|
|
76
|
+
|
|
77
|
+
**macOS / Linux:**
|
|
59
78
|
```bash
|
|
60
79
|
# With explicit build-creation-type
|
|
61
80
|
ludeo builds upload \
|
|
@@ -78,6 +97,18 @@ ludeo builds upload \
|
|
|
78
97
|
--sdk-version "2.0.0"
|
|
79
98
|
```
|
|
80
99
|
|
|
100
|
+
**Windows (Command Prompt):** use `^` at the end of each line for continuation:
|
|
101
|
+
```cmd
|
|
102
|
+
ludeo builds upload ^
|
|
103
|
+
--game-id YOUR_GAME_ID ^
|
|
104
|
+
--exec-path "game.exe" ^
|
|
105
|
+
--local-directory "C:\path\to\your\builds" ^
|
|
106
|
+
--build-creation-type new ^
|
|
107
|
+
--build-type major ^
|
|
108
|
+
--game-version "1.2.3" ^
|
|
109
|
+
--sdk-version "2.0.0"
|
|
110
|
+
```
|
|
111
|
+
|
|
81
112
|
#### SDK Free Build (Performance testing without Ludeo SDK)
|
|
82
113
|
```bash
|
|
83
114
|
ludeo builds upload \
|
|
@@ -103,7 +134,6 @@ ludeo builds upload \
|
|
|
103
134
|
- `minor`: Minor version build (requires major-build-id)
|
|
104
135
|
|
|
105
136
|
**Additional Flags:**
|
|
106
|
-
- `--runtime-environment`: Runtime environment (windows/proton) - only available for Ludeo admins
|
|
107
137
|
- `--request-id`: Optional request ID for tracking
|
|
108
138
|
- `--no-interactive`: Disable interactive prompts (for CI/CD or scripts)
|
|
109
139
|
- `--dry-run`: Preview the upload without making any changes
|
|
@@ -197,10 +227,13 @@ The test suite includes:
|
|
|
197
227
|
|
|
198
228
|
## Updating
|
|
199
229
|
|
|
230
|
+
**npm:**
|
|
200
231
|
```bash
|
|
201
232
|
npm update -g @ludeo/cli
|
|
202
233
|
```
|
|
203
234
|
|
|
235
|
+
**Windows (standalone exe):** download the latest release from the [GitHub releases](https://github.com/ludeo/cli/releases) page and replace your existing executable.
|
|
236
|
+
|
|
204
237
|
## CI/CD Integration
|
|
205
238
|
|
|
206
239
|
### GitHub Actions
|
|
@@ -235,10 +268,15 @@ npm rebuild @ludeo/cli
|
|
|
235
268
|
sudo npm install -g @ludeo/cli
|
|
236
269
|
```
|
|
237
270
|
|
|
238
|
-
**Windows
|
|
271
|
+
**Windows (npm):**
|
|
239
272
|
- Run PowerShell as Administrator
|
|
240
273
|
- Ensure Node.js is properly installed
|
|
241
274
|
|
|
275
|
+
**Windows (standalone exe):**
|
|
276
|
+
- **"ludeo is not recognized"** — Add the folder containing `ludeo.exe` to your PATH.
|
|
277
|
+
- **"Access denied" / "Permission denied"** — Right-click the executable → Properties → Unblock → OK, or run Command Prompt as Administrator.
|
|
278
|
+
- **Antivirus blocking** — Add an exception for the executable in your antivirus software.
|
|
279
|
+
|
|
242
280
|
### Common Issues
|
|
243
281
|
|
|
244
282
|
**Authentication errors:**
|
|
@@ -260,7 +298,7 @@ sudo npm install -g @ludeo/cli
|
|
|
260
298
|
Need help? Here's how to get support:
|
|
261
299
|
|
|
262
300
|
1. Check this README and troubleshooting section
|
|
263
|
-
2.
|
|
301
|
+
2. **npm:** run `npm rebuild @ludeo/cli` if you encounter issues. **Windows (standalone):** ensure `ludeo.exe` is in your PATH and see the troubleshooting section above.
|
|
264
302
|
3. Contact the Ludeo platform team for additional assistance
|
|
265
303
|
|
|
266
|
-
For detailed documentation and advanced usage, visit the [Ludeo Developer Portal](https://developers.ludeo.com).
|
|
304
|
+
For detailed documentation and advanced usage, visit the [Ludeo Developer Portal](https://developers.ludeo.com) or [Ludeo CLI Documentation](https://docs.ludeo.com/cli).
|
package/README.npm.md
CHANGED
|
@@ -15,12 +15,22 @@ ludeo version
|
|
|
15
15
|
|
|
16
16
|
## Quick Start
|
|
17
17
|
|
|
18
|
+
### Getting Your Game ID and Access Token
|
|
19
|
+
Both your **Game ID** and **Access Token** are available in the [Studio Lab](https://studio.ludeo.com) under **Environments**.
|
|
20
|
+
|
|
21
|
+
- **Access Token:** In Environments, click **Create Token**, name it, then copy and save the token (you won’t be able to see it again).
|
|
22
|
+
- **Game ID:** In Environments, it’s shown at the top of the page next to the API key.
|
|
23
|
+
|
|
18
24
|
### 1. Authentication
|
|
19
|
-
|
|
25
|
+
Save your access token:
|
|
26
|
+
|
|
27
|
+
**macOS / Linux:**
|
|
20
28
|
```bash
|
|
21
29
|
ludeo auth set-token --access-token YOUR_ACCESS_TOKEN
|
|
22
30
|
```
|
|
23
31
|
|
|
32
|
+
**Windows (Command Prompt):** use the same command; for multi-line commands use `^` at the end of each line instead of `\`.
|
|
33
|
+
|
|
24
34
|
You can also check if a token is saved:
|
|
25
35
|
```bash
|
|
26
36
|
ludeo auth status
|
|
@@ -30,10 +40,17 @@ ludeo auth status
|
|
|
30
40
|
|
|
31
41
|
#### Interactive Mode (Recommended for First-Time Users)
|
|
32
42
|
Simply run the upload command without flags to start the interactive wizard:
|
|
43
|
+
|
|
44
|
+
**macOS / Linux:**
|
|
33
45
|
```bash
|
|
34
46
|
ludeo builds upload
|
|
35
47
|
```
|
|
36
48
|
|
|
49
|
+
**Windows (Command Prompt):**
|
|
50
|
+
```cmd
|
|
51
|
+
ludeo builds upload
|
|
52
|
+
```
|
|
53
|
+
|
|
37
54
|
The interactive mode will guide you through:
|
|
38
55
|
1. **Game ID** - Enter your game's unique identifier
|
|
39
56
|
2. **Build Creation Type** - Choose between `new`, or `sdkFree`
|
|
@@ -56,6 +73,8 @@ ludeo builds upload --no-interactive [flags...]
|
|
|
56
73
|
Upload your game build with a simple command. The CLI supports two build creation types (**modification builds are not supported from the CLI—use [Studio Labs](https://studio.ludeo.com) for those**):
|
|
57
74
|
|
|
58
75
|
#### New Build (Complete build from scratch) - DEFAULT
|
|
76
|
+
|
|
77
|
+
**macOS / Linux:**
|
|
59
78
|
```bash
|
|
60
79
|
# With explicit build-creation-type
|
|
61
80
|
ludeo builds upload \
|
|
@@ -78,6 +97,18 @@ ludeo builds upload \
|
|
|
78
97
|
--sdk-version "2.0.0"
|
|
79
98
|
```
|
|
80
99
|
|
|
100
|
+
**Windows (Command Prompt):** use `^` at the end of each line for continuation:
|
|
101
|
+
```cmd
|
|
102
|
+
ludeo builds upload ^
|
|
103
|
+
--game-id YOUR_GAME_ID ^
|
|
104
|
+
--exec-path "game.exe" ^
|
|
105
|
+
--local-directory "C:\path\to\your\builds" ^
|
|
106
|
+
--build-creation-type new ^
|
|
107
|
+
--build-type major ^
|
|
108
|
+
--game-version "1.2.3" ^
|
|
109
|
+
--sdk-version "2.0.0"
|
|
110
|
+
```
|
|
111
|
+
|
|
81
112
|
#### SDK Free Build (Performance testing without Ludeo SDK)
|
|
82
113
|
```bash
|
|
83
114
|
ludeo builds upload \
|
|
@@ -103,7 +134,6 @@ ludeo builds upload \
|
|
|
103
134
|
- `minor`: Minor version build (requires major-build-id)
|
|
104
135
|
|
|
105
136
|
**Additional Flags:**
|
|
106
|
-
- `--runtime-environment`: Runtime environment (windows/proton) - only available for Ludeo admins
|
|
107
137
|
- `--request-id`: Optional request ID for tracking
|
|
108
138
|
- `--no-interactive`: Disable interactive prompts (for CI/CD or scripts)
|
|
109
139
|
- `--dry-run`: Preview the upload without making any changes
|
|
@@ -153,10 +183,13 @@ ludeo auth logout
|
|
|
153
183
|
|
|
154
184
|
## Updating
|
|
155
185
|
|
|
186
|
+
**npm:**
|
|
156
187
|
```bash
|
|
157
188
|
npm update -g @ludeo/cli
|
|
158
189
|
```
|
|
159
190
|
|
|
191
|
+
**Windows (standalone exe):** download the latest release from the [GitHub releases](https://github.com/ludeo/cli/releases) page and replace your existing executable.
|
|
192
|
+
|
|
160
193
|
## CI/CD Integration
|
|
161
194
|
|
|
162
195
|
### GitHub Actions
|
|
@@ -191,10 +224,15 @@ npm rebuild @ludeo/cli
|
|
|
191
224
|
sudo npm install -g @ludeo/cli
|
|
192
225
|
```
|
|
193
226
|
|
|
194
|
-
**Windows
|
|
227
|
+
**Windows (npm):**
|
|
195
228
|
- Run PowerShell as Administrator
|
|
196
229
|
- Ensure Node.js is properly installed
|
|
197
230
|
|
|
231
|
+
**Windows (standalone exe):**
|
|
232
|
+
- **"ludeo is not recognized"** — Add the folder containing `ludeo.exe` to your PATH.
|
|
233
|
+
- **"Access denied" / "Permission denied"** — Right-click the executable → Properties → Unblock → OK, or run Command Prompt as Administrator.
|
|
234
|
+
- **Antivirus blocking** — Add an exception for the executable in your antivirus software.
|
|
235
|
+
|
|
198
236
|
### Common Issues
|
|
199
237
|
|
|
200
238
|
**Authentication errors:**
|
|
@@ -216,7 +254,7 @@ sudo npm install -g @ludeo/cli
|
|
|
216
254
|
Need help? Here's how to get support:
|
|
217
255
|
|
|
218
256
|
1. Check this README and troubleshooting section
|
|
219
|
-
2.
|
|
257
|
+
2. **npm:** run `npm rebuild @ludeo/cli` if you encounter issues. **Windows (standalone):** ensure `ludeo.exe` is in your PATH and see the troubleshooting section above.
|
|
220
258
|
3. Contact the Ludeo platform team for additional assistance
|
|
221
259
|
|
|
222
|
-
For detailed documentation and advanced usage, visit the [Ludeo Developer Portal](https://developers.ludeo.com).
|
|
260
|
+
For detailed documentation and advanced usage, visit the [Ludeo Developer Portal](https://developers.ludeo.com) or [Ludeo CLI Documentation](https://docs.ludeo.com/cli).
|
package/package.json
CHANGED
package/scripts/build-readme.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Build README variants from docs/readme/*.md fragments.
|
|
4
4
|
* - README.md = full (repo, includes Testing) — for GitHub
|
|
5
5
|
* - README.npm.md = usage only (no Testing) — for NPM package page
|
|
6
|
+
* - windows-releases/template/README.md = Windows release (docs/readme + docs/readme-windows overrides)
|
|
6
7
|
*
|
|
7
8
|
* Run: node scripts/build-readme.js
|
|
8
9
|
*/
|
|
@@ -12,6 +13,7 @@ const path = require('path');
|
|
|
12
13
|
|
|
13
14
|
const ROOT = path.resolve(__dirname, '..');
|
|
14
15
|
const README_DIR = path.join(ROOT, 'docs', 'readme');
|
|
16
|
+
const README_WINDOWS_DIR = path.join(ROOT, 'docs', 'readme-windows');
|
|
15
17
|
|
|
16
18
|
const FRAGMENTS_ORDER = [
|
|
17
19
|
'01-title-intro.md',
|
|
@@ -25,12 +27,38 @@ const FRAGMENTS_ORDER = [
|
|
|
25
27
|
'09-support.md',
|
|
26
28
|
];
|
|
27
29
|
|
|
30
|
+
/** Windows README: Windows-only title + installation, then shared 03–09 (skip 02 npm install, skip 05 testing), then Windows file-info/license */
|
|
31
|
+
const WINDOWS_HEAD = ['01-title-overview.md', '02-installation.md'];
|
|
32
|
+
const WINDOWS_TAIL = ['09-file-info-license.md'];
|
|
33
|
+
const WINDOWS_FROM_README = ['03-quick-start.md', '04-features.md', '06-updating.md', '07-cicd.md', '08-troubleshooting.md', '09-support.md'];
|
|
34
|
+
|
|
28
35
|
const NPM_EXCLUDE = new Set(['05-testing.md']);
|
|
29
36
|
|
|
30
|
-
function buildVariant(excludeSet) {
|
|
37
|
+
function buildVariant(dir, order, excludeSet) {
|
|
31
38
|
const parts = [];
|
|
32
|
-
for (const name of
|
|
39
|
+
for (const name of order) {
|
|
33
40
|
if (excludeSet && excludeSet.has(name)) continue;
|
|
41
|
+
const file = path.join(dir, name);
|
|
42
|
+
if (!fs.existsSync(file)) {
|
|
43
|
+
console.warn(`Warning: fragment missing: ${name}`);
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
parts.push(fs.readFileSync(file, 'utf8').trim());
|
|
47
|
+
}
|
|
48
|
+
return parts.join('\n\n');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function buildWindowsReadme() {
|
|
52
|
+
const parts = [];
|
|
53
|
+
for (const name of WINDOWS_HEAD) {
|
|
54
|
+
const file = path.join(README_WINDOWS_DIR, name);
|
|
55
|
+
if (!fs.existsSync(file)) {
|
|
56
|
+
console.warn(`Warning: Windows fragment missing: ${name}`);
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
parts.push(fs.readFileSync(file, 'utf8').trim());
|
|
60
|
+
}
|
|
61
|
+
for (const name of WINDOWS_FROM_README) {
|
|
34
62
|
const file = path.join(README_DIR, name);
|
|
35
63
|
if (!fs.existsSync(file)) {
|
|
36
64
|
console.warn(`Warning: fragment missing: ${name}`);
|
|
@@ -38,17 +66,32 @@ function buildVariant(excludeSet) {
|
|
|
38
66
|
}
|
|
39
67
|
parts.push(fs.readFileSync(file, 'utf8').trim());
|
|
40
68
|
}
|
|
69
|
+
for (const name of WINDOWS_TAIL) {
|
|
70
|
+
const file = path.join(README_WINDOWS_DIR, name);
|
|
71
|
+
if (!fs.existsSync(file)) {
|
|
72
|
+
console.warn(`Warning: Windows fragment missing: ${name}`);
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
parts.push(fs.readFileSync(file, 'utf8').trim());
|
|
76
|
+
}
|
|
41
77
|
return parts.join('\n\n');
|
|
42
78
|
}
|
|
43
79
|
|
|
44
80
|
function main() {
|
|
45
|
-
const repoReadme = buildVariant(null);
|
|
46
|
-
const npmReadme = buildVariant(NPM_EXCLUDE);
|
|
81
|
+
const repoReadme = buildVariant(README_DIR, FRAGMENTS_ORDER, null);
|
|
82
|
+
const npmReadme = buildVariant(README_DIR, FRAGMENTS_ORDER, NPM_EXCLUDE);
|
|
83
|
+
const windowsReadme = buildWindowsReadme();
|
|
47
84
|
|
|
48
85
|
fs.writeFileSync(path.join(ROOT, 'README.md'), repoReadme + '\n', 'utf8');
|
|
49
86
|
fs.writeFileSync(path.join(ROOT, 'README.npm.md'), npmReadme + '\n', 'utf8');
|
|
50
87
|
|
|
51
|
-
|
|
88
|
+
const windowsTemplateDir = path.join(ROOT, 'windows-releases', 'template');
|
|
89
|
+
if (!fs.existsSync(windowsTemplateDir)) {
|
|
90
|
+
fs.mkdirSync(windowsTemplateDir, { recursive: true });
|
|
91
|
+
}
|
|
92
|
+
fs.writeFileSync(path.join(windowsTemplateDir, 'README.md'), windowsReadme + '\n', 'utf8');
|
|
93
|
+
|
|
94
|
+
console.log('Built README.md (repo), README.npm.md (npm), windows-releases/template/README.md (Windows)');
|
|
52
95
|
}
|
|
53
96
|
|
|
54
97
|
main();
|
package/scripts/postinstall.js
CHANGED
|
@@ -2,60 +2,36 @@ const fs = require('fs');
|
|
|
2
2
|
const path = require('path');
|
|
3
3
|
const os = require('os');
|
|
4
4
|
|
|
5
|
-
// Copy the appropriate binary to dist/ directory
|
|
6
5
|
function postinstall() {
|
|
7
6
|
const platform = os.platform();
|
|
8
7
|
const arch = os.arch();
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
'arm64': 'arm64'
|
|
14
|
-
};
|
|
15
|
-
|
|
8
|
+
|
|
9
|
+
const archMap = { 'x64': 'amd64', 'arm64': 'arm64' };
|
|
10
|
+
const platformMap = { 'win32': 'windows', 'darwin': 'darwin', 'linux': 'linux' };
|
|
11
|
+
|
|
16
12
|
const goArch = archMap[arch] || arch;
|
|
17
|
-
|
|
18
|
-
// Map platform names
|
|
19
|
-
const platformMap = {
|
|
20
|
-
'win32': 'windows',
|
|
21
|
-
'darwin': 'darwin',
|
|
22
|
-
'linux': 'linux'
|
|
23
|
-
};
|
|
24
|
-
|
|
25
13
|
const goPlatform = platformMap[platform] || platform;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const sourceBinaryName = platform === 'win32'
|
|
14
|
+
|
|
15
|
+
const binaryName = platform === 'win32'
|
|
29
16
|
? `ludeo-${goPlatform}-${goArch}.exe`
|
|
30
17
|
: `ludeo-${goPlatform}-${goArch}`;
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const distDir = path.join(__dirname, '..', 'dist');
|
|
36
|
-
const targetPath = path.join(distDir, targetBinaryName);
|
|
37
|
-
|
|
38
|
-
// Create dist directory if it doesn't exist
|
|
39
|
-
if (!fs.existsSync(distDir)) {
|
|
40
|
-
fs.mkdirSync(distDir, { recursive: true });
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// Copy the binary
|
|
44
|
-
if (fs.existsSync(sourcePath)) {
|
|
45
|
-
fs.copyFileSync(sourcePath, targetPath);
|
|
46
|
-
|
|
47
|
-
// Make executable on Unix systems
|
|
18
|
+
|
|
19
|
+
const distPath = path.join(__dirname, '..', 'dist', binaryName);
|
|
20
|
+
|
|
21
|
+
if (fs.existsSync(distPath)) {
|
|
48
22
|
if (platform !== 'win32') {
|
|
49
|
-
fs.chmodSync(
|
|
23
|
+
fs.chmodSync(distPath, '755');
|
|
50
24
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Only warn in development (when installing from source with build/ directory)
|
|
29
|
+
const buildPath = path.join(__dirname, '..', 'build', binaryName);
|
|
30
|
+
if (!fs.existsSync(buildPath)) {
|
|
31
|
+
console.warn(`⚠️ Ludeo CLI: binary not found for ${platform}-${arch}.`);
|
|
32
|
+
console.warn('Try running: npm rebuild @ludeo/cli');
|
|
56
33
|
}
|
|
57
34
|
}
|
|
58
35
|
|
|
59
|
-
// Run postinstall
|
|
60
36
|
postinstall();
|
|
61
37
|
|