Skip to content

Commit

Permalink
🔖 v1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Olusamimaths committed Jun 21, 2023
1 parent 54ef9fb commit 4e43af7
Show file tree
Hide file tree
Showing 8 changed files with 107 additions and 7 deletions.
Empty file added bin/LICENSE
Empty file.
101 changes: 101 additions & 0 deletions bin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Overview
**Onboardbase Kit** (onboardbasekit) is a CLI tool for generating boilerplates with onboardbase preconfigured in them as a SecretOps infrastucture.

# Installation

## Installing with Go:
```
go install github.com/Onboardbase/onboardbasekit@latest
```

## Installing with Brew:
```
brew tap onboardbase/onboardbasekit
brew install onboardbasekit
```

# Usage
Run to see all the commands available
```
onboardbasekit help
```

This will display information about the CLI

![alt obb help](./docs/images/onboarbasekit_help.png)

To get more information about a command run the command with `-h`, for example:
```
onboardbasekit init -h
```

We also have artifacts for different system architechtures [here](https://github.com/Onboardbase/onboardbasekit/releases)

## Initializing a Project
Run the init command:
```
onboardbasekit init
```
After providing the project name, you can select a project type:
![alt Init](./docs/images/obb_init.png)

**Note**: *You must have the build tools needed to create the project you selected. For example, if you selected a project type based on NodeJS e.g NestJs, Next.js, you must have Node.js already installed on your computer*

After selecting a project type, you will be prompted to complete the flow for creating project:

![alt Init](./docs/images/init_project.png)

## Initializing a Project From Git Repository
**Note**: *You must have git installed and configure on your machine to do this*

onboardbasekit can also automatically setup a project directrly from a github repo. It will attempt to clone the repository and then configure Onboardbase inside of it. This means that you must have the permission to clone the repository if it's a private repository.

To initialize from a git reposity run
```
onboardbasekit init --from-git [git-repository]
e.g
onboardbasekit init --from-git https://github.com/Onboardbase/Flask-Starterkit.git
```

# Contributing

## Local Setup
Clone this repo and run `go mod`. You can then start the application with `go run main.go`

## Adding More Project Types

Support for other frameworks are welcome. The easiest way to add a new project type support is to extend our git integration.

If you want to a new project type and there is a popular, open source community-vested boilerplate repository for that project type, you can make a PR to include that. The `kit/flask.go` is a reference for how to do just that.

You will then need to add the project type to the `project_types/types` const, this is the current list we have:
```
const (
Nestjs = "NestJS"
Nextjs = "NextJS"
Reactjs = "React.js"
Vuejs = "VueJs"
Flask = "Flask"
)
```

Afterwards, you will need to include the new project type inside of `kit/init.go`:
```
func collectProjectType() string {
...
items := []string {
project_types.Nestjs,
project_types.Nextjs,
project_types.Reactjs,
project_types.Vuejs,
project_types.Flask,
}
...
}
```

We have a simple sequence diagram for the project here `docs/images/OBB_Kit_flow.png`
File renamed without changes.
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var rootCmd = &cobra.Command{
Use: "onboardbasekit",
Short: "CLI tool for generating boilerplates projects with Onboardbase completely setup.",
Aliases: []string{"obb"},
Version: "1.0.4",
Version: "1.0.5",
}

// Execute adds all child commands to the root command and sets flags appropriately.
Expand Down
1 change: 1 addition & 0 deletions npm-install/getReleaseInfo.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as fs from "fs/promises";
import os from "os";

function getSystemInfo() {
const type = os.type();
const arch = os.arch();
Expand Down
1 change: 0 additions & 1 deletion npm-install/postinstall.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as triples from "@napi-rs/triples";
import { createWriteStream } from "fs";
import * as fs from "fs/promises";
import fetch from "node-fetch";
Expand Down
File renamed without changes.
9 changes: 4 additions & 5 deletions npm-install/package.json → package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "onboardbasekit",
"version": "1.0.4",
"version": "1.0.5",
"description": "**Onboardbase Kit** (onboardbasekit) is a CLI tool for generating boilerplates with onboardbase preconfigured in them as a SecretOps infrastucture.",
"main": "index.js",
"type": "module",
Expand Down Expand Up @@ -29,18 +29,17 @@
"homepage": "https://github.com/Onboardbase/onboardbasekit#readme",
"devDependencies": {},
"dependencies": {
"@napi-rs/triples": "^1.1.0",
"node-fetch": "^3.1.0",
"tar": "^6.1.11"
},
"scripts": {
"postinstall": "node ./postinstall.js"
"postinstall": "node ./npm-install/postinstall.js"
},
"files": [
".",
"npm-install",
"README.md"
],
"bin": {
"onboardbasekit": "./bin/onboardbasekit.js"
"onboardbasekit": "bin/onboardbasekit.js"
}
}

0 comments on commit 4e43af7

Please sign in to comment.