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

nimbu

v5.4.0

Published

Tools for Nimbu projects

Downloads

110

Readme

Nimbu CLI

Build Status codecov

Toolbelt for Nimbu projects

Version Downloads/week License

Usage

Prerequisites

You need a recent node and yarn. On Mac OS X:

brew install node yarn

You still need what was needed to use the old toolchain (ruby, bundler, ...)

Getting started

Add this package to your project:

yarn add --dev nimbu

This will also execute bundle install to install the old toolchain it uses.

Development server

To start developing on your project that uses this toolbelt, just run:

yarn nimbu server

This will start a webpack-dev-server (and the old nimbu server that it proxies to). Your browser should automatically open a connection to it at http://localhost:4567/.

Pushing to nimbu

  1. Stop your development server
  2. Make a production build with yarn nimbu build
  3. Push to nimbu with yarn nimbu themes:push (this calls the ruby-based toolchain -> all arguments you know are supported)

NOTE: Both the development and production webpack configuration generate snippets/webpack.liquid that gives access to the information about which files webpack generated. This should be included and used in the layout of your theme. Make sure that include is there and that you push the snippet to nimbu!

Commands

nimbu apps:config

Add an app to the local configuration

USAGE
  $ nimbu apps:config

DESCRIPTION
  Add an app to the local configuration

See code: lib/commands/apps/config.js

nimbu apps:list

List the applications registered in Nimbu

USAGE
  $ nimbu apps:list

DESCRIPTION
  List the applications registered in Nimbu

See code: lib/commands/apps/list.js

nimbu apps:push [FILES]

Push your cloud code files to nimbu

USAGE
  $ nimbu apps:push [FILES] [-a <value>]

ARGUMENTS
  FILES  The files to push.

FLAGS
  -a, --app=<value>  The (local) name of the application to push to (see apps:list and apps:config).

DESCRIPTION
  Push your cloud code files to nimbu

See code: lib/commands/apps/push.js

nimbu auth:login

login with your nimbu credentials

USAGE
  $ nimbu auth:login [-e <value>]

FLAGS
  -e, --expires-in=<value>  duration of token in seconds (default 1 year)

DESCRIPTION
  login with your nimbu credentials

ALIASES
  $ nimbu login

See code: lib/commands/auth/login.js

nimbu auth:logout

clears local login credentials and invalidates API session

USAGE
  $ nimbu auth:logout

DESCRIPTION
  clears local login credentials and invalidates API session

ALIASES
  $ nimbu logout

See code: lib/commands/auth/logout.js

nimbu auth:token

outputs current CLI authentication token.

USAGE
  $ nimbu auth:token [-h]

FLAGS
  -h, --help  Show CLI help.

DESCRIPTION
  outputs current CLI authentication token.

  By default, the CLI auth token is only valid for 1 year. To generate a long-lived token, use nimbu
  authorizations:create

See code: lib/commands/auth/token.js

nimbu auth:whoami

display the current logged in user

USAGE
  $ nimbu auth:whoami

DESCRIPTION
  display the current logged in user

ALIASES
  $ nimbu whoami

See code: lib/commands/auth/whoami.js

nimbu autocomplete [SHELL]

display autocomplete installation instructions

USAGE
  $ nimbu autocomplete [SHELL] [-r]

ARGUMENTS
  SHELL  shell type

FLAGS
  -r, --refresh-cache  Refresh cache (ignores displaying instructions)

DESCRIPTION
  display autocomplete installation instructions

EXAMPLES
  $ nimbu autocomplete

  $ nimbu autocomplete bash

  $ nimbu autocomplete zsh

  $ nimbu autocomplete --refresh-cache

See code: @oclif/plugin-autocomplete

nimbu browse:admin

open the admin area for your current site

USAGE
  $ nimbu browse:admin

DESCRIPTION
  open the admin area for your current site

See code: lib/commands/browse/admin.js

nimbu browse:simulator

open the simulator for your current site

USAGE
  $ nimbu browse:simulator

DESCRIPTION
  open the simulator for your current site

See code: lib/commands/browse/simulator.js

nimbu channels:copy

copy channel configuration from one to another

USAGE
  $ nimbu channels:copy -f <value> -t <value> [--force] [-a]

FLAGS
  -a, --all           copy all channels from source to target
  -f, --from=<value>  (required) slug of the source channel
  -t, --to=<value>    (required) slug of the target channel
  --force             do not ask confirmation to overwrite existing channel

DESCRIPTION
  copy channel configuration from one to another

See code: lib/commands/channels/copy.js

nimbu channels:diff

check differences between channel settings from one to another

USAGE
  $ nimbu channels:diff -f <value> -t <value>

FLAGS
  -f, --from=<value>  (required) slug of the source channel
  -t, --to=<value>    (required) slug of the target channel

DESCRIPTION
  check differences between channel settings from one to another

See code: lib/commands/channels/diff.js

nimbu channels:entries:copy

copy channel entries from one to another

USAGE
  $ nimbu channels:entries:copy -f <value> -t <value> [-q <value>] [-w <value>] [-u <value>] [-p <value>] [-r] [--only
    <value>] [--copy-customers] [--allow-errors]

FLAGS
  -f, --from=<value>      (required) slug of the source channel
  -p, --per-page=<value>  number of entries to fetch per page
  -q, --query=<value>     query params to append to source channel api call
  -r, --recursive         automatically copy all dependent objects
  -t, --to=<value>        (required) slug of the target channel
  -u, --upsert=<value>    name of parameter to use for matching existing documents
  -w, --where=<value>     query expression to filter the source channel
  --allow-errors          do not stop when an item fails and continue with the other
  --copy-customers        copy and replicate all owners related to the objects we are copying
  --only=<value>          limit copy of channels to this list (comma-separated)

DESCRIPTION
  copy channel entries from one to another

See code: lib/commands/channels/entries/copy.js

nimbu channels:info CHANNEL

list info about this channel

USAGE
  $ nimbu channels:info [CHANNEL] [--columns <value> | -x] [--sort <value>] [--filter <value>] [--output
    csv|json|yaml|ts |  | [--csv | --no-truncate]] [--no-header | ]

ARGUMENTS
  CHANNEL  slug of your channel (optionally with the site, i.e. site/channel)

FLAGS
  -x, --extended     show extra columns
  --columns=<value>  only show provided columns (comma-separated)
  --csv              output is csv format [alias: --output=csv]
  --filter=<value>   filter property by partial string matching, ex: name=foo
  --no-header        hide table header from output
  --no-truncate      do not truncate output to fit screen
  --output=<option>  output in a more machine friendly format
                     <options: csv|json|yaml|ts>
  --sort=<value>     property to sort by (prepend '-' for descending)

DESCRIPTION
  list info about this channel

See code: lib/commands/channels/info.js

nimbu commands

list all the commands

USAGE
  $ nimbu commands [--json] [-h] [--hidden] [--columns <value> | -x] [--sort <value>] [--filter <value>]
    [--output csv|json|yaml |  | [--csv | --no-truncate]] [--no-header | ]

FLAGS
  -h, --help         Show CLI help.
  -x, --extended     show extra columns
  --columns=<value>  only show provided columns (comma-separated)
  --csv              output is csv format [alias: --output=csv]
  --filter=<value>   filter property by partial string matching, ex: name=foo
  --hidden           show hidden commands
  --no-header        hide table header from output
  --no-truncate      do not truncate output to fit screen
  --output=<option>  output in a more machine friendly format
                     <options: csv|json|yaml>
  --sort=<value>     property to sort by (prepend '-' for descending)

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  list all the commands

See code: @oclif/plugin-commands

nimbu config

Show resolved configuration

USAGE
  $ nimbu config

DESCRIPTION
  Show resolved configuration

See code: lib/commands/config.js

nimbu customers:config:copy

copy customer customizations from one to another

USAGE
  $ nimbu customers:config:copy [-f <value>] [-t <value>]

FLAGS
  -f, --from=<value>  subdomain of the source site
  -t, --to=<value>    subdomain of the destination site

DESCRIPTION
  copy customer customizations from one to another

See code: lib/commands/customers/config/copy.js

nimbu customers:config:diff

check differences between customer customizations from one to another

USAGE
  $ nimbu customers:config:diff -f <value> -t <value>

FLAGS
  -f, --from=<value>  (required) slug of the source channel
  -t, --to=<value>    (required) slug of the target channel

DESCRIPTION
  check differences between customer customizations from one to another

See code: lib/commands/customers/config/diff.js

nimbu help [COMMAND]

Display help for nimbu.

USAGE
  $ nimbu help [COMMAND] [-n]

ARGUMENTS
  COMMAND  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for nimbu.

See code: @oclif/plugin-help

nimbu init

initialize your working directory to code a selected theme

USAGE
  $ nimbu init [-c] [-h] [-s <value>]

FLAGS
  -c, --cloudcode     Create CloudCode directory
  -h, --haml          Use HAML for the templates in this project
  -s, --site=<value>  The site (use the Nimbu subdomain) to link to this project.

DESCRIPTION
  initialize your working directory to code a selected theme

See code: lib/commands/init/index.js

nimbu mails:pull

download all notification templates

USAGE
  $ nimbu mails:pull [-o <value>]

FLAGS
  -o, --only=<value>...  the names of the templates to pull from Nimbu

