Socket
Book a DemoInstallSign in
Socket

create-trpc-appx

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-trpc-appx

Create tRPC-powered apps with one command

1.0.2
latest
Source
npmnpm
Version published
Weekly downloads
145
-42.69%
Maintainers
1
Weekly downloads
 
Created
Source
Logo

Create tRPC App

Scaffold a new tRPC app or run any public tRPC example from GitHub — fast, reliable, workspace‑aware.

🚀 Quick start · ✨ Features · 🧰 Commands · ⚙️ Options · 📦 Templates · 🧭 Monorepos · 🩺 Troubleshooting · 🌟 Star & Sponsor

Quick start

# Interactive scaffold (pass a name or answer the prompt)
npx create-trpc-appx@latest my-app
# or just:
npx create-trpc-appx@latest

# Scaffold from a bundled template
npx create-trpc-appx@latest my-app --example nextjs-app

# Run an example from GitHub (no scaffold)
create-trpc-appx run trpc/trpc-openapi#master --example-path examples/with-nextjs --prepare-only

Tip: add --yes to skip prompts. Use --verbose for debug logs.

Support the project

If this project helps you, please consider:

  • Starring the repo
  • Sponsoring on GitHub to support maintenance

Star this project on GitHub    Sponsor on GitHub
Thanks for your support — it helps keep this project healthy and moving forward.
Star on GitHub · Sponsor via GitHub Sponsors

Features

WhatDetails
🚀Fast buildsESM output via tsup
🧠Smart scriptsFramework heuristics: dev → start/preview → build
🧭Workspace‑awareDetects npm/yarn/pnpm workspaces and picks the right package
🛰️Robust runnerCache, offline mode, retries, checksum verification
🔌Env/PortsInline env, env-file, fixed/auto ports

Commands

CommandPurpose
create-trpc-appxInteractive scaffold for a new app
create-trpc-appx doctorDiagnose Node, package managers, git, proxy, and network
create-trpc-appx info [dir]Show scripts, workspaces, engines for a project
create-trpc-appx run <github-url>Fetch, prepare, and run a public example from GitHub

Options

Scaffold options

OptionTypeDefaultDescription
-e, --example [name|github-url]stringUse a bundled template or a GitHub URL
--example-path <path>stringRequired when branch contains a slash or to target a subdirectory
--use-npm / --use-pnpmflagautoPrefer a package manager
--yesflagfalseSkip prompts
--verboseflagfalseExtra logs

Run options (by feature)

Environment & Ports
OptionTypeDefaultDescription
--env KEY=VALUErepeatableInline env vars to pass
--env-file <path>stringLoad env vars from file
--port <number>numberSet PORT
--auto-portflagfalseFind a free port starting at --port or 3000
--script <name>stringheuristicForce a specific script
Networking & Cache
OptionTypeDefaultDescription
--offlineflagfalseUse cache only (no network)
--no-cacheflagfalseDisable cache and force re‑download
--cache-dir <path>stringXDG cacheUse a custom cache dir
--prepare-onlyflagfalseDownload/extract (and optionally install) without running
--no-installflagfalseSkip dependency installation
Build & Scripts
OptionTypeDefaultDescription
--prebuild <mode>auto|always|neverautoPrebuild before start when appropriate

Heuristics: Next.js/Remix/SolidStart → devstartbuild; Vite/Astro/SvelteKit → devpreviewstart.

Package manager

You can pass --use-npm or --use-pnpm with run as well. The runner otherwise detects npm/yarn/pnpm via lockfiles and packageManager fields and installs at the appropriate workspace root when needed.

Templates

NameStack
defaultNode + tRPC server + simple client
nextjs-appNext.js App Router + tRPC
vite-reactVite + React + tRPC

Use during scaffold with --example <name> or point to any GitHub example URL.

Run examples from GitHub

# Full URL with subdirectory
create-trpc-appx run https://github.com/trpc/trpc-openapi/tree/master/examples/with-nextjs --prepare-only

# Short/SSH forms and explicit example-path
create-trpc-appx run trpc/trpc-openapi#master --example-path examples/with-nextjs

The runner caches archives, verifies checksums, retries transient failures, and falls back to git clone when necessary. The cache can be safely removed at any time.

Monorepos & script detection

The runner scans workspaces (npm/yarn/pnpm) and common subfolders (apps/, packages/) to pick the best runnable directory based on scripts and naming.

The runner detects common frameworks (Next.js, Vite, Remix, Astro, SvelteKit, SolidStart) and picks the best script automatically:

  • Next.js, Remix, SolidStart: prefers dev, then start, then build.
  • Vite, Astro, SvelteKit: prefers dev, then preview, then start.
  • Prebuild is triggered for preview/start if a build script exists (Vite/Astro/SvelteKit), or for start when build exists (Next.js/Remix/SolidStart).
Heuristics
  • If current dir has a runnable script → use it.

  • If workspace root → expand workspace globs and pick the best candidate based on:

    • script presence: dev > preview > start > build
    • directory hints: examples, app, web, site, server, api
  • Otherwise, scan first two levels for runnable packages.

Troubleshooting

Common issues
  • engines.node mismatch → use nvm/Volta to switch versions
  • behind a proxy → set HTTP_PROXY/HTTPS_PROXY
  • private repos or higher rate limits → set GITHUB_TOKEN
  • no runnable scripts found → check package.json scripts or pass --script

If you see error: unknown command 'my-app' when running npx create-trpc-appx my-app, you're likely on an older CLI that didn't accept a positional project name at the root. Update to the latest version or run without the name and answer the prompt:

npx create-trpc-appx@latest

Run diagnostics:

create-trpc-appx doctor

Security

This CLI can download and run third‑party code. Review sources before running unfamiliar examples. Prefer a sandboxed/test environment when exploring.

Contributing

Contributions welcome—PRs and issues appreciated.

Acknowledgments

This project has been based on Create Next App, so a huge thank you goes to every and single one who worked on it.

Attribution for one of the icons used in the logo: Design icons created by monkik - Flaticon

License

Licensed under MIT.

(back to top)

Keywords

trpc

FAQs

Package last updated on 19 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.