Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ All notable user-visible changes are recorded here. Versions follow [Semantic Ve

## Unreleased

### Added

- A one-screen landing page at `/start/` for paid traffic, to test against
the home page. It says what shell does in one line and gives the three
setup steps: install, start your agent (`shell claude`, or tap Codex,
Hermes, OpenCode or Cursor), and scan the QR code. On a phone, "Send these
steps to my laptop" opens the share sheet. The page gets the home page's
analytics and X pixel, is kept out of search results, and reports as its
own route (`start`, `landing_start` on the statistics dashboard).

## [0.23.3] — 2026-09-25

### Fixed
Expand Down
10 changes: 10 additions & 0 deletions shared/landing-paths.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* The public landing pages. "/" is the home page; "/start/" is a one-screen
* page for paid traffic, tested against it. Both get the landing page's
* analytics, X pixel and Content-Security-Policy, and nothing else does.
*/
export const START_PATH = "/start/";

export function isLandingPath(pathname: string): boolean {
return pathname === "/" || pathname === "" || pathname === START_PATH;
}
6 changes: 3 additions & 3 deletions shared/posthog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const EVENTS = new Set([
]);
const VALUES: Record<string, ReadonlySet<string>> = {
surface: new Set(["landing", "docs", "terminal", "app", "game", "relay"]),
route: new Set(["landing", "docs", "terminal", "login", "signup", "reset", "feedback", "account", "sessions", "session", "audit", "team", "join", "terms", "privacy", "machines", "game", "cli_authorize"]),
target: new Set(["install", "brew_install", "source_build", "run", "docs_command", "share", "skill", "start_nav", "start_hero", "start_footer", "start_bottom", "demo", "github_star", "signup_nav", "signup_hero", "signup_team", "signup_footer", "github", "signup", "signin", "docs", "app", "feedback", "session", "machine", "team", "vault", "automation", "account", "command", "invite", "cli", "unknown"]),
route: new Set(["landing", "start", "docs", "terminal", "login", "signup", "reset", "feedback", "account", "sessions", "session", "audit", "team", "join", "terms", "privacy", "machines", "game", "cli_authorize"]),
target: new Set(["install", "brew_install", "source_build", "run", "docs_command", "share", "skill", "start_nav", "start_hero", "start_footer", "start_bottom", "start_share", "demo", "github_star", "signup_nav", "signup_hero", "signup_team", "signup_footer", "github", "signup", "signin", "docs", "app", "feedback", "session", "machine", "team", "vault", "automation", "account", "command", "invite", "cli", "unknown"]),
source: new Set(["x", "google", "github", "reddit", "hacker_news", "bing", "youtube", "linkedin", "facebook", "instagram", "direct", "internal", "other", "app", "newsletter", "product_hunt", "discord", "slack", "mastodon", "bluesky", "podcast"]),
device: new Set(["mobile", "tablet", "desktop", "bot", "cli", "unknown"]),
outcome: new Set([...OPERATION_OUTCOMES, "unsupported_os", "unsupported_arch", "download_failed", "checksum_mismatch", "unknown", "matched", "limit", "reset", "revoked", "error", "busy", "too_large", "conflict", "in_flight", "delivered", "delivery_uncertain"]),
Expand Down Expand Up @@ -108,7 +108,7 @@ export function posthogPayload(event: string, id: string, input: Record<string,
if (properties.route) {
// Templates only. Never location.href, document.title, referrer or a real session ID.
const host = properties.surface === "app" || properties.surface === "game" ? "app.shell.online" : "shell.online";
const path = properties.route === "landing" ? "/" : properties.route === "terminal" ? "/s/:session" : properties.route === "session" ? "/sessions/:session" :
const path = properties.route === "landing" ? "/" : properties.route === "start" ? "/start/" : properties.route === "terminal" ? "/s/:session" : properties.route === "session" ? "/sessions/:session" :
properties.route === "join" ? "/join/:invite" : properties.route === "cli_authorize" ? "/cli/authorize" :
properties.route === "docs" && properties.guide ? `/${properties.guide}` : `/${properties.route}`;
properties.$current_url = `https://${host}${path}`;
Expand Down
1 change: 1 addition & 0 deletions shared/public-attribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export const PUBLIC_CTA_TARGETS = new Set([
"start_nav",
"start_hero",
"start_footer",
"start_share",
"demo",
"github_star",
"signup_nav",
Expand Down
92 changes: 92 additions & 0 deletions start/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<!doctype html>
<html lang="en" class="start-root">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
<meta name="referrer" content="no-referrer" />
<meta name="theme-color" content="#f7f8f2" />
<meta name="description" content="Use any coding agent from your phone. Install shell on your laptop, start your agent, and scan the QR code it prints. Free and open source. No account needed." />
<!-- A shorter page for paid traffic. The home page stays the one search engines index. -->
<meta name="robots" content="noindex, follow" />

<meta property="og:type" content="website" />
<meta property="og:site_name" content="shell.online" />
<meta property="og:url" content="https://shell.online/start/" />
<meta property="og:title" content="Use any coding agent from your phone | shell.online" />
<meta property="og:description" content="Install shell on your laptop, start your agent, and scan the QR code it prints. Free and open source. No account needed." />
<meta property="og:image" content="https://shell.online/social-card.png" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Use any coding agent from your phone | shell.online" />
<meta name="twitter:description" content="Install shell on your laptop, start your agent, and scan the QR code it prints. Free and open source. No account needed." />
<meta name="twitter:image" content="https://shell.online/social-card.png" />

<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
<link rel="icon" href="/favicon-48.png" type="image/png" sizes="48x48" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180" />
<link rel="manifest" href="/site.webmanifest" />
<link rel="stylesheet" href="/web/start.css" />
<title>Use any coding agent from your phone | shell.online</title>
</head>
<body>
<main class="start">
<header class="start-brand">
<a href="/" aria-label="shell.online home"><span class="start-mark" aria-hidden="true"></span>shell.online</a>
</header>

<div class="start-layout">
<section class="start-intro">
<h1>Use any coding agent from your phone.</h1>
<p>Free and open source. No account needed.</p>
</section>

<section class="start-how" aria-labelledby="start-how-title">
<h2 id="start-how-title">How it works</h2>
<ol class="start-steps">
<li class="start-step">
<div class="start-step-head">
<span class="start-number" aria-hidden="true">1</span>
<span class="start-step-title"><span class="start-phone-only">On your laptop, install shell</span><span class="start-desktop-only">Install shell</span></span>
<div class="start-os" role="group" aria-label="Operating system">
<button type="button" data-os="unix" aria-pressed="true">macOS · Linux</button>
<button type="button" data-os="windows" aria-pressed="false">Windows</button>
</div>
</div>
<div class="start-command">
<code id="start-install">curl -fsSL https://shell.online/install | sh</code>
<button type="button" class="start-copy" data-copy="install">Copy</button>
</div>
</li>
<li class="start-step">
<div class="start-step-head">
<span class="start-number" aria-hidden="true">2</span>
<span class="start-step-title">Start your agent through shell</span>
</div>
<div class="start-command">
<code id="start-run">shell claude</code>
<button type="button" class="start-copy" data-copy="run">Copy</button>
</div>
<p class="start-agents">or
<button type="button" data-agent="codex" aria-pressed="false">shell codex</button>
<button type="button" data-agent="hermes" aria-pressed="false">shell hermes</button>
<button type="button" data-agent="opencode" aria-pressed="false">shell opencode</button>
<button type="button" data-agent="cursor-agent" aria-pressed="false">shell cursor-agent</button>
</p>
</li>
<li class="start-step start-step-last">
<div class="start-step-head">
<span class="start-number" aria-hidden="true">3</span>
<span class="start-step-title">Scan the QR code it prints with <span class="start-phone-only">this phone</span><span class="start-desktop-only">your phone</span></span>
</div>
</li>
</ol>
</section>
</div>

<div class="start-send">
<button type="button" id="start-send">Send these steps to my laptop</button>
<p id="start-status" role="status" aria-live="polite"></p>
</div>
</main>
<script type="module" src="/web/start.ts"></script>
</body>
</html>
2 changes: 2 additions & 0 deletions tests/analytics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ describe("analytics", () => {

it("names every documentation page, and keeps unknown paths apart from 404s", () => {
expect(documentTarget("/", 200, "0.15.1")).toBe("landing");
expect(documentTarget("/start/", 200, "0.15.1")).toBe("landing_start");
expect(documentTarget("/start/", 404, "0.15.1")).toBe("not_found");
expect(documentTarget("/docs/", 200, "0.15.1")).toBe("docs");
expect(documentTarget("/app/", 200, "0.15.1")).toBe("docs_app");
expect(documentTarget("/cli/", 200, "0.15.1")).toBe("docs_cli");
Expand Down
9 changes: 9 additions & 0 deletions tests/csp-ga.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ describe("secureAssetResponse CSP Google Analytics endpoints", () => {
expect(privatePolicy).not.toMatch(/twitter|t\.co|ads-twitter/);
}
});
it("gives the /start/ landing page the home page's analytics and X origins, and keeps it out of search", () => {
const home = csp(secureAssetResponse(htmlResponse(), "/", "shell.online"));
const start = secureAssetResponse(htmlResponse(), "/start/", "shell.online");
expect(csp(start)).toBe(home);
expect(start.headers.get("X-Robots-Tag")).toBe("noindex, nofollow, noarchive");
for (const [path, host] of [["/start", "shell.online"], ["/start/x", "shell.online"], ["/start/", "app.shell.online"]]) {
expect(csp(secureAssetResponse(htmlResponse(), path, host))).not.toMatch(/twitter|googletagmanager/);
}
});
it("allows GA on public landing page (/) HTML on shell.online", () => {
const res = secureAssetResponse(htmlResponse(), "/", "shell.online");
const policy = csp(res);
Expand Down
5 changes: 5 additions & 0 deletions tests/posthog.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ describe("PostHog explicit capture boundary", () => {
const payload = posthogPayload("$pageview", ID, { surface: "terminal", route: "terminal", target: SECRET, source: SECRET, url: SECRET, content: SECRET, token: SECRET, $current_url: SECRET, $set: { email: SECRET } });
expect(JSON.stringify(payload)).not.toContain(SECRET);
expect(payload?.properties.$current_url).toBe("https://shell.online/s/:session");
const start = posthogPayload("$pageview", ID, { surface: "landing", route: "start" });
expect(start?.properties).toMatchObject({ $current_url: "https://shell.online/start/", $pathname: "/start/", $host: "shell.online", route: "start" });
expect(posthogPayload("landing_cta", ID, { target: "start_share" })?.properties.target).toBe("start_share");
expect(payload?.properties.$process_person_profile).toBe(false);
expect(payload?.properties.$geoip_disable).toBe(true);
expect(posthogPayload(SECRET, ID)).toBeNull();
Expand All @@ -174,6 +177,8 @@ describe("PostHog explicit capture boundary", () => {
for (const url of ["http://shell.online/", "https://evil.shell.online/", "https://stats.shell.online/", "https://app.shell.online/auth/callback?code=SECRET", "https://shell.online:444/", "https://shell.online/unknown"]) expect(analyticsRoute(new URL(url))).toBeNull();
expect(analyticsRoute(new URL(`https://app.shell.online/sessions/${SECRET}?token=${SECRET}`))).toEqual({ surface: "app", route: "session" });
expect(analyticsRoute(new URL("https://app.shell.online/game"))).toEqual({ surface: "game", route: "game" });
expect(analyticsRoute(new URL("https://shell.online/start/?utm_source=x&utm_medium=paid_social"))).toEqual({ surface: "landing", route: "start" });
expect(analyticsRoute(new URL("https://shell.online/start/other"))).toBeNull();
});
it("uses a finite acquisition source, never a raw URL/campaign/click ID", () => {
expect(analyticsSource(new URL(`https://shell.online/?twclid=${SECRET}`), "")).toBe("x");
Expand Down
9 changes: 8 additions & 1 deletion tests/x-pixel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,19 @@ describe("X base pixel", () => {
["config", "rfilf"],
]);
});
it.each(["/"])("loads on public %s", async path => {
it.each(["/", "/start/"])("loads on public %s", async path => {
dom(`https://shell.online${path}?utm_source=x&twclid=valid_click-123`);
(await import("../web/x-pixel")).initXPixel();
expect(scripts).toHaveLength(1);
});
it("attributes the /start/ visit to /start/, not the home page", async () => {
const w = dom("https://shell.online/start/?utm_source=x&utm_medium=paid_social");
(await import("../web/x-pixel")).initXPixel();
expect(Array.from(w.twq!.queue[0])).toEqual(["set", { page_location: "https://shell.online/start/" }]);
});
it.each([
"https://shell.online/s/abcdefghijklmnopqrstuvwxyz012345#salt=SECRET",
"https://shell.online/start", "https://shell.online/start/extra", "https://shell.online/start/?password=SECRET",
"https://app.shell.online/", "https://stats.shell.online/", "http://shell.online/",
"https://shell.online/docs/", "https://shell.online/cli/", "https://shell.online/docs/v0.23.0/security/",
"http://localhost:5178/", "https://shell.online/oauth/callback", "https://shell.online/?password=SECRET",
Expand Down Expand Up @@ -62,6 +68,7 @@ describe("X base pixel", () => {
});
it("is wired only to the landing entry point", () => {
expect(readFileSync("web/landing.ts", "utf8")).toContain("initXPixel();");
expect(readFileSync("web/start.ts", "utf8")).toContain("initXPixel();");
expect(readFileSync("web/documentation-entry.ts", "utf8")).not.toContain("x-pixel");
expect(readFileSync("web/main.ts", "utf8")).not.toContain("x-pixel");
expect(readFileSync("app/src/components/ProductAnalytics.tsx", "utf8")).not.toContain("x-pixel");
Expand Down
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export default defineConfig({
input: {
main: resolve(import.meta.dirname, "index.html"),
documentation: resolve(import.meta.dirname, "web/documentation.html"),
start: resolve(import.meta.dirname, "start/index.html"),
},
},
},
Expand Down
6 changes: 4 additions & 2 deletions web/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { resolveDocumentationRoute } from "../shared/documentation";
import { RELEASE_VERSION } from "../shared/release";
import { campaignMedium, isPublicEvent, publicSource } from "../shared/public-attribution";
import { trackProduct } from "./posthog";
import { isLandingPath, START_PATH } from "../shared/landing-paths";

const GA_ID = "G-101HMD03VD";
const LEGACY_CONSENT_COOKIE = "shell_analytics_consent";
Expand All @@ -10,7 +11,7 @@ const GA_COOKIE_MAX_AGE = 7_776_000; // 90 days
const PUBLIC_HOST = "shell.online";

function isPublicPath(pathname: string): boolean {
if (pathname === "/" || pathname === "") return true;
if (isLandingPath(pathname)) return true;
return resolveDocumentationRoute(pathname, RELEASE_VERSION) !== null;
}

Expand Down Expand Up @@ -60,6 +61,7 @@ function canonicalPageLocation(url: URL): string {

function pageTitleFor(pathname: string): string {
if (pathname === "/" || pathname === "") return "Your terminal, anywhere | shell.online";
if (pathname === START_PATH) return "Use any coding agent from your phone | shell.online";
const guide = resolveDocumentationRoute(pathname, RELEASE_VERSION);
if (guide) return `${guide.kind === "docs" ? "Getting started" : guide.kind} | shell.online docs`;
return "shell.online";
Expand Down Expand Up @@ -105,7 +107,7 @@ export function initAnalytics(): void {

if (!publicLoaded) {
publicLoaded = true;
sendPublicEvent("page_loaded", url.pathname === "/" ? "landing" : "docs", url);
sendPublicEvent("page_loaded", isLandingPath(url.pathname) ? "landing" : "docs", url);
}

gtagLoaded = true;
Expand Down
2 changes: 2 additions & 0 deletions web/posthog.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { resolveDocumentationRoute } from "../shared/documentation";
import { START_PATH } from "../shared/landing-paths";
import { RELEASE_VERSION } from "../shared/release";
import { sendPosthog, type PosthogCaptureContext } from "../shared/posthog";
import { campaignMedium, campaignSource, classifyReferrer, publicSource } from "../shared/public-attribution";
Expand Down Expand Up @@ -29,6 +30,7 @@ export function analyticsRoute(url: URL): { surface: string; route: string; guid
if (url.hostname === "shell.online") {
if (/^\/s\/[A-Za-z0-9_-]{32}\/?$/.test(url.pathname)) return { surface: "terminal", route: "terminal" };
if (url.pathname === "/") return { surface: "landing", route: "landing" };
if (url.pathname === START_PATH) return { surface: "landing", route: "start" };
const guide = resolveDocumentationRoute(url.pathname, RELEASE_VERSION);
if (guide) return { surface: "docs", route: "docs", guide: guide.kind };
}
Expand Down
Loading
Loading