Description
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description
Currently, the docs (and default project template after running cdktf init
) require cdktf-cli
to be installed globally. This defeats the purpose of npm's package management, where every project contains all its dependencies and can be repeatably built in different environments.
Currently, if there is a breaking change to the way cdktf-cli
works, and I create a new template, but also have to work with an existing template, I would have to uninstall / reinstall cdktf-cli
each time I want to switch which package I am working on, or manually add cdktf-cli
as a dependency for each project, and uninstall it globally.
I am proposing two changes:
- Update the docs to use
npx
rather than instructing users to installcdktf-cli
globally- See references for what it takes to make this work, but this should look something like
npx create-react-app
but for cdktf. So, for example,npx cdktf-init
- See references for what it takes to make this work, but this should look something like
- Update the project template from
cdktf init
to depend oncdktf-cli
directly in its dependencies.
This should be pretty straightforward, but requires a new repository / published npm package that y'all should create.