Scaffold a TypeScript project that uses the railway SDK.
npm create railway@latest
# or
bun create railway
pnpm create railway
yarn create railwayThis downloads create-railway and scaffolds a ready-to-run TypeScript project wired to the
railway SDK — local code that talks to Railway, set up for you. It defaults to the sandbox
template, so the command above needs no flags; pass --sandbox to be explicit.
create-railway [template] [dir] [options]
Templates:
sandbox A TypeScript app on the Railway SDK: create, exec, destroy a sandbox (default)
Options:
--<template> Select a template by name (e.g. --sandbox)
--yes Scaffold into a non-empty directory
--help Show this help
Examples:
create-railway # default sandbox template → ./railway-sandbox
create-railway my-app # sandbox template → ./my-app
create-railway --sandbox my-app # select the template explicitly
A minimal TypeScript project wired to the railway SDK:
index.ts— a sandbox quickstart (create→exec→ auto-destroy).env.example— the credentials to fill inAGENTS.md(+CLAUDE.mdsymlink) — an API cheat sheet for coding agents
Then:
cd railway-sandbox
pnpm install
cp .env.example .env # then fill in your credentials
pnpm startDrop a new directory under templates/<name>/ with a template.json manifest. The CLI
discovers it automatically — no code changes.
mise run install
mise run check # typecheck + test + build
mise run smoke # scaffold into a temp dir and assert output
mise run package-check # validate the packed npm tarball