ns Docsns Docs

Quick Start

Get started with nstypocolors in seconds using simple color and gradient logging.

nstypocolors is designed to work out of the box with zero configuration. Install it, import what you need, and start logging immediately.

Basic Usage


Import color helpers and log messages directly to the terminal.

import { logGreen, logRed } from 'nstypocolors'

logGreen('Server started successfully')
logRed('Failed to connect to database')
const { logGreen, logRed } = require('nstypocolors')

logGreen('Server started successfully')
logRed('Failed to connect to database')

Each function prints immediately with clean, readable output—no setup required.

All logging functions are side-effect based. You don’t need to wrap or return anything.

Gradient Presets


Built-in gradient presets help keep logs structured and expressive.

import { logSuccess, logInfo, logWarn, logError } from 'nstypocolors'

logSuccess('Build completed successfully')
logInfo('Fetching user data...')
logWarn('Deprecated API usage detected')
logError('Unhandled exception occurred')
const { logSuccess, logInfo, logWarn, logError } = require('nstypocolors')

logSuccess('Build completed successfully')
logInfo('Fetching user data...')
logWarn('Deprecated API usage detected')
logError('Unhandled exception occurred')

Gradients automatically adapt to message length and remain readable even for long logs.

Using with TypeScript


nstypocolors ships with built-in type definitions.

logSuccess(`Connected as ${client.user?.tag}`)

No tsconfig changes. No extra packages. Works seamlessly in:

  • Node.js scripts
  • CLI tools
  • Discord bots
  • Backend services

If you’re using TypeScript, you’re already fully supported—nothing else to configure.

CLI Usage


If installed globally, you can use the nstc command directly from your terminal.

nstc "Build successful" --success
nstc "Fetching data..." --info
nstc "Potential issue detected" --warn
nstc "Process failed" --error

This is ideal for:

  • Shell scripts
  • Quick debugging output

Next Steps


From here, you can:

  • Explore available colors and gradients
  • Learn about CLI commands
  • See real-world usage examples

nstypocolors stays minimal by design—use only what you need, when you need it.

Last updated on

On this page