Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/great-eels-grab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"scaffolder-toolkit": minor
---

feat(config): Add --yes/-y option to dk init for non-interactive overwrite
10 changes: 5 additions & 5 deletions packages/devkit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ dk new js my-new-project-name -t gh-template

The `init` command allows you to initialize a configuration file at different scopes.

**Note:** If a configuration file already exists at the specified location, you will be prompted to confirm if you want to overwrite it.
**Note:** If a configuration file already exists at the specified location, you will be prompted to confirm if you want to overwrite it. To **skip the confirmation prompt and force overwrite**, use the **`--yes`** flag.

- To initialize a **local** configuration file in your current project, use the `--local` flag, or run the command without any flags. The file will be named `.devkit.json`.
- To initialize a **global** configuration file, use the `--global` flag. The file will be named `.devkitrc`.
Expand All @@ -429,11 +429,11 @@ The `init` command allows you to initialize a configuration file at different sc
# Initialize a local configuration file in the current directory (default)
dk init

# Initialize a local configuration file in the current directory (explicit)
dk init --local
# Initialize a local configuration file and automatically overwrite if it exists
dk init --local --yes

# Initialize a global configuration file
dk init --global
# Initialize a global configuration file and force overwrite using the short alias
dk init --global -y
```

### Add the JSON Schema for Autocompletion
Expand Down
10 changes: 3 additions & 7 deletions packages/devkit/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,15 @@ This document tracks all planned and completed tasks for the Dev Kit project.
- [x] Make sure to clean up if the `dk new` command fail
- [x] Add a configuration validation step when updating the config file to ensure all required fields are present and correctly formatted.
- [x] **Dynamic Help Text**: Programmatically generate help text for options with constrained values (e.g., `--cache-strategy`) to ensure it's always up to date.
- [ ] **Skip Confirmation**: Add a global `-y`/`--yes` and `-n/--no` option to skip confirmation prompts in commands like `dk init`.
- [x] **Package Updates**: Ensure the root `package.json` includes all new packages and that any corrupted packages are replaced.
- [x] **Skip Confirmation**: Add a global `-y`/`--yes` option to skip confirmation prompts in commands like `dk init`.

#### Multi-Language Support

- [ ] **Multi-Programming Language Support**: Progressively add support for other languages like Python, Ruby, Go, and Rust.
- [ ] **Deno Support**: Test and confirm support for the Deno runtime.

#### Documentation & Versioning

- [ ] **Security Documentation**: Add a new section to the documentation outlining the security measures taken to prevent supply chain attacks.
- [x] **Package Updates**: Ensure the root `package.json` includes all new packages and that any corrupted packages are replaced.

### Debating
### Debating (RD)

- [ ] For unsupported languages, we can let the configuration be added but with a warning that it's not supported yet. When using the `dk new` with an unsupported language, we can copy the template as is without any modifications but ignoring the `.git` folder and not installing dependencies.
- [ ] **CLI Self-Update**: Implement a command to allow users to update the CLI itself. `dk upgrade`
Expand Down
Loading