npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@qdivision/chip

v1.8.1

Published

Easily manage microservices and infrastructure for local development

Downloads

6

Readme

Installation

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

Usage

All subcommands supported by chip can be viewed by running chip help:

chip <command>

Commands:
  chip sync [services|tags..]               Clone or pull repos for services in
                                            project
  chip checkout <branch> [services|tags..]  Checkout a git branch for services in
                                            project
  chip status [services|tags..]             Show git status for services in project
  chip install [services|tags..]            Install dependencies for services in
                                            project
  chip start [services|tags..]              Start services in project
  chip stop [services|tags..]               Stop services in project
  chip restart [services|tags..]            Stop and restart services in project
  chip logs [services|tags..]               View logs for services in project
  chip list                                 List all services in project

Sample Project

The 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.

sandwich-ui screenshot

Sample chip.yml

# Runs at start of every `install` and `run` subprocess
setup: |
  export sdkman_auto_answer=true
  source "$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 services
install: |
  echo 'no' | sdk install java 11.0.2-open
  nvm 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-open
  nvm use 10.16.3

services:
  sandwich-ui:
    repo: '[email protected]:QDivision/sandwich-ui.git'
    install: 'yarn install'
    run: 'yarn start'
    tags:
      - sandwich

  sandwich-api:
    repo: '[email protected]:QDivision/sandwich-api.git'
    install: 'mvn clean package -D maven.test.skip=true'
    run: 'mvn spring-boot:run -D spring-boot.run.profiles=local'
    tags:
      - sandwich

  ingredient-api:
    repo: '[email protected]: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 protected]:QDivision/emoji-api.git'
    install: 'yarn install'
    run: 'yarn start'

Sample secretchip.yml

WARNING: The secretchip.yml file should not be committed to Git! Please be sure to add it to your .gitignore!

services:
  sandwich-api:
    SPRING_DATASOURCE_USERNAME: sandwichadmin
    SPRING_DATASOURCE_PASSWORD: sandwichadmin
    SPRING_LIQUIBASE_USER: sandwichadmin
    SPRING_LIQUIBASE_PASSWORD: sandwichadmin
    SPRING_RABBITMQ_USERNAME: wabbit
    SPRING_RABBITMQ_PASSWORD: wabbit

  ingredient-api:
    SPRING_DATASOURCE_USERNAME: ingredientadmin
    SPRING_DATASOURCE_PASSWORD: ingredientadmin
    SPRING_LIQUIBASE_USER: ingredientadmin
    SPRING_LIQUIBASE_PASSWORD: ingredientadmin
    SPRING_RABBITMQ_USERNAME: wabbit
    SPRING_RABBITMQ_PASSWORD: wabbit

  emoji-api:
    DB_USERNAME: emojiadmin
    DB_PASSWORD: emojiadmin

Development Installation

Run the following commands to clone the chip source code and set it up for development it on your machine.

git clone [email protected]: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 chip.

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 chip.

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