🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

@tryghost/pretty-cli

Package Overview
Dependencies
Maintainers
30
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tryghost/pretty-cli

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

latest
Source
npmnpm
Version
3.2.0
Version published
Weekly downloads
14K
-11.31%
Maintainers
30
Weekly downloads
 
Created
Source

Pretty CLI

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

Install

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

Or: pnpm add @tryghost/pretty-cli

Purpose

Styled CLI output helpers and UI primitives for consistent Ghost command-line tooling.

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

  • pnpm lint runs oxlint
  • pnpm test runs lint and tests

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

FAQs

Package last updated on 27 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts