Config2FS is a CLI tool written in Go that allows you to generate file system structures based on YAML configuration files. It provides an easy way to scaffold out new projects or generate commonly used directory and file structures.
- Generate folders and files from a simple YAML configuration
- Cross-platform support (Windows, macOS, Linux)
- Easy to extend and integrate into existing workflows
- Clone this repository.
- Navigate to the project directory.
- Run
go build
to compile the project. - (Optional) Add the compiled binary to your PATH.
- Create a YAML file describing your desired file system structure.
- Run the tool using:
go run main.go --path=/path/to/your/config.yaml
Here's an example YAML configuration:
project_name: my-project
project_type: monorepo
project_path: /your/project/directory
project_structure:
file:Dockerfile: []
file:Makefile: []
cmd:
user-service:
handlers:
file:user_profile_handler.go: []
file:user_login_handler.go: []
file:main.go: []
payment-service:
handlers:
file:payment_handler.go: [ ]
file:main.go: [ ]
file:go.mod: []
Feel free to open issues or PRs if you have suggestions or bug reports.
- We can support the templates for the created files. For example; inside the yaml file we can define the template for the go.mod file and the tool can generate the go.mod file with the given template.
MIT