diff --git a/apps/dashboard/src/app/(main)/(protected)/(outside-dashboard)/projects/page-client.tsx b/apps/dashboard/src/app/(main)/(protected)/(outside-dashboard)/projects/page-client.tsx index 9c577c0f9..86df52e5b 100644 --- a/apps/dashboard/src/app/(main)/(protected)/(outside-dashboard)/projects/page-client.tsx +++ b/apps/dashboard/src/app/(main)/(protected)/(outside-dashboard)/projects/page-client.tsx @@ -461,7 +461,7 @@ function ProjectsListPage() {
- Point the local dashboard at the stack.config.ts in your project. If you just ran stack init, it was created at the root of that project. + Point the local dashboard at the stack.config.ts in your project. Don't have one yet? Paste your project folder path instead and we'll create stack.config.ts for you. diff --git a/apps/skills/src/app/route.ts b/apps/skills/src/app/route.ts index 9b5522c97..9a6c43ce8 100644 --- a/apps/skills/src/app/route.ts +++ b/apps/skills/src/app/route.ts @@ -20,11 +20,11 @@ function escapeHtml(s: string): string { .replace(/'/g, "'"); } -const INSTALL_CMD = "npx @hexclave/cli@latest init"; +const SETUP_PROMPT_URL = "https://docs.hexclave.com/guides/getting-started/setup"; function renderHtml(): string { const skillEscaped = escapeHtml(SKILL_MD); - const installEscaped = escapeHtml(INSTALL_CMD); + const setupPromptUrlEscaped = escapeHtml(SETUP_PROMPT_URL); return ` @@ -166,11 +166,11 @@ function renderHtml(): string {

The Hexclave Agent Skill

This endpoint serves the canonical SKILL.md that teaches coding agents how to wire Hexclave into a project — auth, orgs, payments, emails, analytics, and the hexclave-cli.

-

Install in One Command

-

Run this in any project root. It detects your agent, installs the skill, registers the MCP server, and writes credentials.

-
- ${installEscaped} - +

Set Up with the Prompt

+

Copy the canonical setup prompt into your coding agent. It contains the current Hexclave setup instructions and links back to this skill for follow-up questions.

+
+ ${setupPromptUrlEscaped} +

Fetch the Skill Directly

diff --git a/docs-mintlify/guides/going-further/cli.mdx b/docs-mintlify/guides/going-further/cli.mdx index a3b613688..6f3d3ce40 100644 --- a/docs-mintlify/guides/going-further/cli.mdx +++ b/docs-mintlify/guides/going-further/cli.mdx @@ -1,6 +1,6 @@ --- title: "Stack CLI" -description: "Use the Hexclave CLI to initialize projects, manage config, and run admin scripts" +description: "Use the Hexclave CLI to manage config and run admin scripts" sidebarTitle: "Stack CLI" --- @@ -10,7 +10,7 @@ import { hexclaveAgentRemindersText } from "/snippets/hexclave-agent-reminders.j {hexclaveAgentRemindersText} -The Hexclave CLI is published as `@hexclave/cli` and exposes the `stack` command. Use it for project setup, branch config workflows, and quick admin scripts. +The Hexclave CLI is published as `@hexclave/cli` and exposes the `stack` command. Use it for branch config workflows and quick admin scripts. ## Install @@ -29,7 +29,7 @@ stack --help You can also run any command without installing globally by prefixing it with `npx @hexclave/cli@latest`, for example: ```sh title="Terminal" -npx @hexclave/cli@latest init +npx @hexclave/cli@latest project list ``` ## Global options @@ -66,37 +66,6 @@ stack logout If you have an anonymous CLI session that should be linked during login, set `STACK_CLI_ANON_REFRESH_TOKEN` before running `login`. -## Initialize a project - -Run the interactive setup wizard: - -```sh title="Terminal" -stack init -``` - -The wizard can create a cloud project, create a local config file, or link an existing project. In interactive terminals, it can run an agent to apply the setup changes to your app. Use `--no-agent` to print manual setup instructions instead. - -### Non-interactive init - -Use `--mode` to skip prompts: - -| Command | What it does | -| --- | --- | -| `stack init --mode create --apps authentication,teams` | Create `stack.config.ts` for local config-driven development. | -| `stack init --mode create-cloud` | Create a new Hexclave Cloud project and write keys to `.env`. | -| `stack init --mode link-config --config-file ./stack.config.ts` | Link setup instructions to an existing local config file. | -| `stack init --mode link-cloud --select-project-id ` | Write keys for an existing cloud project to `.env`. | - -Other useful flags: - -| Option | Description | -| --- | --- | -| `--apps ` | Comma-separated app IDs to enable in `create` mode. | -| `--config-file ` | Existing config file for `link-config` mode. | -| `--select-project-id ` | Existing cloud project for `link-cloud` mode. | -| `--output-dir ` | Directory where output files should be written. Defaults to the current directory. | -| `--no-agent` | Skip the setup agent and print manual instructions. | - ## Project commands List projects owned by the logged-in user: diff --git a/docs-mintlify/guides/integrations/convex/overview.mdx b/docs-mintlify/guides/integrations/convex/overview.mdx index 03ba7fe3b..3c7a1ff10 100644 --- a/docs-mintlify/guides/integrations/convex/overview.mdx +++ b/docs-mintlify/guides/integrations/convex/overview.mdx @@ -17,12 +17,7 @@ Then, run `npx convex dev` to start the Convex backend, and `npm run dev` to sta ### 2) Install Hexclave -Next, install Hexclave using the setup wizard: - -```bash -cd my-app/ # replace with your app name -npx @hexclave/cli@latest init -``` +Next, open your app directory and follow the [Hexclave setup prompt](/guides/getting-started/setup). Choose **Next.js** and **Convex** in the setup builder, then copy the generated prompt into your coding agent. ### 3) Create a Hexclave project diff --git a/docs-mintlify/guides/integrations/supabase/overview.mdx b/docs-mintlify/guides/integrations/supabase/overview.mdx index c911d78fa..06ab69b9e 100644 --- a/docs-mintlify/guides/integrations/supabase/overview.mdx +++ b/docs-mintlify/guides/integrations/supabase/overview.mdx @@ -54,9 +54,10 @@ Let's create a sample table and some RLS policies to demonstrate how to integrat ```bash title="Terminal" npx create-next-app@latest -e with-supabase stack-supabase cd stack-supabase - npx @hexclave/cli@latest init ``` + Then follow the [Hexclave setup prompt](/guides/getting-started/setup). Choose **Next.js** and **Supabase** in the setup builder, then copy the generated prompt into your coding agent. + Now copy the environment variables from the Supabase dashboard to the `.env.local` file: - `NEXT_PUBLIC_SUPABASE_URL` diff --git a/docs-mintlify/guides/other/tutorials/build-a-saas-with-hexclave.mdx b/docs-mintlify/guides/other/tutorials/build-a-saas-with-hexclave.mdx index 9c00b4ee9..b5b4e6ef2 100644 --- a/docs-mintlify/guides/other/tutorials/build-a-saas-with-hexclave.mdx +++ b/docs-mintlify/guides/other/tutorials/build-a-saas-with-hexclave.mdx @@ -25,11 +25,7 @@ The examples below focus on **Next.js (App Router)**. The same ideas apply on ot ## 1. Install Hexclave and wire environment variables -The fastest path for JavaScript and TypeScript is the **setup wizard**: - -```bash title="Terminal" -npx @hexclave/cli@latest init -``` +The fastest path for JavaScript and TypeScript is the [Hexclave setup prompt](/guides/getting-started/setup). Choose **Next.js** in the setup builder, then copy the generated prompt into your coding agent. Then create or open a project in the dashboard and copy **project ID**, **publishable client key** (if your project uses one), and **secret server key** into your app configuration. For Next.js, that usually means `.env.local`: @@ -39,9 +35,9 @@ NEXT_PUBLIC_HEXCLAVE_PUBLISHABLE_CLIENT_KEY= HEXCLAVE_SECRET_SERVER_KEY= ``` -### What the wizard sets up (Next.js) +### What the setup prompt creates (Next.js) -After `init`, you should see files similar to: +After setup, you should see files similar to: - `app/handler/[...hexclave]/page.tsx` - hosted sign-in, sign-up, account settings, and more - `app/layout.tsx` - wraps the app with `HexclaveProvider` and `HexclaveTheme` diff --git a/docs/code-examples/setup.ts b/docs/code-examples/setup.ts index 35d7a14be..5366ab187 100644 --- a/docs/code-examples/setup.ts +++ b/docs/code-examples/setup.ts @@ -6,7 +6,7 @@ export const setupExamples = { { language: 'JavaScript', framework: 'Next.js', - code: `npx @stackframe/stack-cli@latest init`, + code: `Follow the setup prompt for your framework.`, highlightLanguage: 'bash', filename: 'Terminal' } diff --git a/docs/content/docs/(guides)/getting-started/setup.mdx b/docs/content/docs/(guides)/getting-started/setup.mdx index cac8578a6..f8511965f 100644 --- a/docs/content/docs/(guides)/getting-started/setup.mdx +++ b/docs/content/docs/(guides)/getting-started/setup.mdx @@ -23,18 +23,10 @@ We recommend using our **setup wizard** for JavaScript frameworks for a seamless - ### Run installation wizard + ### Follow the setup prompt - - The setup wizard is available for JavaScript/TypeScript frameworks. For Python projects, please use the manual installation method. - - - Run Stack's installation wizard with the following command: - - ```sh title="Terminal" - npx @stackframe/stack-cli@latest init - ``` + Use the setup prompt for your framework and apply the relevant sections to your project. ### Update API keys diff --git a/docs/content/docs/(guides)/others/convex.mdx b/docs/content/docs/(guides)/others/convex.mdx index 9ea46c69a..ace0db0d1 100644 --- a/docs/content/docs/(guides)/others/convex.mdx +++ b/docs/content/docs/(guides)/others/convex.mdx @@ -17,12 +17,7 @@ Then, run `npx convex dev` to start the Convex backend, and `npm run dev` to sta ### 2) Install Stack Auth -Next, install Stack Auth using the setup wizard: - -```bash -cd my-app/ # replace with your app name -npx @stackframe/stack-cli@latest init -``` +Next, open your app directory and follow the Stack Auth setup prompt for your framework. ### 3) Create a Stack Auth project diff --git a/docs/content/docs/(guides)/others/supabase.mdx b/docs/content/docs/(guides)/others/supabase.mdx index 7b542f105..4b9994f42 100644 --- a/docs/content/docs/(guides)/others/supabase.mdx +++ b/docs/content/docs/(guides)/others/supabase.mdx @@ -53,9 +53,10 @@ Now let's create a new Next.js project and install Stack Auth and Supabase clien ```bash title="Terminal" npx create-next-app@latest -e with-supabase stack-supabase cd stack-supabase -npx @stackframe/stack-cli@latest init ``` +Then follow the Stack Auth setup prompt for your framework. + Now copy the environment variables from the Supabase dashboard to the `.env.local` file: - `NEXT_PUBLIC_SUPABASE_URL` - `NEXT_PUBLIC_SUPABASE_ANON_KEY` diff --git a/docs/src/app/api/internal/[transport]/setup-instructions.md b/docs/src/app/api/internal/[transport]/setup-instructions.md index f7a4a2d62..a64469b31 100644 --- a/docs/src/app/api/internal/[transport]/setup-instructions.md +++ b/docs/src/app/api/internal/[transport]/setup-instructions.md @@ -19,21 +19,13 @@ Before proceeding, you MUST identify the project framework: **IMPORTANT**: Only proceed with the installation if you can clearly identify the project as either Next.js or React. -### 1) Run the Stack Auth initializer -- Use the `stack-auth` MCP server (`ask_stack_auth` tool), or run the command: - - **For Next.js projects**: - ```bash - npx @stackframe/stack-cli@latest init - ``` - - **For React projects**: - ```bash - npx @stackframe/stack-cli@latest init - ``` -- Accept defaults for Next.js (App Router) or React. -- Add all generated files to the repo. +### 1) Follow the setup prompt +- Use the setup prompt from the docs as the source of truth. +- Apply only the sections relevant to the detected framework. +- Do not run the Stack Auth CLI initializer unless the user explicitly asks for that workflow. ### 2) Scaffold the auth setup -Confirm these files exist (created by the initializer): +Create or confirm the setup files from the relevant setup prompt section: - `src/stack.tsx` - `src/app/handler/[...stack]/page.tsx` - `src/app/loading.tsx` diff --git a/packages/cli/src/lib/local-emulator-client.ts b/packages/cli/src/lib/local-emulator-client.ts index 801b1807b..7a1da684d 100644 --- a/packages/cli/src/lib/local-emulator-client.ts +++ b/packages/cli/src/lib/local-emulator-client.ts @@ -122,7 +122,7 @@ export async function lookupLocalEmulatorProjectIdByPath(absolutePath: string): const projects = await listLocalEmulatorProjects(); const match = findProjectByAbsolutePath(projects, absolutePath); if (!match) { - throw new CliError(`No development-environment project registered for ${absolutePath}. Open it in the dashboard or run \`hexclave init\` from that directory first.`); + throw new CliError(`No development-environment project registered for ${absolutePath}. Open it in the dashboard from that directory first.`); } return match.projectId; } diff --git a/packages/shared/src/helpers/init-prompt.ts b/packages/shared/src/helpers/init-prompt.ts index c0a07c07a..23a0a52e9 100644 --- a/packages/shared/src/helpers/init-prompt.ts +++ b/packages/shared/src/helpers/init-prompt.ts @@ -26,7 +26,7 @@ HEXCLAVE SETUP INSTRUCTIONS These instructions describe how to set up Hexclave. ${web ? ` -First of all, if you have access to a terminal, it is better to use \`npx @hexclave/cli init\`. +First of all, use the full setup prompt below as the source of truth. Do not run the Hexclave CLI initializer unless the user explicitly asks for the CLI workflow. ` : ""} ${getCliProjectSetupContext(configPath)} diff --git a/packages/template/src/integrations/convex/component/README.md b/packages/template/src/integrations/convex/component/README.md index 64afff750..039c45fde 100644 --- a/packages/template/src/integrations/convex/component/README.md +++ b/packages/template/src/integrations/convex/component/README.md @@ -4,11 +4,9 @@ This component is the official way to integrate Hexclave with your Convex projec ## Installation -To get started, first install Hexclave using the setup wizard: +To get started, follow the Hexclave setup prompt and choose Convex for the integration steps: -```bash -npx @hexclave/cli@latest init -``` +https://docs.hexclave.com/guides/getting-started/setup ## Get Started