@tryghost/pretty-cli
A mini-module to style a sywac instance in a standard way
Last updated 5 years ago by daniellockyer .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @tryghost/pretty-cli 
SYNC missed versions from official npm registry.

Pretty CLI

A mini-module to style a sywac instance in a standard way

Install

Either: npm install @tryghost/pretty-cli --save

Or: yarn add @tryghost/pretty-cli

Usage

E.g. const prettyCLI = require('@tryghost/pretty-cli');

prettyCLI is a pre-styled instance of the sywac API.

See the sywac quickstart and config guide for full usage.

Example:

#!/usr/bin/env node
const prettyCLI = require('@tryghost/pretty-cli');


prettyCLI
  .command({
    flags: 'myTask [option]',
    desc: 'Run myTask',
    run: (argv) =>  { ... do something here }
  })
  .parseAndExit();

Pretty CLI also provides a common UI interface, providing log functions to output coloured messages to the UI:

const ui = require('@tryghost/pretty-cli/ui');`

ui.log.info('Done');
ui.log.warn('Uh Oh', 'Something went wrong');

You can also grab a fresh instance of the api with prettyCLI.Api.get().

The style rules used are available at prettyCLI.styles.

Test

  • yarn lint run just eslint
  • yarn test run lint && tests

Copyright & License

Copyright (c) 2013-2025 Ghost Foundation - Released under the MIT license.

Current Tags

  • 1.2.47                                ...           latest (a year ago)

56 Versions

  • 1.2.47                                ...           a year ago
  • 1.2.46                                ...           a year ago
  • 1.2.45                                ...           2 years ago
  • 1.2.44                                ...           2 years ago
  • 1.2.43                                ...           2 years ago
  • 1.2.42                                ...           2 years ago
  • 1.2.41                                ...           2 years ago
  • 1.2.40                                ...           2 years ago
  • 1.2.39                                ...           2 years ago
  • 1.2.38                                ...           3 years ago
  • 1.2.37                                ...           3 years ago
  • 1.2.36                                ...           3 years ago
  • 1.2.35                                ...           3 years ago
  • 1.2.34                                ...           3 years ago
  • 1.2.33                                ...           3 years ago
  • 1.2.32                                ...           3 years ago
  • 1.2.31                                ...           4 years ago
  • 1.2.30                                ...           4 years ago
  • 1.2.29                                ...           4 years ago
  • 1.2.28                                ...           4 years ago
  • 1.2.27                                ...           4 years ago
  • 1.2.26                                ...           4 years ago
  • 1.2.25                                ...           4 years ago
  • 1.2.24                                ...           4 years ago
  • 1.2.23                                ...           4 years ago
  • 1.2.22                                ...           4 years ago
  • 1.2.21                                ...           5 years ago
  • 1.2.20                                ...           5 years ago
  • 1.2.19                                ...           5 years ago
  • 1.2.18                                ...           5 years ago
  • 1.2.17                                ...           5 years ago
  • 1.2.16                                ...           5 years ago
  • 1.2.15                                ...           5 years ago
  • 1.2.14                                ...           5 years ago
  • 1.2.13                                ...           5 years ago
  • 1.2.12                                ...           5 years ago
  • 1.2.11                                ...           5 years ago
  • 1.2.10                                ...           6 years ago
  • 1.2.9                                ...           6 years ago
  • 1.2.8                                ...           6 years ago
  • 1.2.7                                ...           6 years ago
  • 1.2.6                                ...           6 years ago
  • 1.2.5                                ...           6 years ago
  • 1.2.4                                ...           6 years ago
  • 1.2.3                                ...           6 years ago
  • 1.2.2                                ...           6 years ago
  • 1.2.1                                ...           7 years ago
  • 1.2.0                                ...           7 years ago
  • 1.1.4                                ...           7 years ago
  • 1.1.3                                ...           7 years ago
  • 1.1.2                                ...           7 years ago
  • 1.1.1                                ...           8 years ago
  • 1.1.0                                ...           8 years ago
  • 1.0.2                                ...           8 years ago
  • 1.0.1                                ...           8 years ago
  • 1.0.0                                ...           8 years ago

Copyright 2013 - present © cnpmjs.org | Home |