KnowledgeMay 11, 2026·5 min read

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.

Agent ready

Ready-to-run agent install

This asset can be installed after the agent chooses its runtime, checks the plan, and runs the matching command.

Native · 96/100Policy: allow
Agent surface
Any MCP/CLI agent
Kind
Knowledge
Install
Single
Trust
Trust: Community
Entrypoint
Asset
Direct install command
npx -y tokrepo@latest install 90546c75-3478-4dca-86b4-3ba025a9974f --target codex

Run after dry-run confirms the install plan.

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.


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+

🙏

Source & Thanks

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

terminaldotshop/terminal — ⭐ 2,000+

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets