Astrona content init
astrona content init¶
Scaffold a new lab or section directory (for teachers and authors)
Synopsis¶
Scaffold a new lab config directory (Astrona Training Series - ATS, 'ats') or course section directory (Astrona Training Path - ATP, 'atp') with necessary boilerplate files and directory structure. This command clones a template blueprint repository and injects customizable template arguments.
Options¶
-a, --author-name string Default value for 'author_name' template variable (default "Author Name")
--codeowners string Generate a .github/CODEOWNERS file with specified owners (set to 'false' or empty to disable) (default "@astrona-io/maintainers")
--create-repo Automatically create a GitHub repository for the scaffolded content using gh CLI
-d, --description string Default value for 'description' template variable (default "A short, engaging description of what the learner will achieve.")
--github-org string GitHub organization or username for the repository (default "astrona-io")
--github-public Make the created GitHub repository public (default true)
--github-repo string GitHub repository name (defaults to uppercase path-id)
-h, --help help for init
-g, --language string Default value for 'language' template variable (default "en")
-l, --license string Default value for 'license' template variable (default "Apache-2.0")
-i, --path-id string Default value for 'path_id' template variable (default "ATPxxx")
-r, --repo string Git template repository URL (overrides default blueprints)
-s, --slug string Default value for 'slug' template variable (default "path-slug")
-t, --title string Default value for 'title' template variable (default "Path Title")
-v, --version string Default value for 'version' template variable (default "0.1.0")
Options inherited from parent commands¶
--accept-terms Accept this CLI's usage terms and data-loss risk notice; required on each operational CI command (read: astrona terms)
-c, --config string Path or URL to the lab config directory (with --git: a subdirectory within the cloned repo) (default ".")
-f, --file string Configuration file name override (default "config.yaml")
--git string Git repository URL to clone/pull (https://, git@host:, or ssh://) — --config then selects a subdirectory within it
--git-ref string Git branch, tag, or commit to check out (used with --git; default: the repo's default branch)
--headless Disable the terminal UI and CLI prompts; run/reset skip login reminders and new account sessions
--install-version If the lab needs another astrona release (astronaVersion) that isn't installed, install it without asking — for CI
--trust Approve running a remote (--git / URL) lab without asking — for CI; review the lab first
--update-check Check for new CLI releases (disabled in CI, without a terminal, or by ASTRONA_NO_UPDATE_CHECK) (default true)
--verbose Stream the full output of every underlying command instead of the compact step view
Examples¶
Example 1: Creating a Standard Theoretical Training Path (ATP)
Resolves: Setting up a structured, textbook-based theoretical course section.
astrona content init atp \
--slug my-new-path \
--path-id ATP010 \
--title "My First Training Path" \
--author-name "Alice Smith"
Example 2: Scaffolding a Hands-On Practical Sandbox Lab (ATS)
Resolves: Setting up a VM/QEMU-backed virtual sandbox environment with custom disks and verification.
astrona content init ats ./labs/disk-discovery \
--slug virtio-disk-discovery \
--path-id ATS012 \
--title "Virtio Disk Discovery Lab" \
--author-name "Bob Jones"
Example 3: Customizing Templates via an External Blueprint Repository
Resolves: Bootstrapping structured content using an organization-specific custom template layout.
astrona content init atp \
--slug custom-path \
--repo git@github.com:my-org/custom-path-blueprint.git \
--path-id ATP040 \
--title "Custom Layout Path" \
--author-name "Alice Smith"
Example 4: Creating an ATP with Automated GitHub Repository and CODEOWNERS Setup
Resolves: Scaffolding a structured Training Path (ATP) and automatically setting up its remote GitHub repository.
astrona content init atp \
--slug kubernetes-networking-path \
--path-id ATP102 \
--title "Kubernetes Advanced Networking Path" \
--author-name "Alice Smith" \
--create-repo \
--github-org "my-org" \
--github-repo "K8S-NETWORKING-ATP" \
--codeowners
SEE ALSO¶
- astrona content - Validate, build and scaffold course content (sections of labs)