.ocat/config.json file. OCM reads this file when you run ocm run to determine the project entry point and load project metadata into the runtime context.
The file is generated automatically by ocm initialize and can be edited by hand at any time.
Schema
The human-readable name of the project. Provided during
ocm initialize; defaults to myProject.The project version. Set to
"1.0.0" when the project is first created.A short description of the project. Starts as an empty string; edit it freely.
A project identifier. Auto-derived from the project name by converting camelCase to dash-case (e.g.
myProject → my-project). Can be changed during initialization.Path to the main entry file, relative to the project root. Only present for App projects. Defaults to
src/main.ocat. OCM executes this file when you run ocm run.Not written for Lib projects.The project type. One of
"app" or "lib".Examples
- App project
- Lib project
.ocat/config.json
How OCM uses config.json
When you runocm run, OCM performs the following steps:
- Reads
.ocat/config.jsonusing a synchronous JSON parse. - Sets
isProject: trueand stores the parsed config object in the global runtime context underprojectConfig. - Executes the file at the path given by
config.main.
Logger configuration file
In addition toconfig.json, you can place an optional logcfg.json file in the .ocat/ directory to configure the logging service. If present, it is read at startup before any code runs.
See the Logging page for the full logcfg.json schema.
Related pages
Projects overview
Understand project types, directory structure, and the project lifecycle.
Logging
Configure log levels and interceptors with
logcfg.json.