Available Scripts & CLI Commands
Relevant source files
The following files were used as context for generating this wiki page:
Poneglyph is a monorepo managed by Turborepo and powered by the Bun runtime. The project utilizes a centralized script management strategy where most high-level operations are orchestrated from the root directory, while specific application or package tasks are defined within their respective sub-directories.
The automation suite covers development environment management, build pipelines, database schema synchronization, and code quality enforcement (linting and formatting).
Sources: package.json:54, README.md:16-17
Root Workspace Commands
The root package.json acts as the primary entry point for orchestrating tasks across the entire monorepo. Most commands here use turbo to run scripts across all workspaces (apps/* and packages/*) in parallel or with specific filtering.
General Development and Build
These commands handle the lifecycle of the application from local development to production-ready builds.
| Command | Description | Tooling |
|---|---|---|
bun run dev | Starts all applications (web and server) in development mode simultaneously. | Turbo |
bun run build | Orchestrates the build process for all apps and packages. | Turbo |
bun run check-types | Executes TypeScript type checking across the entire workspace. | Turbo, TSC |
bun run check | Runs high-performance linting and formatting fixes. | Oxlint, Oxfmt |
Sources: package.json:28-30, package.json:37, README.md:65-67
Database Management
Poneglyph uses Drizzle ORM with PostgreSQL. The following root scripts delegate database operations to the @Poneglyph/db package.
| Command | Description |
|---|---|
bun run db:push | Directly pushes schema changes to the configured PostgreSQL database. |
bun run db:generate | Generates Drizzle migrations based on schema changes. |
bun run db:migrate | Executes pending migrations against the database. |
bun run db:studio | Launches the Drizzle Studio UI for database exploration. |
Sources: package.json:33-36, README.md:33-35
Script Execution Flow
The following diagram illustrates how root scripts leverage Turborepo to interact with individual workspace packages.
A visual representation of the task delegation from the root directory to specific sub-packages via Turborepo.
Sources: package.json:28-36, apps/web/package.json:7, apps/server/package.json:10
Application Specific Commands
While root commands provide convenience, each application within the apps/ directory maintains its own script definitions for localized development.
Web Application (Next.js)
Located in apps/web, these commands manage the Next.js frontend.
dev: Runsnext dev --port 3001. Sources: apps/web/package.json:7build: Runsnext build. Sources: apps/web/package.json:8start: Runsnext start. Sources: apps/web/package.json:9lint: Runsoxlint. Sources: apps/web/package.json:10
Server Application (Hono)
Located in apps/server, these commands manage the Hono-based backend API.
dev: Runsbun run --hot src/index.tsfor live-reloading during development. Sources: apps/server/package.json:10build: Compiles the server usingtsdown. Sources: apps/server/package.json:7compile: Generates a minified bytecode binary for the server. Sources: apps/server/package.json:9
Tooling and Configuration Commands
The project utilizes specific CLI tools for code quality and UI management.
Linting and Formatting
Poneglyph adopts Oxlint and Oxfmt for extremely fast code analysis and formatting. The bun run check command at the root executes oxlint && oxfmt --write.
Sources: package.json:37, README.md:15
UI Component Management
Shared UI components are managed via the shadcn CLI. Primitives are stored in packages/ui.
npx shadcn@latest add [component-name] -c packages/ui
This command adds shared primitives to the centralized UI package, allowing them to be imported across different apps (e.g., import { Button } from "@Poneglyph/ui/components/button").
Sources: README.md:52-54, packages/ui/package.json:1-15
Summary of CLI Workflow
The Poneglyph CLI workflow is designed for efficiency using Bun and Turbo. Developers typically begin by installing dependencies with bun install, followed by database synchronization using bun run db:push, and finally launching the full stack via bun run dev. Type safety and linting are enforced through bun run check-types and bun run check before builds.
Sources: README.md:21, README.md:35, README.md:38