Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
feat(web): improve agent setup prompt and docs home metadata
Richie McIlroy40cab4e063a1
diff --git a/apps/web/app/(docs)/docs/[[...slug]]/page.tsx b/apps/web/app/(docs)/docs/[[...slug]]/page.tsxindex 6b117b2d6..c7a642589 100644--- a/apps/web/app/(docs)/docs/[[...slug]]/page.tsx+++ b/apps/web/app/(docs)/docs/[[...slug]]/page.tsx@@ -23,25 +23,36 @@ export async function generateMetadata(const doc = getDocBySlug(slug);if (!doc) return;- const { title, summary: description, image } = doc.metadata;+ const { title, summary, image } = doc.metadata;+ // "/docs" resolves to the Introduction doc, but "Introduction" makes a+ // meaningless share card — present the landing page as the docs home.+ const isDocsHome = slug === "introduction";+ const pageTitle = isDocsHome ? "Cap Documentation" : `${title} - Cap Docs`;+ const description = summary || title;const ogImage = image? `${buildEnv.NEXT_PUBLIC_WEB_URL}${image}`- : ogImageUrl({ title, tag: "Docs", description: description || undefined });+ : ogImageUrl({+ title: isDocsHome ? "Cap Documentation" : title,+ tag: "Docs",+ description: isDocsHome+ ? "Guides for recording, editing, sharing, and self-hosting Cap."+ : summary || undefined,+ });return {- title: `${title} - Cap Docs`,- description: description || title,+ title: pageTitle,+ description,openGraph: {- title: `${title} - Cap Docs`,- description: description || title,+ title: pageTitle,+ description,type: "article",url: `${buildEnv.NEXT_PUBLIC_WEB_URL}/docs/${slug}`,- images: [{ url: ogImage, width: 1200, height: 630, alt: title }],+ images: [{ url: ogImage, width: 1200, height: 630, alt: pageTitle }],},twitter: {card: "summary_large_image",- title: `${title} - Cap Docs`,- description: description || title,+ title: pageTitle,+ description,images: [ogImage],},};diff --git a/apps/web/app/(docs)/docs/_components/CopyablePrompt.tsx b/apps/web/app/(docs)/docs/_components/CopyablePrompt.tsxindex f8a24732e..c9120938a 100644--- a/apps/web/app/(docs)/docs/_components/CopyablePrompt.tsx+++ b/apps/web/app/(docs)/docs/_components/CopyablePrompt.tsx@@ -3,7 +3,9 @@import { Check, Copy } from "lucide-react";import { useEffect, useRef, useState } from "react";-export const CAP_AGENT_PROMPT = `Set up Cap as my complete video assistant, then use it to help with the task at the end.+export const CAP_AGENT_PROMPT = `Set up Cap as my persistent video assistant, then use it to help with the task at the end.++By pasting this prompt, I explicitly authorize these local setup actions: install the official Cap CLI and add or update the Cap skill and local MCP entry for the current agent only. Perform those setup actions yourself. Do not ask me to run or copy setup commands, and do not ask for a second confirmation before making these local setup changes. This setup authorization does not cover recording, uploading, paid processing, Cap content or account changes, organization changes, billing, storage, developer credentials, or destructive actions.Read these pages and treat them as operating instructions:- https://cap.so/docs/agents@@ -13,18 +15,27 @@ Read these pages and treat them as operating instructions:Do not rely on remembered Cap commands. Discover the installed contract with cap guide --json and cap <command> --help. Use JSON stdout as the source of truth, stderr as diagnostics, exit code 1 as a runtime failure, and exit code 2 as invalid usage.+Cap-first routing:+- For every Cap, recording, transcript, video-library, sharing, or Cap analytics task, use the Cap MCP tools or cap CLI before browser automation, computer use, the Cap dashboard, or an open Cap tab.+- Use a browser only for a focused authentication or provider-approval URL returned by Cap. Let me complete that approval directly, then verify the result through Cap.+- If MCP is not loaded in the current process, use the CLI. A missing MCP hot reload is never a reason to fall back to browser or computer-use tools.+Set up Cap:1. Identify my operating system and the agent you are running in. Select only the current agent; never install into every detected agent.-2. Run cap version --json. If the cap command is missing, show me the exact platform install command and what it changes, then wait for my confirmation before running it:+2. Run cap version --json. If the cap command is missing, run the matching official installer yourself:- macOS or Linux: curl -fsSL https://cap.so/install-cli.sh | sh- Windows PowerShell: irm https://cap.so/install-cli.ps1 | iex- Open a new shell if PATH changes, then verify cap version --json and cap guide --json.-3. Run cap auth status --json. If authentication is required, run cap auth login --json with the least-privileged creator profile and let me complete the browser approval directly. Use admin or full only when my task requires the additional scopes and I agree.-4. If you are Codex, Claude Code, or Cursor, preview the complete integration with:+ Do not merely show me the command or ask me to install it manually. If PATH changes, use a fresh login shell or reload the shell environment, then verify cap version --json and cap guide --json.+3. If you are Codex, Claude Code, or Cursor, preview the complete persistent integration with:cap agents install --target <codex|claude|cursor> --component all --dry-run --json- Show me the exact skill and MCP configuration paths and values. After I approve, apply the same command with --yes instead of --dry-run. This must install the full Cap skill and the local cap mcp serve integration without replacing unrelated agent configuration. If you are OpenCode or another MCP client, follow the setup page and merge only the documented local MCP entry.-5. Tell me if the agent must restart to load the new skill or MCP server. Continue the current task through the CLI when a restart is not practical.-6. Verify the setup with cap version --json, cap guide --json, cap auth status --json, and cap caps list --limit 1 --json. If MCP is loaded, list its Cap tools and confirm that passwords and storage credentials are not accepted as MCP inputs.+ Replace the placeholder with exactly one concrete current target: codex for Codex, claude for Claude Code, or cursor for Cursor. Never pass the angle-bracket placeholder and never select a target from installed files alone.+ Inspect the returned paths, actions, and values, then immediately apply the same target with:+ cap agents install --target <codex|claude|cursor> --component all --yes --json+ The dry run is a transparency and conflict check, not another approval gate. Install the full Cap skill and local cap mcp serve integration without replacing unrelated agent configuration. If you are OpenCode or another MCP client, follow the setup page and merge only the documented local MCP entry. Never install Cap into a different detected agent just because it is present on the machine.+4. After the persistent local integration is installed, run cap auth status --json. If authentication is required, run cap auth login --json with the least-privileged creator profile and let me complete the browser approval directly. Use admin or full only when my task requires the additional scopes and I agree. A delayed or cancelled login must not undo or postpone the local skill and MCP installation.+5. Report the exact installed skill path and MCP configuration path. Explain whether the agent must restart to load either component. Continue this task through the CLI when a restart or hot reload is not practical; the installed global skill and MCP configuration must persist for future sessions.+6. Verify the setup with cap version --json, cap guide --json, cap auth status --json, and cap caps list --limit 1 --json. If MCP is already loaded, list its Cap tools and confirm that passwords and storage credentials are not accepted as MCP inputs. Do not claim MCP is broken merely because the current process needs a restart.+7. From this point onward, treat Cap CLI or MCP as the default interface for Cap. Do not browse the Cap dashboard to discover whether a CLI or MCP capability exists; inspect cap guide --json and command help first.Use Cap as an ongoing helper. Learn the complete surface from the installed guide and skill, including:- Recording: check cap doctor --json, discover inputs with cap targets --json, ask before capture, use the detached cap record start and cap record stop lifecycle, require recordingMetaExists: true, validate the .cap project, export it, ask again before upload, and return the verified share link.@@ -36,13 +47,13 @@ Use Cap as an ongoing helper. Learn the complete surface from the installed guid- MCP and CLI: prefer MCP for structured reads, confirmed safe writes, resources, and browser handoffs. Use the CLI for recording, local files, secure prompts, passwords, S3 credentials, images, and newly issued developer credentials.Operating rules:-- Start with read-only discovery. Before any mutation, upload, paid processing, recording, comment or reaction, sharing or visibility change, deletion, organization, billing, storage, developer, or credential action, show me the exact proposed action and wait for my explicit confirmation. Pass --yes or confirmed=true only after I confirm.+- The local CLI, skill, and MCP bootstrap above is already approved by this prompt. After setup, start with read-only discovery. Before any mutation, upload, paid processing, recording, comment or reaction, sharing or visibility change, deletion, organization, billing, storage, developer, or credential action, show me the exact proposed action and wait for my explicit confirmation. Pass --yes or confirmed=true only after I confirm.- Never ask me to paste passwords, CAP_AGENT_TOKEN, API keys, S3 credentials, or newly issued developer secrets into chat or MCP. Ask me to run the exact secure Cap command in my terminal. For a password-protected Cap, ask me to run cap caps unlock <id-or-url>.- Preserve returned Cap, organization, folder, space, member, comment, and operation IDs. Never infer IDs from names or invent results.- Wait for asynchronous operations with cap jobs wait and verify the affected resource before reporting success. Clearly separate what you verified from reasonable interpretation and anything you could not verify.- Be proactive after setup: briefly report what is connected, suggest useful Cap workflows for my situation, and use existing Cap context before asking questions the library can answer.-My task: Set up Cap completely, tell me what you can now help me do, and ask which Cap task I want to start with.`;+My task: Complete the persistent Cap setup now, tell me exactly what is installed and what needs a restart, tell me what you can help me do through Cap, and ask which Cap task I want to start with.`;const setupBenefits = ["Installs the Cap CLI",diff --git a/apps/web/content/docs/introduction.mdx b/apps/web/content/docs/introduction.mdxindex 03ace3251..f3792c4b9 100644--- a/apps/web/content/docs/introduction.mdx+++ b/apps/web/content/docs/introduction.mdx@@ -1,6 +1,6 @@---title: "Introduction"-summary: "Welcome to Cap - the open source alternative to Loom"+summary: "Learn what Cap is, how it works, and how to start recording — from instant share links to self-hosting"tags: "Getting Started"---