Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

dex init

Scaffold a new project from a template.

Synopsis

dex init [OPTIONS] [DIRECTORY]

Options

OptionDefaultDescription
--template, -tdefaultTemplate to scaffold from
--dir, -d.Target directory
--no-promptUse all defaults, skip interactive prompts
--presetPre-fill variables from a named preset profile
--presets-filePath to a presets TOML file
--standardsPath to a standards TOML file for variable pre-fills

Examples

# Scaffold into a new directory, prompting for all variables
dex init --template dabs-package --dir my_project

# Non-interactive: use all defaults
dex init --template dabs-package --no-prompt --dir my_project

# Pre-fill variables from a preset profile
dex init --template dabs-package --preset ml-project --dir my_project

# Use a team standards file
dex init --template default --standards ./org-standards.toml --dir my_package

Interactive prompts

When you run dex init without --no-prompt, it asks for each variable defined in the template’s manifest. For example, dabs-package asks:

Project name [my_project]:
Python version (3.12, 3.11) [3.12]:
Include exploration notebook? [Y/n]:
Include job definition? [Y/n]:
Use serverless compute? [y/N]:

Listing available templates

dex init --help

Lists all built-in templates with names and descriptions.