DESCRIPTION
  download all notification templates

See code: lib/commands/mails/pull.js

nimbu mails:push

upload all notification templates

USAGE
  $ nimbu mails:push [-o <value>]

FLAGS
  -o, --only=<value>...  the names of the templates to push online

DESCRIPTION
  upload all notification templates

See code: lib/commands/mails/push.js

nimbu menus:copy [SLUG]

copy menus from one site to another

USAGE
  $ nimbu menus:copy [SLUG] [-f <value>] [-t <value>]

ARGUMENTS
  SLUG  permalink of menu to be copied

FLAGS
  -f, --from=<value>  subdomain of the source site
  -t, --to=<value>    subdomain of the destination site

DESCRIPTION
  copy menus from one site to another

See code: lib/commands/menus/copy.js

nimbu pages:copy [FULLPATH]

copy page from one site to another

USAGE
  $ nimbu pages:copy [FULLPATH] [-f <value>] [-t <value>] [--toHost <value>] [--fromHost <value>]

ARGUMENTS
  FULLPATH  [default: *] fullpath of pages to be copied

FLAGS
  -f, --from=<value>  subdomain of the source site
  -t, --to=<value>    subdomain of the destination site
  --fromHost=<value>  hostname of origin Nimbu API
  --toHost=<value>    hostname of target Nimbu API

DESCRIPTION
  copy page from one site to another

See code: lib/commands/pages/copy.js

nimbu plugins

List installed plugins.

USAGE
  $ nimbu plugins [--core]

FLAGS
  --core  Show core plugins.

DESCRIPTION
  List installed plugins.

EXAMPLES
  $ nimbu plugins

See code: @oclif/plugin-plugins

nimbu plugins:inspect PLUGIN...

Displays installation properties of a plugin.

USAGE
  $ nimbu plugins:inspect PLUGIN...

ARGUMENTS
  PLUGIN  [default: .] Plugin to inspect.

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Displays installation properties of a plugin.

EXAMPLES
  $ nimbu plugins:inspect myplugin

See code: @oclif/plugin-plugins

nimbu plugins:install PLUGIN...

Installs a plugin into the CLI.

USAGE
  $ nimbu plugins:install PLUGIN...

ARGUMENTS
  PLUGIN  Plugin to install.

FLAGS
  -f, --force    Run yarn install with force flag.
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Installs a plugin into the CLI.

  Can be installed from npm or a git url.

  Installation of a user-installed plugin will override a core plugin.

  e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
  will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
  the CLI without the need to patch and update the whole CLI.

ALIASES
  $ nimbu plugins:add

EXAMPLES
  $ nimbu plugins:install myplugin 

  $ nimbu plugins:install https://github.com/someuser/someplugin

  $ nimbu plugins:install someuser/someplugin

See code: @oclif/plugin-plugins

nimbu plugins:link PLUGIN

Links a plugin into the CLI for development.

USAGE
  $ nimbu plugins:link PLUGIN

ARGUMENTS
  PATH  [default: .] path to plugin

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Links a plugin into the CLI for development.

  Installation of a linked plugin will override a user-installed or core plugin.

  e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
  command will override the user-installed or core plugin implementation. This is useful for development work.

EXAMPLES
  $ nimbu plugins:link myplugin

See code: @oclif/plugin-plugins

nimbu plugins:uninstall PLUGIN...

Removes a plugin from the CLI.

USAGE
  $ nimbu plugins:uninstall PLUGIN...

ARGUMENTS
  PLUGIN  plugin to uninstall

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Removes a plugin from the CLI.

ALIASES
  $ nimbu plugins:unlink
  $ nimbu plugins:remove

See code: @oclif/plugin-plugins

nimbu plugins:update

Update installed plugins.

USAGE
  $ nimbu plugins:update [-h] [-v]

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Update installed plugins.

See code: @oclif/plugin-plugins

nimbu products:config:copy

copy product customizations from one to another

USAGE
  $ nimbu products:config:copy [-f <value>] [-t <value>]

FLAGS
  -f, --from=<value>  subdomain of the source site
  -t, --to=<value>    subdomain of the destination site

DESCRIPTION
  copy product customizations from one to another

See code: lib/commands/products/config/copy.js

nimbu products:config:diff

check differences between product customizations from one to another

USAGE
  $ nimbu products:config:diff -f <value> -t <value>

FLAGS
  -f, --from=<value>  (required) slug of the source channel
  -t, --to=<value>    (required) slug of the target channel

DESCRIPTION
  check differences between product customizations from one to another

See code: lib/commands/products/config/diff.js

nimbu sites:copy

copy a complete site from one to another

USAGE
  $ nimbu sites:copy [-f <value>] [-t <value>] [--force]

