Coder Social home page Coder Social logo

vision's Introduction

Vision

Roadmap

TODO:

  • Brew install

Install

From source:

Requires go to be installed

go install github.com/vision-cli/vision@latest

Build from source:

git clone github.com/vision-cli/vision
go build
# add binary to path

Purpose

Vision is a developer productivity tool which uses plugins to scaffold code templates. It is intended to make the developer experience better by automating a lot of repetitive boilerplate.

Usage

1. Initialise a Vision project.

init can accept a project name with the -p flag, where it creates a vision.json in the current working directory, and/or it can accept an optional argument that creates a new directory. Not including the -p flag assigns the name of the directory as the project name in vision.json.

tonystark:~ vision init [DIR] [-p/--project PROJECTNAME]
tonystark:~ vision init avengers

vision init avengers-assemble \
  -p=avengers \
  -m="github.com/stark-industries/avengers-assemble"

This creates a directory called avengers and creates a vision.json file within avengers. It also assigns the project_name as avengers.

{
  "project_name": "avengers"
}

2. Initialise plugins to use inside project.

We'll initialise a new Go REST server inside the avengers directory.

tonystark:~/avengers vision gorest init

This adds a template configuration to the vision.json file which needs to be changed to your specific data.

3. Generate the template files from the plugin

To create a

tonystark:~/avengers vision plugin init
- myproject
|__ services
  |__ user_service
    |__  cmd
    |__ internal
|__ vision.json

Visual tutorial/demo

To see an example of how to successfully use a vision plugin, you can watch this video.

Design

The vision cli is really a wrapper around vision plugins. The cli's purpose is to provide helper functions around managing plugins. The plugins will do the code generation.

Ideally projects are created using vision and services are added using vision. This allows vision to manage a project lifecycle and upgrades via its plugins.

Plugins can be made with vision, and should adhere to the vision plugin API.

Best practises

vision's People

Contributors

kavindapelpola avatar maartenh avatar coniix avatar kynrai avatar lstratta avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.