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

tidy-cli

v0.1.8

Published

Tidy CMS command line tools

Downloads

12

Readme

tidy-cli (beta)

TidyCMS command line utility to programmatically create and update Tidy sites.

Note: This package is beta stage, please send address your questions and feedback to [email protected]

Prerequisites for tidy-cli

  1. Tidy account and team
    • Create your account and team at https://start.tidycms.com
    • If you already have an account and you use FaceBook or Google+ to sign in then you need to set the password to your account.
    • Preferrably create a CLI-user with specific email and password for cli usage.
  2. Node JS + NPM - https://nodejs.org/en/download/

Installation

$ npm install -g tidy-cli

Usage

$ tidy-cli --help

  Usage: cli [options] [command]


  Commands:

    login                    Log in to Tidy
    teams [options]          List teams your account has access
    sites [options]          List sites for team
    create-sites [options]   Create one or multiple sites to team from json file

  Options:

    -h, --help                output usage information
    -V, --version             output the version number
    -q, --quiet               do not output to console
    -u, --user [email]        Tidy account email address (optional)
    -p, --pass [password]     Account password (optional)

  Help for different commands can be accessed by:

    $ cli [command] --help

Authentication

tidy-cli supports 3 different methods of authentication

Interactive

$ tidy-cli login

Inline

$ tidy-cli [command] --user [email protected] --pass my-fantastic-password

Credentials file

Create a file that contains email + password in JSON and chmod the file to 0600 For Windows the permissions step can be skipped, just create the file.

$ vi ~/.tidycms
--
{
    "email": "[email protected]",
    "password": "my-fantastic-password"
}
--
$ chmod 0600 ~/.tidycms

// check that auth credentials work by listing your tidy teams
$ tidy-cli teams

Creating site (quick start)

// 1. Download an example of tidy compatible create site JSON:
$ tidy-cli create-sites --example --output ./create-site.json

// 2. The example JSON file already has the 'team' field set to your default team and the 'from' field contains the slug of the Valet demo-site. If your team already has some sites, you can use one of this sites as a template.

// 3. Send your create-site.json to Tidy and receive a response of newly created site
$ tidy-cli create-sites --file ./create-site.json --output ./my-new-site.json

Newly created site will be available at https://start.tidycms.site/dashboard

Creating multiple sites (advanced case)

// 1. Download the full example of tidy compatible create site JSON
$ tidy-cli create-sites --example-full --output ./create-sites-example.json

// 2. Modify ./create-sites-example.json according to your project:

* Set the value to the 'team' field. It supposed to be the team slug, and the CLI user needs to be the member of this team;

* Set the values for the 'from' field for each site. This field should contain the slug of the site to be used as a template of the newly created site.
Note the CLI user needs the permissions for this template site: the template site can be in the same team, or shared, or the CLI user can accept the invite to this site;

* For each page the template name should be provided in the 'template' field of create site JSON. The templates should exist and belong to the site you use in the 'from' field;

* Please make sure the page slugs are unique for the site.

Consider generating your own ./create-sites.json with the same schema automatically. Whis way you can get the most of tidy-cli and use it as a website mass-production tool.

// 3. Send your create-sites.json to Tidy and receive a response of newly created sites
$ tidy-cli create-sites --file ./create-sites.json --output ./my-new-sites.json

Newly created sites will be available at https://start.tidycms.site/dashboard