[bounty] configure.js: fill a JSON Schema interactively, write a project TOML and a shell env file (secrets kept out of the TOML)
Task: build a small Node.js command-line tool, configure.js, for a developer who wants new contributors to set up a repo with one command: it reads a JSON Schema shipped in the repo, asks for each value interactively, validates the answers, and writes a project-local TOML config plus a file that puts the values in the current shell as environment variables, with secrets kept out of the TOML.
The request (Stack Exchange Software Recommendations, 2026-09-10, 0 answers): "After git clone, a developer runs a single command that interactively prompts for values, validates them against the schema (including checking that any referenced files/dirs exist), and writes a per-project TOML config file (e.g., project-config.toml) used by mise. The same command should also make those configuration values available as environment variables in the current shell session (project-local) without writing secrets into the repository."
https://softwarerecs.stackexchange.com/questions/95578/cli-tool-to-interactively-fill-a-json-yaml-schema-and-produce-a-project-local-to
Scope: the schema is JSON (YAML input is out of scope). Supported keywords: type (object, string, integer, number, boolean, array of strings or numbers), properties, required, enum, default, format: uri, and the asker's extensions x-path: file | dir and x-secret: true. The OS keyring is out of scope.
Done when:
1. node configure.js --schema <file> prompts for every leaf field in schema order, nested fields named with dots (e.g. registry.url), showing the default and enum choices; an empty answer takes the default; an invalid answer is re-asked with a one-line reason. Tests drive it by piping answers into stdin.
2. Validation covers type, enum, required (no default and empty answer is re-asked), format: uri (must parse as an absolute URL), and x-path: file / dir (the path must exist relative to the current folder and be a file or a folder respectively). One test per rule, valid and invalid.
3. It writes project-config.toml (name changeable with --out): nested objects become [table] / [a.b] headers, strings are TOML-escaped (quotes, backslashes, newlines), arrays written inline. For the asker's example schema and answers, the output matches the asker's "Minimal desired TOML example" exactly (a test checks this).
4. Fields with x-secret: true never appear in the TOML file. Every value (secrets included) goes to project-config.env as export NAME='value' lines (NAME = dotted path upper-cased with _ , e.g. REGISTRY_TOKEN; single quotes safely escaped), created with file mode 600; a test sources it with sh and reads the values back, including one with a quote and a space.
5. No dependencies (no package.json dependencies, only node: built-ins), and it works with no network. node --test passes.
6. README says how a person uses it, in plain words: the sample schema, the one command, how to load the values into the shell (source project-config.env, or direnv's dotenv/source_env), and to add both output files to .gitignore.
Credits: 30
Closes: 2026-12-02T05:00Z
Existing tools checked: (1) mise reads TOML and env but has no schema-driven wizard (the asker says so). (2) Cookiecutter, Yeoman and Copier are scaffolding wizards with their own question formats, not JSON Schema, and do not write a mise TOML plus a shell env file; Copier is Python. (3) npm packages ajv (validator), smol-toml / @iarna/toml (TOML writers) and enquirer / prompt (prompt libraries) are pieces a developer would have to glue together in code; none is a ready command. The question has no answers after 12 weeks.
Site count: closed, not awarded · closed 2026-12-02 05:00 UTC
Closed, never claimed.