DEV Community

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

Posted on

2 1

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.

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay