Skip to content

The Open Standard for Generative UI

Deprecate manual Cloud API key entry (#875)

Zahle Khan48d66f6545a4
diff --git a/docs/content/docs/api-reference/cli.mdx b/docs/content/docs/api-reference/cli.mdx
index 11550fb74..3f84f1cab 100644
--- a/docs/content/docs/api-reference/cli.mdx
+++ b/docs/content/docs/api-reference/cli.mdx
@@ -58,7 +58,7 @@ openui create [options]
| `-n, --name <string>` | Project name (interactive default: `openui-agent`) |
| `-t, --template <template>` | AI backend: `openui-cloud` (recommended) or `openui-self-hosted` |
| `--api-key <key>` | OpenUI Cloud API key; skips sign-in for the Cloud setup |
-| `--auth <method>` | Cloud auth method: `oauth`, `manual`, or `skip` |
+| `--auth <method>` | Cloud auth method: `oauth` or `skip`; `manual` is deprecated |
| `--skill` | Install the OpenUI agent skill for AI coding assistants |
| `--no-skill` | Skip installing the OpenUI agent skill |
| `--no-install` | Scaffold without running dependency installation |
diff --git a/packages/openui-cli/README.md b/packages/openui-cli/README.md
index 03ca72c51..a429794c4 100644
--- a/packages/openui-cli/README.md
+++ b/packages/openui-cli/README.md
@@ -72,7 +72,7 @@ Options:
- `--no-immediate`: Install dependencies without starting the development server
- `--no-interactive`: Fail instead of prompting for missing required input
- `--api-key <key>`: (cloud template) OpenUI Cloud API key; skips sign-in
-- `--auth <method>`: (cloud template) How to obtain the key — `oauth`, `manual`, or `skip`
+- `--auth <method>`: (cloud template) How to obtain the key — `oauth` or `skip`; `manual` remains available for backward compatibility but is deprecated
- `--agent-name <name>`: Declare the invoking coding agent as a lowercase kebab-case product slug (default: `unknown`)
What it does:
@@ -98,8 +98,8 @@ What it does:
- `--api-key <key>` if provided
- the `--auth` method, otherwise an interactive prompt offering:
- `oauth` — sign in with Thesys in the browser and mint a key for your org
- - `manual` — paste an existing key
- `skip` — leave `THESYS_API_KEY` empty and add it later (get one at <https://console.thesys.dev/keys>)
+ - `--auth manual` is deprecated but remains available for backward compatibility; use `--api-key` for scripted setup instead
- in non-interactive mode without `--api-key`, the cloud template fails because a key is required
- **Self-hosted** — prompts for your OpenAI-compatible provider API key and writes `OPENAI_API_KEY` to `.env` (interactive mode only). Leave blank to skip.
diff --git a/packages/openui-cli/src/auth/mint.ts b/packages/openui-cli/src/auth/mint.ts
index 422cc1a3c..fb26e3056 100644
--- a/packages/openui-cli/src/auth/mint.ts
+++ b/packages/openui-cli/src/auth/mint.ts
@@ -59,7 +59,8 @@ export async function mintCloudApiKey(projectName: string): Promise<string> {
/**
* Resolve a cloud API key by the chosen method: an explicitly provided key, a
- * browser OAuth mint, a manual paste, or skip (null → leave the .env slot empty).
+ * browser OAuth mint, the deprecated manual paste, or skip (null → leave the
+ * .env slot empty).
*/
export async function resolveCloudApiKey(opts: {
apiKey?: string;
@@ -83,7 +84,6 @@ export async function resolveCloudApiKey(opts: {
message: "Connect to OpenUI Cloud:",
choices: [
{ name: "Sign in with Thesys (opens a browser, mints a key)", value: "oauth" },
- { name: "Paste an existing API key", value: "manual" },
{ name: "Skip — add THESYS_API_KEY to .env later", value: "skip" },
],
})) as CloudAuthMethod;
@@ -92,6 +92,9 @@ export async function resolveCloudApiKey(opts: {
if (method === "skip") return { key: null, method: "skip" };
if (method === "manual") {
+ console.warn(
+ "⚠ --auth manual is deprecated. Use browser sign-in or pass --api-key for scripted setup.",
+ );
const { password } = await import("@inquirer/prompts");
const key = (
await password({ message: "Paste your OpenUI Cloud API key:", mask: true })
diff --git a/packages/openui-cli/src/index.ts b/packages/openui-cli/src/index.ts
index 70487b83b..541180751 100644
--- a/packages/openui-cli/src/index.ts
+++ b/packages/openui-cli/src/index.ts
@@ -52,7 +52,7 @@ program
"AI backend: openui-cloud (recommended default) | openui-self-hosted (infrastructure control)",
)
.option("--api-key <key>", "OpenUI Cloud API key (cloud template; skips sign-in)")
- .option("--auth <method>", "Cloud auth method: oauth | manual | skip")
+ .option("--auth <method>", "Cloud auth method: oauth | skip (manual is deprecated)")
.option("--skill", "Install the OpenUI agent skill for AI coding assistants")
.option("--no-skill", "Skip installing the OpenUI agent skill")
.option("--no-interactive", "Fail with error if required args are missing")
diff --git a/packages/openui-cli/src/lib/utils.ts b/packages/openui-cli/src/lib/utils.ts
index 5c9211e7f..681ae6220 100644
--- a/packages/openui-cli/src/lib/utils.ts
+++ b/packages/openui-cli/src/lib/utils.ts
@@ -45,5 +45,8 @@ export function normalizeAuth(a?: string): CloudAuthMethod | undefined {
if (!a) return undefined;
const v = a.toLowerCase();
if (v === "oauth" || v === "manual" || v === "skip") return v;
- throw new CreateError("bad_args", `unknown --auth "${a}". Use: oauth | manual | skip.`);
+ throw new CreateError(
+ "bad_args",
+ `unknown --auth "${a}". Use: oauth | skip (manual is deprecated).`,
+ );
}