thumbnailgpt 1.0.3 → 1.0.4
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/dist/index.js +7 -3
- package/dist/mcp.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2,23 +2,27 @@ import { Command } from "commander";
|
|
|
2
2
|
import readline from "readline";
|
|
3
3
|
import ora from "ora";
|
|
4
4
|
import pc from "picocolors";
|
|
5
|
-
import { setApiKey, clearApiKey, getApiUrl } from "./config.js";
|
|
5
|
+
import { setApiKey, clearApiKey, getApiUrl, setApiUrl } from "./config.js";
|
|
6
6
|
import { ThumbnailGPTClient } from "./client.js";
|
|
7
7
|
import { runMcpServer } from "./mcp.js";
|
|
8
8
|
const program = new Command();
|
|
9
9
|
program
|
|
10
10
|
.name("thumbnailgpt")
|
|
11
11
|
.description("Official CLI and MCP server for ThumbnailGPT Studio")
|
|
12
|
-
.version("1.0.
|
|
12
|
+
.version("1.0.4");
|
|
13
13
|
// 1. Auth Login
|
|
14
14
|
program
|
|
15
15
|
.command("login")
|
|
16
16
|
.description("Authenticate the CLI with your Personal API Key")
|
|
17
17
|
.option("-k, --key <key>", "Pass the API key directly")
|
|
18
|
+
.option("-u, --url <url>", "Custom API endpoint URL (e.g. https://thumbnailgpt.com)")
|
|
18
19
|
.action(async (options) => {
|
|
20
|
+
if (options.url) {
|
|
21
|
+
setApiUrl(options.url);
|
|
22
|
+
}
|
|
19
23
|
if (options.key) {
|
|
20
24
|
setApiKey(options.key);
|
|
21
|
-
console.log(pc.green(
|
|
25
|
+
console.log(pc.green(`✔ API key saved successfully! (Endpoint: ${getApiUrl()})`));
|
|
22
26
|
return;
|
|
23
27
|
}
|
|
24
28
|
const rl = readline.createInterface({
|
package/dist/mcp.js
CHANGED