Quickstart¶
Create a basic project¶
ubCode can generate an example project for you that already contains a valid ubCode configuration. You may use this as a starting point to bootstrap your project.
From the command line:
ubc quickstart # scaffold into the current directory
ubc quickstart my-project # scaffold into a new directory
Alternatively, in VS Code, run the ubCode: Create quickstart project command from the command palette.
Project flavors¶
The scaffold comes in several flavors, selected with --flavor/-f on the
command line (or via the flavor picker in VS Code):
minimal(default)A minimal reStructuredText project that builds with Sphinx and Sphinx-Needs.
markdownA minimal Markdown (MyST) project, demonstrating file routing.
variantsA project focused on the “150%” build-variant model: variant functions, variant-data references, and a
variants.json.fullA full feature tour combining mixed reStructuredText and Markdown authoring, multiple need types and traceability links, typed fields, build variants, and a report.
For example:
ubc quickstart my-project --flavor full
Note
Every flavor ships with both a ubCode build and an upstream Sphinx build
(run ubc script sphinx; uv is required).
Markdown-authoring flavors also enable myst_parser.
Build-variant data (var.*) resolves under ubCode today;
in Sphinx it requires Sphinx-Needs’ variant support,
which is on master but not yet in a release.
See each flavor’s generated README for the commands to run.
Run script commands¶
ubCode also integrates a script runner that can be used to trigger a Sphinx build from within the editor. The scripts run in the integrated VS Code terminal and can be configured in the ubproject.toml file.
Note
uv is needed to run the script.