npm package: @grams-dev/contributors
Description: Streamlining the setup process and providing essential tools that facilitate efficient contributions to Grams.
Author: grams-dev
Latest version: 0.1.0

# Grams Contributors

[![npm version](https://img.shields.io/npm/v/@grams-dev/contributors)](https://www.npmjs.com/package/@grams-dev/contributors)
[![npm downloads](https://img.shields.io/npm/dm/@grams-dev/contributors)](https://www.npmjs.com/package/@grams-dev/contributors)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/grams-dev/contributors/blob/main/LICENSE)

Boost your productivity and streamline your open-source collaboration with Grams, an innovative decentralized platform that is reshaping the digital landscape. Our package, `@grams-dev/contributors`, simplifies your setup, enabling you to dedicate more time to coding and less time to configuration.

## Prerequisites

Before you get started, make sure you have the following installed:

- **Windows Subsystem for Linux (WSL)**: WSL allows developers to run a GNU/Linux environment directly on Windows. Open PowerShell as Administrator and run `wsl --install`. Ignore this step if you are on mac or linux.
- **Docker**: Docker is an open platform for developing, shipping, and running applications. [Download and install Docker](https://docs.docker.com/get-docker/).
- **Node Version Manager (NVM)**: A version manager for Node.js, simplifying the process of managing different versions of Node.js on a single system. [Download and install NVM](https://github.com/nvm-sh/nvm) or [NVM for Windows](https://github.com/coreybutler/nvm-windows).

> After installing NVM, install the latest version of Node.js by typing `nvm install node` in your terminal. 

- **GitHub CLI**: A powerful tool for using GitHub from your terminal. [Download and install GitHub CLI](https://cli.github.com/).

> Make sure to run `gh auth login` because all your interactions with git will be through Github's CLI.


## Setting Up Grams Contributor's Environment

The Grams project spans across multiple repositories. To help you navigate this complexity, we've developed the `@grams-dev/contributors` package. This tool clones the necessary repositories and sets up their dependencies with ease.

Install the contributors package globally using npm: 

```bash
npm install -g @grams-dev/contributors
```

## Usage

> Note that the CLI works on a workspace level, it is recommended to use it where you want to setup your vscode workspace file.

```shell
gcx <command> [options]
```

### Command Summary

- `setup [ghuser] [options]`: Setup repositories in your current directory.
- `build <repository>`: Build the specified repository.
- `install <repository> [options]`: Install dependencies in a repository.
- `minor <repository>`: Publish a minor release of the specified repository.
- `patch <repository>`: Publish a patch release of the specified repository.
- `publish <repository>`: Publish the current release of the specified repository.
- `run <repository> <command> [options]`: Run an npm command in the specified repository.
- `start <repository>`: Start the specified repository.
- `update <repository>`: Update npm dependencies for a repository.

### Global Options

- `-v, --version`: Show current version.
- `-h, --help`: Show help information.

## Commands

### Setup

This command will set up the repositories for development. It either clones the Grams repositories directly or forks them into your GitHub account if you provide your GitHub username. Defaults to setting up all of Grams's repositories.

```shell
gcx setup [ghuser] [options]
```

#### Arguments

- `ghuser`: Your GitHub username. If specified, repositories will be forked into your account. If not specified, you will just clone the grams-dev repositories.

#### Options

- `-a, --applications`: Setup the application layer including desktop, mobile.
- `-d, --developer`: Setup the developer tools including dApps, subjects.
- `-i, --integrations`: Setup the integration layer including sdk, chain, unity.
- `-k, --knowledgebase`: Setup the knowledge base including wiki, gip, and the main website.
- `-l, --libraries`: Setup the foundational layer including ui, core, types, i18n.
- `-r, --repository <repository>`: Setup specific repository.
- `-s, --services`: Setup the service layer including gns, marketplace.

#### Examples

```shell
gcx setup [mygithubusername] -r mobile
gcx setup -k
```

### Build

This command will build the specified repository.

```shell
gcx build <repository>
```

#### Examples

```shell
gcx build wiki
gcx build i18n
```

### Install

This command will install the npm dependencies in a specific repository.

```shell
gcx install <repository> [options]
```

#### Examples

```shell
gcx install desktop
```

### Minor

This command will publish a minor release of the specified repository.

```shell
gcx minor <repository>
```

#### Examples

```shell
gcx minor ui
```

### Patch

This command will publish a patch release of the specified repository.

```shell
gcx patch <repository>
```

#### Examples

```shell
gcx patch core
```

### Publish

This command will publish the current release of the specified repository.

```shell
gcx publish <repository>
```

#### Examples

```shell
gcx publish desktop
```

### Run

This command will run an npm command within the specified repository.

```shell
gcx run <repository> <command> [options]
```

#### Examples

```shell
gcx run mobile android
gcx run desktop electron
```

### Start

This command will start the specified repository.

```shell
gcx start <repository>
```

#### Examples

```shell
gcx start ui
gcx start extension
```

### Update

This command will update the npm dependencies for a repository.

```shell
gcx update <repository>
```

#### Examples

```shell
gcx update desktop
gcx update dapps
```

## Help

You can access the help section by running `gcx --help`. This command will display a list of all available commands and options you can use with the Grams Contributors CLI.