stackbook

← 準備

§26

作り始めのコマンド集

最終確認:2026年9月

§19 の各構成の雛形を作るコマンド。対話式のものは質問に答えて進める。先に共通の準備を済ませておく。

26-1. 共通の準備

# 言語・ツールのバージョン固定(使う言語だけ)
mise use node@lts pnpm@latest
mise use go@latest
mise use ruby@latest
mise use python@latest uv@latest

# Gitフックと依存更新
pnpm add -D lefthook && pnpm exec lefthook install
# renovate.json を置き、GitHubでRenovateアプリを有効化する

26-2. コーポレートサイト(§19-1)

pnpm create astro@latest
pnpm astro add tailwind
# Cloudflare Pages にリポジトリを接続してデプロイ

26-3. EC・独自要件(§19-3)

npx create-medusa-app@latest
pnpm create next-app@latest storefront

26-4. 業務システム・Rails構成(§19-4)

gem install rails
rails new app -d postgresql -c tailwind
cd app
bin/rails generate authentication
bundle add pundit pagy
# Kamalの設定は config/deploy.yml に生成済み

26-5. 業務システム・TypeScript構成(§19-5)

pnpm dlx create-turbo@latest app
cd app/apps
pnpm create vite@latest web --template react-ts
pnpm create hono@latest api
# api側
pnpm add drizzle-orm pg better-auth zod
pnpm add -D drizzle-kit @types/pg
# web側
pnpm dlx shadcn@latest init
pnpm add @tanstack/react-query @tanstack/react-router react-hook-form
# 共通
pnpm add -D -E @biomejs/biome && pnpm exec biome init
pnpm add -D vitest && pnpm create playwright

26-6. 自社SaaS・Goバックエンド(§19-6)

mkdir api && cd api
go mod init example.com/app/api
go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest
go install github.com/pressly/goose/v3/cmd/goose@latest
go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@latest
go get github.com/jackc/pgx/v5 github.com/riverqueue/river
sqlc init
goose -dir db/migrations create init sql

26-7. toCサービス(§19-7)

npx create-expo-app@latest mobile
pnpm create next-app@latest web
npx supabase init

26-8. AI/LLMプロダクト(§19-8)

# Python(ML系の処理がある場合)
uv init ai-api && cd ai-api
uv add "fastapi[standard]" sqlalchemy alembic pgvector httpx
uv add --dev ruff pytest pyright

26-9. リアルタイム・Elixir(§19-9)

mix archive.install hex phx_new
mix phx.new app
cd app && mix ecto.create

26-10. CLI(§19-10)

go mod init example.com/tool
go get github.com/spf13/cobra
goreleaser init

26-11. その他の言語

# Rust(Web API)
cargo new app && cd app
cargo add axum serde --features serde/derive
cargo add tokio --features full
cargo add sqlx --features runtime-tokio,postgres
# Rust(デスクトップ)
pnpm create tauri-app@latest
# Kotlin(Spring Boot)
curl https://start.spring.io/starter.zip \
  -d language=kotlin -d type=gradle-project-kotlin \
  -d dependencies=web,jooq,flyway,postgresql,actuator \
  -o app.zip
# C#(ASP.NET Core)
dotnet new webapi -n App

26-12. インフラ

mise use terraform@latest   # または opentofu
terraform init
# Cloudflare Workers
pnpm create cloudflare@latest