DEV Community

Cover image for Blueprint - a boilerplate tool for the terminal
Milan Radojević
Milan Radojević

Posted on

Blueprint - a boilerplate tool for the terminal

What it is

In short, it copies files and directories (folders) instead of you.

Lets say you have a blueprint (WIP name for a collection of files and dirs) that you called flask-boilerplate. You go to an empty directory for your new flask project and type this in the terminal:

$ blueprint flask-boilerplate
Enter fullscreen mode Exit fullscreen mode

That's it!

If this is what you put in your blueprint:

.
├── templates
|   └── example_template.html
├── static
|   ├── style.css
|   └── main.js
└── start_server.py
Enter fullscreen mode Exit fullscreen mode

Then that is exactly what you will get, added to your project.

How it works

Creating a new blueprint

$ blueprint new blueprint-name-here
Enter fullscreen mode Exit fullscreen mode

Deleting an existing blueprint

$ blueprint delete blueprint-name-here
Enter fullscreen mode Exit fullscreen mode

Listing all existing blueprint

$ blueprint list

#output
# Avaiable blueprints:
#  i │ name     │ size
# ───┼──────────┼───────
#  0 │ html-min │ 24K
#  1 │ test1    │  4K
#  2 │ test2    │  4K
Enter fullscreen mode Exit fullscreen mode

Searching for blueprint names with regex

$ blueprint list regex-here

#output
# Avaiable blueprints:
#  i │ name            │ size
# ───┼─────────────────┼───────
#  0 │ regex-here1     │  15M
#  0 │ dont-regex-here │ 300G
Enter fullscreen mode Exit fullscreen mode

Showing contents of a blueprint

$ blueprint showfiles blueprint-name-here

#output
# Showing file for blueprint: blueprint-name-here
#    F | file1.txt
#    F | file2.txt
#    D | some-directory
Enter fullscreen mode Exit fullscreen mode

What I plan to do with this

This was a fun little side project, but I don't really have any plans for it. It works on Linux, which I'm using. I might make a version for Mac OS or Windows. I have uploaded it anywhere for download yet, but will do so later.

Any feedback

If you have any suggestions, I'd like to hear them.

Top comments (0)