Start from the Full Template¶
The Quickstart shows how minimal a ChartBook pipeline can be (just chartbook.toml and any script).
If you’re starting a larger research or analytics project from scratch and want a batteries-included setup—complete with a doit task runner, example Jupyter notebooks, custom site pages, and optional pre-wired data pullers—use chartbook init:
chartbook init
It runs completely offline using the template bundled with ChartBook.
Answering the prompts¶
chartbook init walks through a short list of options (press Enter to accept any default):
Project name — the title shown in your catalog (e.g.,
Rates Study). It is written into the site’s configuration, so a name the site would refuse (one with brackets or a semicolon, say) is refused here, with nothing created; so is such a name of yours.Folder name — generated automatically from the project name (
rates_study; lowercase letters, digits, and_).Environment tool — choose
pip,uv,conda, orpixi.Optional data sources — toggle on ready-to-run pullers and charts for FRED, the Fed yield curve, OFR repo rates, Bloomberg, CRSP, or CRSP-Compustat. Each one you enable comes with a working script, dataframe entry, and chart declared in
chartbook.toml.
Tip
Want git and GitHub set up automatically?
chartbook init --gitinitializes a git repo with your first commit, so you can skipgit initbelow.chartbook init --githubalso creates a private GitHub repository and pushes it (requires the GitHub CLI).
Build and snapshot your new project¶
Once chartbook init finishes, make the folder a git repository (a snapshot is labelled with the commit it was built from), install its dependencies, and run the standard ChartBook loop:
cd rates_study
git init # not needed after `chartbook init --git`
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
chartbook run # runs `doit` to execute scripts, notebooks, and docs
chartbook docs open # preview this pipeline's own site
When you’re ready to share outputs with other pipelines and your agents:
git add -A && git commit -m "Initial build"
chartbook snapshot
chartbook catalog open
Good to know: doit, CI checks, and template updates
Task runner: The template sets
[scripts] build = "doit"inchartbook.toml. Runningchartbook runexecutes every task indodo.py(except tests, which run withdoit run_pytest).CI validation: Run
chartbook run --checkto verifychartbook.tomland declared paths without running the build.Pulling template updates later:
chartbook initwrites a.cruft.jsonfile so you can pull future template improvements withcruft update.Trust: Folders created by
chartbook initare automatically trusted on your machine (chartbook trust --list).