Skip to content

Tigatok/create-screeps-ts-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Create Screeps TypeScript Starter

Modern TypeScript starter template for Screeps MMO with esbuild and hot reloading.

Requirements

Quick Start

# Create a new Screeps bot project
pnpm create @tigatok/screeps-ts-starter my-screeps-bot
cd my-screeps-bot

# Install dependencies
pnpm install

# Set up your Screeps access
cp .env.example .env
cp .screeps.json.example .screeps.json

# Start developing with hot reload
pnpm watch

What's Included

  • ⚡ Fast builds with esbuild
  • 🔥 Hot reload - automatically uploads on file changes
  • 📁 Local development - option to copy files to local Screeps client
  • 🎯 Modern TypeScript - strict mode with latest features
  • 📦 Zero config - works out of the box
  • 🗄️ screeps.json - Supports screeps.json for easier config
  • 🐳 Docker support - Contains a docker-compose file for running a local server

Available Scripts

pnpm build        # Build for production
pnpm upload       # Upload to Screeps servers
pnpm push         # Build + upload
pnpm push:local   # Build + copy to local client
pnpm push:ptr     # Build + upload to PTR server
pnpm watch        # Watch files + auto upload
pnpm watch:local  # Watch files + copy to local client
pnpm watch:ptr    # Watch files + upload to PTR server

Configuration

Update env variables in .env:

SCREEPS_BRANCH=default

# Screeps MMO server configuration
SCREEPS_TOKEN=your_token_here

# Only needed if running a local server
SCREEPS_LOCAL_USERNAME=your_username
SCREEPS_LOCAL_PASSWORD=your_password

Get your token from Screeps Account Settings.

Running Local Server

To run a local Screeps server, ensure you have Docker installed. Copy the server/.env.example to server/.env and replace your steam key and path to nw. Then run:

cd server && docker-compose up -d

Features

  • Modern ES2020+ TypeScript setup
  • Automatic bundling with esbuild
  • Strict type checking
  • Hot reload development workflow
  • Support for both MMO and private
  • Supports screeps.json configuration
  • Contains docker-compose for local server

About

A simple, modern, typescript starter for Screeps MMO.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published