Skip to content

project.json

Keep project.json beside main.py. Importing manifest reads this file, resolves the selected packages, and exposes the project's assets and colors to Python.

Select packages and name assets

This example assumes the project contains assets/logo.svg and the listed font file. A shape-only animation needs only version and an exact runtime and a packages object. Use versions available in the project's Packages panel.

{
  "version": 2,
  "runtime": "1.0.0",
  "packages": {"Neutral": "^1"},
  "assets": {"logo": "assets/logo.svg"},
  "fonts": {
    "JetBrains Mono": [
      {"path": "assets/fonts/jetbrains-mono/JetBrainsMono-Regular.ttf", "weight": 400, "style": "normal"}
    ]
  },
  "colors": {"ink": [30, 35, 45]},
  "color_schemes": {"neutral.colors": {"background": [248, 249, 252]}}
}
Field How to use it
version Use 2 for the project file format.
packages Map each selected package ID to a major range such as ^1 or an exact release. The resolver adds its dependencies. Only Python plugins create importable namespaces such as manifest.chart.
assets Map a logical name to a file inside the project. assets['logo'] returns its resolved path. Add the SVG package to interpret SVG artwork.
fonts Register each static font face by family, weight, style, and project-relative path. Select the matching face with Font('JetBrains Mono', weight=400). An empty mapping enables no fonts.
colors Define project colors as RGB channels from 0 to 255. Read them with colors['ink'].
color_schemes Override an existing key in a selected package palette. Read the effective value with color_schemes['neutral.colors']['background'].
package_overrides To develop a selected package locally, map its ID to a directory in the project's packages/ tree. See Creating packages.
from manifest import assets, colors, color_schemes

logo_path = assets['logo']
ink = colors['ink']
background = color_schemes['neutral.colors']['background']

Use Save & Run after changing the manifest. The host records the resolved versions and content hashes in project.lock.json. Edit the selection in project.json or the Packages panel when you want to change a dependency.