open-index/open-npm huggingface dataset:
npm package: @naseej/blox
Description: blox cli
Latest version: 1.4.4

#
![logo](./assets/blox.png)

### Introduction and Goals

BLOX is started kit built to speed Medad Product development by providing prebuild blocks of code that can be added with all its provided functionalities in one cli command.

### Prerequisites

- Install [yarn](https://classic.yarnpkg.com/lang/en/docs/install/)

### Install

It can have many way to be installed, mainly as global npm package

```shell
  npm install -g patch-package @naseej/blox
```

* make sure npm is already in you $Path to be able to use blox globally

### Usage

```sh
  blox --help
```

```
BLOX CLI

Commands:
  blox init    Init new app                                         [alias: i]
  blox add     Add block to app                                     [alias: a]
  blox update  Update app/block                                     [alias: u]
  blox conf    Set blox global config                               [alias: c]
  blox upgrade Upgrade blox cli to latest version
  blox migrate Migrate blox schema
  blox detach  Detach to base

Options:
  -V, --version  Show version number                                       [boolean]
  -h, --help     Show help                                                 [boolean]
  -d, --debug    Works in debug mode                                       [boolean]
  -m, --minimal  Works in minimal mode                                     [boolean]
```

* Use minimal mode if spinners are getting in the way of needed input for example.

### Available commands

* [init](#init)
* [add](#add)
* [update](#update)
* [conf](#conf)
* [upgrade](#upgrade)
* [migrate](#migrate)

#### init

```sh
  blox init --help
```

```
blox init

Init new app

Options:                                        
  -n, --name      App name
  -t, --template  Template to use
  --branch, branch name to use
```

#### add

```sh
  blox add --help
```

```
blox add [block]

Add block to app

Params:
  block Block name (Optional)
  
Options:                                        
  --branch, branch name to use
  --dest, destination dir
```

#### update

```sh
  blox update --help
```

```
blox update

Update app/block

Options:
  -s, --scope          Scope of update [choices: "app", "bases", "block", "all"] [default: "all"]
  -b, --block          Block to update, valid only with scope block
```

* Note: you may need to resolve merge conflicts if found

#### conf

```sh
  blox sync --help
```

```
blox conf

Set blox global config

Options:
  -r, --registries Remote registries urls
```

#### upgrade

```sh
  blox upgrade
```

```
blox upgrade

Upgrade blox cli to latest version
```
#### migrate

```sh
  blox migrate --help
```

```
blox migrate

Migrate blox schema
```

### Docs

- [Design](./docs/design.md)