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

@tegrus/cli

v3.10.1

Published

[![npm version](https://img.shields.io/npm/v/@tegrus/cli.svg?style=flat-square)](https://www.npmjs.org/package/@tegrus/cli) [![XO code style](https://shields.io/badge/code_style-5ed9c7?logo=xo&labelColor=gray)](https://github.com/xojs/xo) [![Types in JS](

Downloads

65

Readme

tegrus-cli

npm version XO code style Types in JS

Utility commands used by Tegrus. Cross-platform.

Install

Using pnpm:

pnpm add -g @tegrus-cli

Using npm:

npm i -g @tegrus-cli

Usage

After installation, the cli will be available via the tegrus command name:

❯ tegrus --help

  Usage: tegrus [options] [command]

  Tegrus CLI with utilities like: deployments, etc

  Options:
    -V, --version   output the version number
    -h, --help      display help for command

  Commands:
    kubernetes
    s3
    help [command]  display help for command

Commands

Kubernetes

Utility commands for interacting with kubernetes.

Deploy command

❯ tegrus kubernetes deploy --help

  Usage: tegrus kubernetes deploy [options]

  Deploy docker images to kubernetes

  Options:
    -n, --namespace <string>     The kubernetes namespace
    -r, --resource <string>      The kubernetes resource name
    -t, --type <type>            The kubernetes resource type [deployment, statefulset]
    -i, --image <string>         The image name to update
    -o, --host <string>          Kubernetes host name
    -a, --access-token <string>  Kubernetes user access token
    -s, --skip-check             Skip deployment check (default: false)
    --dry-run                    Dry run deployment (default: false)
    --sleep <miliseconds>        Time between statuses check in ms (default: 5000)
    --timeout <seconds>          Script timeout in seconds (default: 30)
    --verbose                    Log aditional info and errors (default: false)
    -h, --help                   display help for command

S3

Utility commands for interacting with any S3-compatible object storage, such as AWS S3, Digital Ocean Spaces, etc.

Sync command

❯ tegrus s3 sync --help

  Usage: tegrus s3 sync [options]

  Sync source and destination folder. Local and S3 paths can be used

  Options:
    -s, --source <string>         Source path
    -t, --target <string>         Destination path
    -e, --spaces-key <string>     Digital ocean spaces key
    -r, --spaces-secret <string>  Digital ocean spaces secret
    -d, --del                     To delete non-existing files on destination (default: false)
    -a, --acl                     Set objects ACL <string>
    --dry-run                     Dry run deployment (default: false)
    --verbose                     Log aditional info and errors (default: false)
    -h, --help                    display help for command


Usage via npx

npx @tegrus/cli [command] [options]

The cli can be used directly via npx, like in the following gitlab-ci.yml snippet:

deploy:
  stage: deploy
  image: node:18-alpine
  only:
    - tags
  when: manual
  needs:
    - build
  script:
    - >
      npx @tegrus/cli@3 s3 sync
      --source ./dist 
      --target s3://cdn-isc.tegrus.io
      --spaces-key $SPACES_KEY
      --spaces-secret $SPACES_SECRET

Or

.deploy_kubernetes:
  stage: deploy
  image: node:18-alpine
  script:
    - >
      npx @tegrus/cli@3 kubernetes deploy
      --namespace $DEPLOY_NAMESPACE
      --resource $DEPLOY_RESOURCE
      --type deployment
      --image $CI_REGISTRY_IMAGE:$CONTAINER_TAG
      --host $KUBERNETES_PROD_HOST
      --access-token $KUBERNETES_PROD_ACCESS_TOKEN