Grams Contributors
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.
- 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 or NVM for 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.
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:
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.
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.
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
gcx setup [mygithubusername] -r mobile
gcx setup -k
Build
This command will build the specified repository.
gcx build <repository>
Examples
gcx build wiki
gcx build i18n
Install
This command will install the npm dependencies in a specific repository.
gcx install <repository> [options]
Examples
gcx install desktop
Minor
This command will publish a minor release of the specified repository.
gcx minor <repository>
Examples
gcx minor ui
Patch
This command will publish a patch release of the specified repository.
gcx patch <repository>
Examples
gcx patch core
Publish
This command will publish the current release of the specified repository.
gcx publish <repository>
Examples
gcx publish desktop
Run
This command will run an npm command within the specified repository.
gcx run <repository> <command> [options]
Examples
gcx run mobile android
gcx run desktop electron
Start
This command will start the specified repository.
gcx start <repository>
Examples
gcx start ui
gcx start extension
Update
This command will update the npm dependencies for a repository.
gcx update <repository>
Examples
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.