FLAGS
  -f, --from=<value>  subdomain of the source site
  -t, --to=<value>    subdomain of the destination site
  --force             do not ask confirmation to overwrite existing channel

DESCRIPTION
  copy a complete site from one to another

See code: lib/commands/sites/copy.js

nimbu sites:list

list sites you can edit

USAGE
  $ nimbu sites:list [-s]

FLAGS
  -s, --subdomain  show Nimbu subdomain for each site

DESCRIPTION
  list sites you can edit

ALIASES
  $ nimbu sites

See code: lib/commands/sites/list.js

nimbu themes:copy

copy themes from one site to another

USAGE
  $ nimbu themes:copy -f <value> -t <value> [--toHost <value>] [--fromHost <value>] [--liquid-only]

FLAGS
  -f, --from=<value>  (required) slug of the source theme
  -t, --to=<value>    (required) slug of the target theme
  --fromHost=<value>  hostname of origin Nimbu API
  --liquid-only       only copy the templates
  --toHost=<value>    hostname of target Nimbu API

DESCRIPTION
  copy themes from one site to another

See code: lib/commands/themes/copy.js

nimbu themes:pull

download all code and assets for a theme

USAGE
  $ nimbu themes:pull [-t <value>] [-s <value>] [--liquid-only]

FLAGS
  -s, --site=<value>   the site of the theme
  -t, --theme=<value>  [default: default-theme] slug of the theme
  --liquid-only        only download template files

DESCRIPTION
  download all code and assets for a theme

See code: lib/commands/themes/pull.js

nimbu translations:copy [QUERY]

copy translations from one site to another

USAGE
  $ nimbu translations:copy [QUERY] [-f <value>] [-t <value>] [--toHost <value>] [--fromHost <value>]

ARGUMENTS
  QUERY  [default: *] query to match subset of translations to be copied

FLAGS
  -f, --from=<value>  subdomain of the source site
  -t, --to=<value>    subdomain of the destination site
  --fromHost=<value>  hostname of origin Nimbu API
  --toHost=<value>    hostname of target Nimbu API

DESCRIPTION
  copy translations from one site to another

See code: lib/commands/translations/copy.js

nimbu update [CHANNEL]

update the nimbu CLI

USAGE
  $ nimbu update [CHANNEL] [--from-local]

FLAGS
  --from-local  interactively choose an already installed version

DESCRIPTION
  update the nimbu CLI

See code: @oclif/plugin-update

nimbu version

USAGE
  $ nimbu version

See code: lib/commands/version.js

nimbu which

Show which plugin a command is in.

USAGE
  $ nimbu which

DESCRIPTION
  Show which plugin a command is in.

See code: @oclif/plugin-which

Features

Webpack is configured to support the features below.

Coffeescript/Javascript

The javascripts pipeline supports:

There is one entrypoint src/index.js that gets compiled into javascripts/app.js and javascripts/vendor.js (split automatically).

(S)CSS

The CSS pipeline supports:

  • SCSS using sass-loader
  • Minification and autoprefixing using postcss-loader and autoprefixer

The entrypoint is src/index.scss, but any (S)CSS you import in your javascript or coffeescript will also be included in the output.

To import scss files from node_modules, use a ~ prefix. For example, to import bourbon that was added with yarn add bourbon:

@import '~bourbon/core/bourbon';

In development mode, the CSS is injected dynamically into the DOM using style-loader to support Hot Module Reloading. In production, the CSS is extracted into stylesheets/app.css.

Sometimes the dynamic injecting of CSS breaks stuff. For example, if you use javascript plugins that measure certain widths/heights when the document is ready. These might execute before the styles get injected. To test these kind of things, you can tell webpack to extract the CSS into stylesheets/app.css in development too. Start the development server with the following command to do that:

EXTRACT_CSS=true yarn start

Using the webpack output in your layout

Webpack generates snippets/webpack.liquid. If you include that snippet, you get access to:

  • webpack_build_timestamp: timestamp of the moment that webpack generated the snippet. Useful in a cache key.
  • webpack_chunks: an array of the names of the chunks that webpack generated.
  • webpack_js: a map of chunkname to javascript filename for that chunk.
  • webpack_css: a map of chunkname to array of css filenames for that chunk.

For example, you can use this snippet of liquid in your layout:

{% include 'webpack' %}
{% for chunk in webpack_chunks, cache: webpack_build_timestamp %}
{% for file in webpack_css[chunk] %}
{{ file | stylesheet_tag }}
{% endfor %}
{% endfor %}

{% for chunk in webpack_chunks, cache: webpack_build_timestamp %}
{{ webpack_js[chunk] | javascript_tag }}
{% endfor %}