Light Dark

Projects

A Hot workspace can contain multiple projects, each with its own source paths and dependencies.

Project Configuration

Project settings use dotted notation:

// Source paths
hot.project.my-app.src.paths ["./hot/src"]

// Test configuration
hot.project.my-app.test.paths ["./hot/test"]
hot.project.my-app.test.capture true

// Dependencies
hot.project.my-app.deps {
  "hot.dev/anthropic": { "local": "./hot/pkg/anthropic" }
}

Configuration Fields

src.paths

Defines where your Hot source files are located:

hot.project.my-app.src.paths ["./hot/src", "./lib"]
  • List of directories containing .hot files
  • All paths are relative to the hot.hot file location

test.paths

Directories containing test files:

hot.project.my-app.test.paths ["./hot/test"]

test.capture

Whether to capture stdout during tests (default: true):

hot.project.my-app.test.capture true

deps

Package dependencies (see Dependencies for full details):

hot.project.my-app.deps {
  "hot.dev/anthropic": { "local": "./hot/pkg/anthropic" }
}

Multiple Projects

You can define multiple projects in one workspace:

// Development project with local packages
hot.project.dev.src.paths ["./hot/src"]
hot.project.dev.test.paths ["./hot/test"]
hot.project.dev.deps {
  "hot.dev/stripe": { "local": "./hot/pkg/stripe" }
}

// Production project with pinned versions
hot.project.prod.src.paths ["./hot/src"]
hot.project.prod.test.paths ["./hot/test"]
hot.project.prod.deps {
  "hot.dev/stripe": {
    "git": "git@github.com:hot-dev/pkg.git",
    "path": "hot/pkg/stripe",
    "tag": "v1.0.0"
  }
}

// Set default project
hot.set.project "dev"

Switch between projects:

hot run -p prod
hot test -p dev

Default Project

Set the default project with:

hot.set.project "my-project-name"

This project is used when no -p/--project flag is specified.

Project Naming

Project names:

  • Must be valid Hot identifiers
  • Can contain letters, numbers, and hyphens
  • Cannot start with a number
  • Are case-sensitive

Good names:

  • my-app
  • production-api
  • dev
  • myProject

Directory Structure

A typical Hot project layout (created by hot init):

my-hot-project/
├── hot.hot              # Configuration file
├── hot/
│   ├── src/             # Source files
│   │   └── main.hot
│   ├── test/            # Test files
│   │   └── test_main.hot
│   └── pkg/             # Local packages
│       ├── anthropic/
│       └── openai/
└── .hot/                # Cache directory (gitignored)
    └── cache/