An open API service indexing awesome lists of open source software.

https://github.com/narven/blueprint

Blueprint is a command line tool to help you scaffold any files/folders structure based on blueprints written in yaml.
https://github.com/narven/blueprint

binary filesystem golang scaffold tool

Last synced: about 1 month ago
JSON representation

Blueprint is a command line tool to help you scaffold any files/folders structure based on blueprints written in yaml.

Awesome Lists containing this project

README

          

# blueprint

> Blueprint is a command line tool to help you scaffold any files/folders structure based on blueprints written in yaml.

## Download

Just download one of the existing [releases](https://github.com/Narven/blueprint/releases) into you path.

# Usage

Create a minimal yaml file called `simple.yml` and paste the following snippet.

```yml
version: 1

name: Simple Blueprint

path: dist/simple

structure:
- FolderFoo
- FolderBar
- README.md: |
# My Project generated by Blueprint v1
- .gitignore: |
.DS_STORE
yarn.log
package-lock.json
- Makefile:
- .editorconfig:
```

run command:
```bash
blueprint generate -t simple.yml
```

This will generate a folder/file structure based on what was defined in the yml, inside `dist` folder.
Something like this:

```bash
├── FolderBar
├── FolderFoo
├── .editorconfig
├── .gitignore
├── Makefile
└── README.md
```

### Another example

```yml
version: 1

name: Test1

path: apps/api/internal/calendar

structure:
- delivery
- dtos
- repository
- usecase
- delivery.go: |
package calendar

type Handlers interface {

}
- repository.go: |
package calendar

type Repository interface {

}
- usecase.go: |
package calendar

type UseCase interface {

}
```

## Releases

`make version= release`

## TODO

* [x] Generate basic folder/file structure (1 level deep)
* [ ] Generate multi level folder/file structure
* [ ] Pass path name using args to replace the one from yml
* [ ] Use flags + template system to be to pass variables into the yml file, to make it more dynamic
* [ ] Create tests and add them to CI
* [ ] Better validation and error reporting
* [ ] Add --dry-run
* [ ] Be able to import external template files for the files contents