Run the following command to install
chip from NPM:
yarn global add @qdivision/chip
You can update your installation by running:
yarn global upgrade @qdivision/chip
All subcommands supported by
chip can be viewed by running
chip <command> Commands: chip sync [services..] Clone or pull repos for services in project chip checkout <branch> [services..] Checkout a git branch for services in project chip status [services..] Show git status for services in project chip install [services..] Install dependencies for services in project chip start [services..] Start services in project chip stop [services..] Stop services in project chip restart [services..] Stop and restart services in project chip logs [services..] View logs for services in project chip list List all services in project
sandwich repo is a sample project that demonstrates how to setup a project to work with
chip. It contains PostgreSQL databases, a RabbitMQ broker, a React app, as well as backend services written in Java, Kotlin, and Node.
# Runs at start of every `install` and `run` subprocesssetup: |export sdkman_auto_answer=truesource "$HOME/.sdkman/bin/sdkman-init.sh"export NVM_DIR="$HOME/.nvm"if [ -f "$NVM_DIR/nvm.sh" ]; then. "$NVM_DIR/nvm.sh"else. "/usr/local/opt/nvm/nvm.sh"fi# Runs before `install` subprocesses for servicesinstall: |echo 'no' | sdk install java 11.0.2-opennvm install 10.16.3# Runs at start of every service-level `install` and `run` subprocess,# after `setup`setup-service: |sdk use java 11.0.2-opennvm use 10.16.3services:sandwich-ui:repo: 'firstname.lastname@example.org:QDivision/sandwich-ui.git'install: 'yarn install'run: 'yarn start'sandwich-api:repo: 'email@example.com:QDivision/sandwich-api.git'install: 'mvn clean package -D maven.test.skip=true'run: 'mvn spring-boot:run -D spring-boot.run.profiles=local'ingredient-api:repo: 'firstname.lastname@example.org:QDivision/ingredient-api.git'install: 'mvn clean package -D maven.test.skip=true'run: 'mvn spring-boot:run -D spring-boot.run.profiles=local'emoji-api:repo: 'email@example.com:QDivision/emoji-api.git'install: 'yarn install'run: 'yarn start'
secretchip.yml file should not be committed to Git! Please be sure to add it to your
services:sandwich-api:SPRING_DATASOURCE_USERNAME: sandwichadminSPRING_DATASOURCE_PASSWORD: sandwichadminSPRING_LIQUIBASE_USER: sandwichadminSPRING_LIQUIBASE_PASSWORD: sandwichadminSPRING_RABBITMQ_USERNAME: wabbitSPRING_RABBITMQ_PASSWORD: wabbitingredient-api:SPRING_DATASOURCE_USERNAME: ingredientadminSPRING_DATASOURCE_PASSWORD: ingredientadminSPRING_LIQUIBASE_USER: ingredientadminSPRING_LIQUIBASE_PASSWORD: ingredientadminSPRING_RABBITMQ_USERNAME: wabbitSPRING_RABBITMQ_PASSWORD: wabbitemoji-api:DB_USERNAME: emojiadminDB_PASSWORD: emojiadmin
Run the following commands to clone the
chip source code and set it up for development it on your machine.
git clone firstname.lastname@example.org:QDivision/chip.git cd chip yarn install yarn build yarn link chip help
Note that you must run
yarn build each time you make a change to the
.ts source files in order for it to be picked up when you run
If you are actively making changes to the source code you can run
yarn buildw to start a process that will automatically detect changes to the source files and recompile the project for you. This is the fastest and easiest way to develop
If chip was initially installed through Yarn and you want to switch to a development installation, you should run the following commands.
cd chip yarn global remove @qdivision/chip yarn unlink yarn link