For a Developer Experience workflow, I want to implement a project bootstrap / setup config Linux CLI, that is used like:
git clone... provides the repo with project-config-schema.jsonproject-config... runs an interactive project configuration wizardA project-config.toml with config key-value pairs is written
A tool provides the config values automatically as environment variables for CLI commands run under the repo directory
This process:
reads a JSON Schema (or YAML),
interactively prompts and validates user input (including path existence),
writes a TOML config file for the project,
and makes those values available as environment variables in the current interactive shell (per-project), avoiding committing secrets.
Constraints:
Optimally, shouldn't require writing my own wizard script, but should consist of readily available CLI tools, that each solve their part, and can be combined to a seamless experience with as few lines of code as possible
Must support nested objects and arrays from schema → TOML tables / arrays of tables.
Secrets should not end up in repo; prefer OS keyring or runtime resolution.
The environment must be available in the current shell session after running the wizard (not only in subprocesses).
What I tried:
Implemented a Python prototype using jsonschema + questionary to prompt and validate, and write a project-config.toml for consumption by the CLI tool "mise".
I'm not impressed with the need of having to re-implement such a seemingly obvious problem (project schema → to config wizard → to config file), and think there must be ready made components available for combining into a tool like this.
What comes closest for a setup wizard, is copier.
I've looked into best practice for injecting these env vars into the current shell safely without requiring users to manually source files, and see that "direnv" and "mise" are options.
Questions:
Is direnv or mise the recommended way to make project-local per-directory env exports available to the current shell? Are there security or UX caveats I must consider?
For secrets, is storing them in OS keyring and having .projenv call a secret get subcommand a good pattern?
Any suggestions for existing schema-based project config setup wizards like copier, that you use as part of your tooling, to provide a smooth developer experience?
I’d appreciate best-practice recommendations from your everyday experience setting up your DX and example .envrc, .projenv or mise.toml patterns.