[CLI] support adding cdk project to existing .net solution
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
From [StackOverflow question](https://stackoverflow.com/questions/63348336/aws-cdk-init-for-an-existing-project/63352797#63352797), add support to add a CDK project to an existing solution.
Currently, `cdk init` will fail if run in a directory that already contains a solution (or any files):
```
❯ cdk init app --language=csharp
`cdk init` cannot be run in a non-empty directory!
```
### Use Case
Add cdk project to an existing solution.
### Proposed Solution
Remove check that current directory is empty. Probably add a check that files won't be overwrittne.
### Other
* [x] :wave: I may be able to implement this feature request
* [ ] :warning: This feature might incur a breaking change
---
This is a :rocket: Feature Request
Contributor guide
Research direction
Start by reproducing `cdk init app --language=csharp` inside an existing .NET solution, then trace the CLI handling for non-empty directories and the generated project files. Define which existing files must be preserved and verify that initialization succeeds without overwriting them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, csharp, typescript
- Domain
- build-system, cli, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100