C⛺mpsiteJS
CLI Reference

Overview

CLI Reference

Overview

Complete reference for the CampsiteJS CLI (camper command) - manage your static site projects with ease.

CampsiteJS CLI Reference

The camper CLI is your command center for managing CampsiteJS projects. With a cozy campfire theme 🏕️ and intuitive commands, it makes static site development a breeze.

CLI Structure

The CampsiteJS ecosystem consists of two packages:

  • campsitejs (Scaffolder): Creates new projects via npm create campsitejs@latest
  • basecampjs (Build Engine): Provides the camper CLI for managing existing projects

Installing the CLI Globally

For easier access to the camper command from anywhere, you can install it globally:

npm install -g basecampjs

Once installed globally, you can run camper commands directly from any project directory. If you don’t install globally, you can still use npx camper to run commands from your local project dependencies.

Command Categories

Commands are organized into logical groups for easy discovery:

Help & Version

  • camper -h / camper --help - Shows comprehensive help
  • camper -v / camper --version - Displays current version

Project Initialization

  • camper init - Initialize Campsite in current directory

Development

  • camper dev - Start development server with hot reloading
  • camper build - Production build
  • camper serve - Serve built site from dist/
  • camper preview - Build + serve for production testing

Utilities

  • camper clean - Remove dist/ folder
  • camper check - Validate project structure
  • camper list - List all content with counts
  • camper upgrade - Update basecampjs to latest

Content Creation (Make Commands)

  • camper make:page - Create pages
  • camper make:post - Create blog posts
  • camper make:layout - Create layouts
  • camper make:component - Create components
  • camper make:partial - Create partials
  • camper make:collection - Create data collections

Quick Examples

Start development server:

camper dev

Create multiple pages at once:

camper make:page home, about, contact

Build for production:

camper build

Check project health:

camper check

Campfire Theme 🏕️

All CLI output embraces the cozy campfire aesthetic:

  • 🏕️ Campsite and outdoor emojis
  • ✅ Clear success indicators
  • ⚠️ Helpful warnings
  • ❌ Informative error messages
  • 🌲 Friendly tips like “Happy camping!”

Next Steps


🏕️ Pro Tip: Run camper --help anytime to see all available commands with examples!