onflow / flow-cli

The Flow CLI is a command-line interface that provides useful utilities for building Flow applications
https://onflow.org
Apache License 2.0
206 stars 66 forks source link

Allow use of `flow init` for existing directories #1809

Open jribbink opened 2 weeks ago

jribbink commented 2 weeks ago

Issue To Be Solved

It would be nice to allow developers to run flow init in an existing directory. Frequently, developers will start with a Frontend project, for instance, and wish to add Cadence code to this existing boilerplate. It would be helpful to be able to run flow init in this folder to encourage interoperability with existing FE projects (the alternative now is putting whole Cadence project in separate folder, not using flow init, or using --config-only)

(Optional): Suggest A Solution

(somehow) Allow this to be possible. Would (ideally) involve checking for collisions before guiding the user throguh the init process instead of surfacing this error once they have walked through all the steps.