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

@torus-tools/cli

v0.0.125

Published

Mutli CLI for torus tools

Downloads

9

Readme

Torus CLI

Mutli CLI for torus tools

oclif Version Downloads/week License

Usage

$ npm install -g @torus-tools/cli
$ torus COMMAND
running command...
$ torus (-v|--version|version)
@torus-tools/cli/0.0.124 linux-x64 node-v14.4.0
$ torus --help [COMMAND]
USAGE
  $ torus COMMAND
...

Commands

torus content ACTION [FILES]

List/download/upload/delete all of your content (or the specified files).

USAGE
  $ torus content ACTION [FILES]

ARGUMENTS
  ACTION  (list|download|upload|delete) given action to carry out with the content of your site

  FILES   local paths or object keys of the files/directories you want to upload/download to/from your bucket. For
          example suppose theres a directory img inside the cwd the path of image1.jpg would be img/image1.jpg. For
          local files the root is the current working directory unless specifiecd otherwise with the -i flag. By
          default, if no paths are provided all files/dirs in the root will be used.

OPTIONS
  -a, --all            Upload all files. By default only updated files are uploaded.
  -d, --domain=domain  Domain of your site (i.e. yoursite.com).
  -i, --input=input    Path of the root directory of your project (if different to the current working driectory).
  -o, --output=output  [default: ./] Path to save downloaded content into. Default is the current working directory.
  -r, --reset          Reset the cache in all edge locations for the given files.
  -s, --sort           Sorts listed files by last modified date.

DESCRIPTION
  ...
  By default only modified files are uploaded; to upload all files provide the --all flag. To automatically update cache 
  in cloudfront for the given files add the --reset flag.

See code: src/commands/content.js

torus help [COMMAND]

display help for torus

USAGE
  $ torus help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

torus init

Configure torus globally in your machine, or on a per-project basis

USAGE
  $ torus init

OPTIONS
  -d, --domain=domain
      The valid desired/existing domain of your site i.e. yoursite.com

  -g, --global
      Create a global torus configuration file. The command will guide you through the steps to generate the required API 
      keys for each of your desired providers, set up your global environment variables and your deisred default settings.

  -p, --providers=aws|godaddy
      Desired cloud/domain providers to be used with torus. You must have an existing account in all of the providers you 
      choose.

  -r, 
  --region=us-east-2|us-east-1|us-west-1|us-west-2|af-south-1|ap-east-1|ap-south-1|ap-northeast-2|ap-southeast-1|ap-sout
  heast-2|ap-northeast-1|ca-central-1|cn-north-1|cn-northwest-1|eu-central-1|eu-west-1|eu-west-2|eu-west-3|eu-north-1|me
  -south-1|sa-east-1|us-gov-east-1|us-gov-west-1
      [default: us-east-1] Desired AWS region

  -u, --user=user
      [default: torus_admin] Desired name for the AWS IAM user

DESCRIPTION
  ...
  The init command helps you configure torus in your site/project. Providing the -g (--global) flag helps you configure 
  torus globally (for all of your projects). When using the torus CLI, you can always overwrite global settings by 
  including a project config file. You can also overwrite global environment variables by including a .env file. If you 
  are using the init command without the -g flag make sure to run it from the root of your project.

See code: src/commands/init.js

torus stack ACTION [SETUP]

Deploy static sites to AWS

USAGE
  $ torus stack ACTION [SETUP]

ARGUMENTS
  ACTION  (create|update|import|delete|pull|push) choose an action to perform. you can create, update, import your stack
          or upload files to your bucket.

  SETUP   (dev|test|prod|custom) [default: dev] setup for the site - dev, test, production or custom

OPTIONS
  -b, --bucket=aws|true                   Enables a cloud storage bucket to be used as the websites origin. You can
                                          provide this flag without the =string to use aws s3.

  -c, --cdn=aws|true                      Add a CDN to your site. CDNs enable faster website load times by caching your
                                          content around the globe (the edge). You can provide this flag without the
                                          =string to use aws Cloudfront.

  -d, --domain=domain                     The domain of your site i.e. yoursite.com

  -e, --error=error                       name of the error document. Default is error.html

  -i, --index=index                       name of the index document. Default is index.html

  -o, --overwrite                         By default, torus always reads your template in the cloud and only adds
                                          changes (updated resources or additional resources). If you want to eliminate
                                          the resources that arent prvoided in the CLI flags you can add this flag.

  -p, --publish                           Publish the sites content

  -r, --registrar=aws|godaddy|other|true  The current domain name registrar of your sites domain. Using AWS or godaddy
                                          enables automatic namserver updates if the DNS provider is different to the
                                          registrar. Selecting other will require manual nameserver updates. true
                                          evaluates to other.

  -s, --ssl=aws|true                      Enables https by creating and validating an SSL certificate for your site. You
                                          can provide this flag without the =string to use aws certificate manager.

  -w, --www=true                          creates a www reroute bucket.

  --dns=aws|godaddy|other|true            Desired DNS provider for your site. The aws option adds a route53 hosted zone
                                          to your stack. You can provide this flag without the =string to use aws.

DESCRIPTION
  ...
  Deploy static sites to the AWS Cloud using Cloudformation templates.

See code: src/commands/stack.js