Build a devcontainer configuration through guided prompts: template, features, required environment variables, VS Code extensions, and advanced settings.
pks devcontainer wizard [options]$ pks devcontainer wizardRun the guided configuration builder
$ pks devcontainer wizard --quick-setupMinimal prompts with popular features only
$ pks devcontainer wizard --expert-modeAdd ports, environment, and post-create prompts
$ pks devcontainer wizard --from-templatesAlso discover templates from NuGet packages
pks devcontainer wizard builds a .devcontainer/devcontainer.json through prompts instead of flags. It covers everything pks devcontainer init does, and adds template discovery from NuGet, prompting for a template's required environment variables, and extension recommendations derived from the features you pick.
The wizard needs an interactive terminal. It uses selection prompts and key input throughout, so it is not scriptable — use init in CI.
pks devcontainer wizard [options]
-f is set.--from-templates is used.Run it from the repository you want to configure:
pks devcontainer wizard
The wizard proceeds through six steps.
--expert-mode you are also asked whether to use Docker Compose.--from-templates, NuGet-discovered templates are added to the list.token, secret, key, or password are read masked, and the wizard offers to reuse a matching variable already exported in your shell.--expert-mode: forwarded ports, environment variables, and a post-create command.A review step summarizes the configuration and asks for confirmation, then the files are generated the same way init generates them.
pks devcontainer validate --strict
The configuration the wizard wrote should report zero errors and zero warnings.
| Flag | Default | Description |
|---|---|---|
--skip-templates | false | Skip the template selection step. |
--skip-features | false | Skip the feature selection step. |
--skip-extensions | false | Skip the extension selection step. |
--expert-mode | false | Add the Docker Compose prompt and the advanced settings step. |
--quick-setup | false | Minimal prompts. Skips the template-or-image choice, shows at most ten features tagged popular or essential, and skips custom extensions. |
--from-templates | false | Also discover templates from NuGet packages. |
--sources <SOURCES> | https://api.nuget.org/v3/index.json | Comma-separated NuGet sources used for template discovery. |
--add-sources <SOURCES> | — | Comma-separated NuGet sources appended to the sources above. |
--debug | false | Print discovery diagnostics: source list, per-tag search results, exception detail. |
-o|--output-path <PATH> | current directory | Output directory for the generated files. |
-v|--verbose | false | Show extra tables for templates, features, extensions, and environment variables. |
-f|--force | false | Skip the overwrite confirmation. |
--dry-run | false | Run the full wizard, then list the files instead of writing them. |
No NuGet templates appear with --from-templates. Discovery searches the pks-devcontainers tag first, then falls back to the pks-cli tag filtered by devcontainer-related keywords in tags, title, and description. On any exception it warns and continues with built-in templates only. Run with --debug to see which sources were queried and what each tag returned.
Step 4 never appears. Environment-variable prompting only runs when the selected template declares required variables. Most built-in templates declare none.
The wizard hangs or errors in CI. It requires a TTY. Use pks devcontainer init for non-interactive generation.
A prompt echoes asterisks. Variable names containing token, secret, key, or password are matched case-insensitively and read as masked input.