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
.hotfiles - Relative paths resolve from the directory you run
hotin, as dotest.paths, resource paths,.hot/and the local database. Runhotfrom the directory that holdshot.hot:hot check -c other/hot.hotfrom elsewhere doesn't find that project's files. (A package'slocaldependency paths inpkg.hotresolve from the package.)
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" }
}
resources.paths
Directories of resource files. Their files are bundled with the build and
read from Hot code with ::hot::resource/load:
hot.project.my-app.resources.paths ["./hot/resources"]
hot init writes this setting. A project without it has no resources.
-r, --resource.path adds a directory for one command.
resources.excludes
Glob patterns for files to leave out of the resources (default: []):
hot.project.my-app.resources.excludes ["**/*.tmp"]
ignore.respect-gitignore
Whether to honor .gitignore when collecting the project's resource files
(default: true). --no-gitignore turns it off for one command:
hot.project.my-app.ignore.respect-gitignore true
ignore.excludes
Glob patterns to leave out as well, applied with resources.excludes
(default: []):
hot.project.my-app.ignore.excludes ["drafts/**"]
skills.codegen
Hot turns each *.skill.md file under the resource paths into a
*.skill.hot file that exports a ::ai::skill/Skill value. See
Agents. All four settings are optional:
| Setting | Description | Default |
|---|---|---|
hot.project.<name>.skills.codegen.enabled | Generate the files | true |
hot.project.<name>.skills.codegen.paths | Directories to look for *.skill.md files in | The project's resources.paths |
hot.project.<name>.skills.codegen.out-dir | Where the generated files go | hot/src/_skills |
hot.project.<name>.skills.codegen.namespace | Root namespace of the generated code | ::skills |
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/hot.git",
"path": "hot/pkg/stripe",
"tag": "v1.0.0"
}
}
// Set default project
hot.set.project "dev"
Switch between projects:
hot check -p prod
hot run -p prod path/to/file.hot
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.
If hot.hot defines no projects, Hot uses a default project with
./hot/src sources and ./hot/test tests. Once hot.hot defines projects,
name the one to use with hot.set.project or -p. hot check, hot watch,
hot test, hot run, hot eval, hot repl, hot compile, hot build and
hot deploy stop with an error when neither names one, or when -p names a
project hot.hot doesn't define. The error lists the projects hot.hot
defines.
hot dev always serves the default project, so it doesn't take -p: it stops
with an error when -p names another project, or when hot.set.project names
none that hot.hot defines.
Store Configuration
::hot::store persists data in the main Hot database and is always scoped to
the current organization and environment. Unlike ::hot::file direct mode,
store access needs a Hot project/runtime context with a migrated database and
an active environment.
The local backend defaults to SQLite. You can select the store backend in
hot.hot; HOT_STORE_TYPE takes precedence when set:
hot.store.type ::env/get("HOT_STORE_TYPE", "sqlite") // "sqlite" or "postgres"
Hot's self-hosted AWS and Google Cloud stacks set
postgres, and an installation's settings refuses HOT_STORE_TYPE.
Store maps can also use embeddings for semantic search. These defaults are used
when a map requests embedding: EmbeddingOptions.Default:
hot.store.embedding.provider ::env/get("HOT_STORE_EMBEDDING_PROVIDER", "local")
hot.store.embedding.model ::env/get("HOT_STORE_EMBEDDING_MODEL", "bge-base-en-v1.5")
hot.store.embedding.field ::env/get("HOT_STORE_EMBEDDING_FIELD", "content")
hot.store.models.path ::env/get("HOT_STORE_MODELS_PATH", ".hot/models")
A map that already has embeddings keeps its model, and asking for a different one
is refused. To change the model, recreate the map: call ::store/destroy on a
::store/Map that still asks for the old model, because one asking for the new
model is refused too. That deletes the map and its entries. The next use creates
the map with the new model, and its entries have to be written again.
On a self-hosted single machine's small size, the memory the default model needs
has not been measured against the worker's 1024 MB cap or the app's 768 MB cap. If
the worker is killed on a store write there, or the app on a store search, set
HOT_STORE_EMBEDDING_MODEL to bge-small-en-v1.5 in the installation's settings
before a map embeds, or move to a larger size.
Project Naming
Project names:
- Use lowercase letters, digits, and hyphens
- Start with a letter
hot init --name accepts only such a name, and makes one from the directory
name when you don't pass --name: My App becomes my-app. The name is also
the root namespace of the starter file, ::my-app::hi.
Good names:
my-appproduction-apidev
Directory Structure
Hot lives alongside your existing code. hot init adds hot.hot to the project root, Hot source files go in hot/, and local data (cache, database, logs) goes in .hot/:
my-project/
├── src/ # Your existing code (any language)
├── package.json # Your existing config files
├── hot.hot # Hot configuration (project root)
├── hot/
│ ├── src/ # Hot source files
│ │ └── my-app/
│ │ └── main.hot
│ ├── test/ # Hot test files
│ │ └── my-app/
│ │ └── test_main.hot
│ └── pkg/ # Local packages
│ ├── anthropic/
│ └── openai/
└── .hot/ # Local data (gitignored)
├── cache/
└── db/