diff --git a/apps/docs/content/docs/cli.mdx b/apps/docs/content/docs/cli.mdx index 2f80bcf..026aa60 100644 --- a/apps/docs/content/docs/cli.mdx +++ b/apps/docs/content/docs/cli.mdx @@ -13,6 +13,7 @@ All commands default to the current working directory. Pass an optional - `about` — print a one-page tool overview. - `web [dir]` — launch the inspector UI (see Inspector page). - `mcp` — start the MCP server. +- `raycast [dir]` — start the API server for the Raycast extension. ## page:list diff --git a/apps/docs/content/docs/index.mdx b/apps/docs/content/docs/index.mdx index f18e909..9f24c68 100644 --- a/apps/docs/content/docs/index.mdx +++ b/apps/docs/content/docs/index.mdx @@ -23,4 +23,5 @@ details in seconds. + diff --git a/apps/docs/content/docs/meta.json b/apps/docs/content/docs/meta.json index b644c44..02f933e 100644 --- a/apps/docs/content/docs/meta.json +++ b/apps/docs/content/docs/meta.json @@ -1,4 +1,4 @@ { "title": "next-lens docs", - "pages": ["index", "quickstart", "cli", "inspector", "mcp"] + "pages": ["index", "quickstart", "cli", "inspector", "mcp", "raycast"] } diff --git a/apps/docs/content/docs/raycast.mdx b/apps/docs/content/docs/raycast.mdx new file mode 100644 index 0000000..53f846f --- /dev/null +++ b/apps/docs/content/docs/raycast.mdx @@ -0,0 +1,52 @@ +--- +title: Raycast Extension +description: Browse and search routes directly from Raycast. +--- + +
+ Raycast Extension +
+ +The [Raycast extension](https://www.raycast.com/1weiho/next-lens) lets +you search and browse your Next.js App Router routes directly from Raycast. + + + Install next-lens + + +## Start the API server + +The Raycast extension requires a local API server to fetch route data. Start it +with: + +```npm +npx next-lens raycast [target-directory] +``` + +This launches a headless API server and automatically opens the Raycast +extension. + +## Options + +- `-p, --port ` — server port (default `9453`). + +## How it works + +1. Run `next-lens raycast` in your Next.js project. +2. The CLI starts an API server exposing route data. +3. Raycast extension connects to `http://localhost:9453/api`. +4. Search and browse routes directly from Raycast. + +The server runs until you press `Ctrl+C`. diff --git a/apps/docs/public/images/raycast.png b/apps/docs/public/images/raycast.png new file mode 100644 index 0000000..f79a72a Binary files /dev/null and b/apps/docs/public/images/raycast.png differ