local-development

Start the Next.js dev server and run builds with environment variables.

31|4|Updated Aug 21, 2024
One-click install
npx skills add https://github.com/oaknational/oak-ai-lesson-assistant --skill local-development
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: local-development
Source: https://github.com/oaknational/oak-ai-lesson-assistant/tree/main/.claude/skills/local-development
Command: npx skills add https://github.com/oaknational/oak-ai-lesson-assistant --skill local-development

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers start and run Oak AI locally by providing commands to run the development server, build projects, and execute scripts with environment variables.

Core Features & Use Cases

  • Development Server: Start the Next.js dev server with pnpm dev (port 2525) and hot reloading.
  • Builds: Production and development build commands.
  • Monorepo Workflow: Turborepo with pnpm workspaces; target packages with --filter.
  • Env-driven scripts: Run scripts with environment variables using with-env.

Quick Start

Start the dev server with: pnpm dev. Build with pnpm build or pnpm build:dev. Run a script with environment variables: pnpm with-env tsx scripts/your-script.ts.

Frequently Asked Questions about local-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I start a local development server for a Next.js monorepo?

Start the development server with pnpm dev, which launches the Next.js dev server on port 2525 with hot reloading enabled. This command runs within the pnpm workspace structure, making it ideal for monorepo workflows.

How do I run builds in a Turborepo monorepo with pnpm?

Run pnpm build for production builds or pnpm build:dev for development builds. Use the --filter flag to target specific packages within the pnpm workspace, enabling selective compilation across your monorepo.

How do I execute scripts with environment variables in a pnpm workspace?

Execute scripts with environment variables using pnpm with-env tsx scripts/your-script.ts. This approach integrates with pnpm's environment handling and tsx execution, supporting Node.js tooling in monorepo contexts.

Can I control which port the development server runs on?

The development server runs on port 2525 by default. You can configure port control through environment variables or build configuration, allowing flexibility for local development workflows in monorepo setups.

What do I need to set up before running local development commands?

Ensure Node.js, pnpm, and Turborepo are installed and configured. Set up required environment variables and verify your monorepo structure supports pnpm workspaces and the Turborepo build system before executing dev or build commands.

Does this approach work for running targeted builds on specific packages?

Yes, the --filter option targets specific packages within the pnpm monorepo for builds and development commands. This enables efficient workflows when working on individual packages without rebuilding the entire workspace.