Esta página se muestra en inglés. Una traducción al español está en curso.
KnowledgeMay 11, 2026·5 min de lectura

Terminal Shop — Coffee Subscription Over SSH

SST team's coffee subscription you order via SSH terminal. Audacious demo of how far serverless TypeScript + a terminal UI takes a real business.

SST
SST · Community
Listo para agents

Instalación lista para agent

Este activo puede instalarse después de elegir el runtime, revisar el plan y ejecutar el comando correspondiente.

Native · 96/100Política: permitir
Superficie agent
Cualquier agent MCP/CLI
Tipo
Knowledge
Instalación
Single
Confianza
Confianza: Community
Entrada
Asset
Comando de instalación directa
npx -y tokrepo@latest install 90546c75-3478-4dca-86b4-3ba025a9974f --target codex

Ejecutar después de confirmar el plan con dry-run.

Introducción

Terminal Shop is a working coffee subscription business that you place orders for by SSH-ing into the shop — ssh terminal.shop literally drops you into a TUI checkout. Built by the SST team as proof that serverless TypeScript + Bun + Stripe + a creative TUI can ship a real consumer business. Read the source to see how SST's primitives compose in production. Best for: founders looking for a wild SST reference architecture, devs curious about terminal-as-storefront UX, anyone who wants coffee. Works with: any SSH client. Read time: 30 minutes for the source code tour.


Try it now

ssh terminal.shop

That's the whole onboarding. The TUI handles product browsing, cart, payment via Stripe, and shipping address — all over SSH.

What it teaches about SST

  1. SSH as a frontend. Custom SSH server in TypeScript using ssh2 + Bun, routed through Cloudflare. Demonstrates that SST + TS is general enough to host non-HTTP protocols.
  2. Stripe Connect integration. Real money flows; Stripe webhooks update SST DynamoDB tables.
  3. Edge auth. Cloudflare Worker validates SSH key fingerprints against the user table before terminating to the SST backend.
  4. Audit + observability. Every TUI key event logs to CloudWatch via SST's Realtime primitive.

Source code highlights

// packages/functions/src/ssh-server.ts
import { Server } from "ssh2";
import { handleSession } from "./session";

const server = new Server({
  hostKeys: [process.env.HOST_KEY!],
}, (client) => {
  client.on("authentication", (ctx) => ctx.accept());
  client.on("session", (accept) => handleSession(accept()));
});

server.listen(2222, "0.0.0.0");

Why founders should read it

It's a 5-figure-revenue business that ships from one repo with under 2,000 lines of glue code. Whatever you think your MVP needs, Terminal Shop probably ships it with less. Studying the SST infrastructure file (sst.config.ts) is the most useful 10 minutes you'll spend learning SST.

Replicate this for your project

// sst.config.ts (skeleton from Terminal Shop)
export default $config({
  app(input) {
    return {
      name: "my-shop",
      removal: input?.stage === "production" ? "retain" : "remove",
      home: "aws",
      providers: { cloudflare: true, stripe: true },
    };
  },
  async run() {
    const products = new sst.aws.Dynamo("Products", { fields: { id: "string" }, primaryIndex: { hashKey: "id" } });
    const checkout = new sst.aws.Function("Checkout", { link: [products], handler: "src/checkout.handler" });
    return { checkoutUrl: checkout.url };
  },
});

FAQ

Q: Is the whole source actually public? A: Yes — github.com/terminaldotshop/terminal. They open-source the full stack including SST config, SSH server, TUI components, Stripe webhooks. Great reading material.

Q: Could I copy this exact pattern? A: Yes for the SST/Stripe/Cloudflare stack. The SSH-as-storefront UX is unusual — works because the audience self-selects (devs who SSH for fun). Replicating SSH retail without a tech-savvy audience won't move the needle.

Q: How much does it actually cost to run? A: AWS bills under $100/mo at their volume thanks to serverless + DynamoDB scaling. Most cost is Stripe fees + actual coffee + shipping. The infra footprint is famously small for the revenue.


Quick Use

  1. ssh terminal.shop — order coffee, see the TUI in action
  2. Read github.com/terminaldotshop/terminal source
  3. Use their sst.config.ts as a template for your own SST + Stripe app

Intro

Terminal Shop is a working coffee subscription business that you place orders for by SSH-ing into the shop — ssh terminal.shop literally drops you into a TUI checkout. Built by the SST team as proof that serverless TypeScript + Bun + Stripe + a creative TUI can ship a real consumer business. Read the source to see how SST's primitives compose in production. Best for: founders looking for a wild SST reference architecture, devs curious about terminal-as-storefront UX, anyone who wants coffee. Works with: any SSH client. Read time: 30 minutes for the source code tour.


Try it now

ssh terminal.shop

That's the whole onboarding. The TUI handles product browsing, cart, payment via Stripe, and shipping address — all over SSH.

What it teaches about SST

  1. SSH as a frontend. Custom SSH server in TypeScript using ssh2 + Bun, routed through Cloudflare. Demonstrates that SST + TS is general enough to host non-HTTP protocols.
  2. Stripe Connect integration. Real money flows; Stripe webhooks update SST DynamoDB tables.
  3. Edge auth. Cloudflare Worker validates SSH key fingerprints against the user table before terminating to the SST backend.
  4. Audit + observability. Every TUI key event logs to CloudWatch via SST's Realtime primitive.

Source code highlights

// packages/functions/src/ssh-server.ts
import { Server } from "ssh2";
import { handleSession } from "./session";

const server = new Server({
  hostKeys: [process.env.HOST_KEY!],
}, (client) => {
  client.on("authentication", (ctx) => ctx.accept());
  client.on("session", (accept) => handleSession(accept()));
});

server.listen(2222, "0.0.0.0");

Why founders should read it

It's a 5-figure-revenue business that ships from one repo with under 2,000 lines of glue code. Whatever you think your MVP needs, Terminal Shop probably ships it with less. Studying the SST infrastructure file (sst.config.ts) is the most useful 10 minutes you'll spend learning SST.

Replicate this for your project

// sst.config.ts (skeleton from Terminal Shop)
export default $config({
  app(input) {
    return {
      name: "my-shop",
      removal: input?.stage === "production" ? "retain" : "remove",
      home: "aws",
      providers: { cloudflare: true, stripe: true },
    };
  },
  async run() {
    const products = new sst.aws.Dynamo("Products", { fields: { id: "string" }, primaryIndex: { hashKey: "id" } });
    const checkout = new sst.aws.Function("Checkout", { link: [products], handler: "src/checkout.handler" });
    return { checkoutUrl: checkout.url };
  },
});

FAQ

Q: Is the whole source actually public? A: Yes — github.com/terminaldotshop/terminal. They open-source the full stack including SST config, SSH server, TUI components, Stripe webhooks. Great reading material.

Q: Could I copy this exact pattern? A: Yes for the SST/Stripe/Cloudflare stack. The SSH-as-storefront UX is unusual — works because the audience self-selects (devs who SSH for fun). Replicating SSH retail without a tech-savvy audience won't move the needle.

Q: How much does it actually cost to run? A: AWS bills under $100/mo at their volume thanks to serverless + DynamoDB scaling. Most cost is Stripe fees + actual coffee + shipping. The infra footprint is famously small for the revenue.


Source & Thanks

Built by Terminal (SST team side project). Source open.

terminaldotshop/terminal — ⭐ 2,000+

🙏

Fuente y agradecimientos

Built by Terminal (SST team side project). Source open.

terminaldotshop/terminal — ⭐ 2,000+

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados