
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
cli-ascii-logo
Advanced tools
Create beautiful ASCII art logos with gradient colors for your CLI applications
Create beautiful ASCII art logos with gradient colors for your CLI applications.
npm install cli-ascii-logo
Note: Version 2.1.0+ uses ES modules (ESM). If you need CommonJS support, use version 2.0.x or earlier.
Use directly with npx (no installation required):
npx cli-ascii-logo "Hello World"
Or install globally:
npm install -g cli-ascii-logo
cli-ascii-logo "My App"
# Basic usage with default gradient (sunset)
cli-ascii-logo "Hello World"
# Use a specific gradient palette
cli-ascii-logo "Hello World" --palette cyberpunk
cli-ascii-logo "Hello World" -p ocean
# Use a random gradient
cli-ascii-logo "Hello World" --random
cli-ascii-logo "Hello World" -r
# List all available palettes
cli-ascii-logo --list
cli-ascii-logo -l
# Show help
cli-ascii-logo --help
cli-ascii-logo -h
# Create a logo with the sunset gradient
npx cli-ascii-logo "MyApp"
# Create a logo with cyberpunk theme
npx cli-ascii-logo "CLI Tool" -p cyberpunk
# Generate with random colors
npx cli-ascii-logo "Surprise" --random
# See all available gradient options
npx cli-ascii-logo --list
import logo from "cli-ascii-logo";
// Simple usage with default gradient
console.log(logo.createLogo("Hello"));
// Use a specific gradient
console.log(logo.createLogo("My App", "rainbow"));
// Random gradient
console.log(logo.createRandomLogo("Surprise!"));
createLogo(text: string, palette?: PaletteName): stringCreate a logo with a single call.
logo.createLogo("MyApp", "sunset");
createRandomLogo(text: string): stringCreate a logo with a random gradient palette.
logo.createRandomLogo("Lucky");
For more control, use the fluent builder API:
logo.setText("MyApp").addFontStyle("ANSI Shadow", 120).build("ocean");
setText(text: string): this - Set the text for the logoaddFontStyle(font?: figlet.Fonts, width?: number): this - Apply ASCII art fontbuild(palette?: PaletteName): string - Build and return the final logoaddGradient(palette: PaletteName): string - Apply gradient and return (alternative to build)addRandomGradient(): string - Apply random gradient and returnClassic & Popular:
sunset - Warm orange to red (default)ocean - Deep blue to purplefire - Bold red to pinkforest - Teal to greengold - Orange to yellowcopper - Metallic bronze
Cool Tones:
blue - Bright blue gradientmint - Cyan to blueaqua - Turquoise tonesice - Icy white-blue tones
Warm Tones:
lava - Hot reds and orangesvolcano - Dark red to goldcoral - Soft pink gradientcherry - Pink-red
Vibrant & Modern:
cyberpunk - Neon pink-cyanneon - Radioactive greenaurora - Northern lights effectlavender - Soft purplesemerald - Northern lights effect
Special Effects:
matrix - Classic terminal greennebula - Purple to pink space
From the gradient-string library: cristal, teen, mind, morning, vice, passion, fruit, instagram, atlas, retro, summer, pastel, rainbow
You can get the list programmatically:
import { PALETTE_NAMES } from "cli-ascii-logo";
console.log(PALETTE_NAMES); // Array of all available palette names
Full TypeScript support with exported types:
import logo, {
PaletteName,
PALETTE_NAMES,
CUSTOM_GRADIENTS,
} from "cli-ascii-logo";
const palette: PaletteName = "sunset";
import logo from "cli-ascii-logo";
console.log(logo.createLogo("Welcome", "rainbow"));
import logo from "cli-ascii-logo";
const myLogo = logo.setText("MyApp").addFontStyle("ANSI Shadow").build("ocean");
console.log(myLogo);
import logo, { PALETTE_NAMES } from "cli-ascii-logo";
PALETTE_NAMES.forEach((palette) => {
console.log(`\n--- ${palette} ---`);
console.log(logo.createLogo("Logo", palette));
});
Create a full banner with metadata (version, timestamp, etc.):
import logo from "cli-ascii-logo";
import fs from "fs";
function printAppBanner() {
const pkg = JSON.parse(fs.readFileSync("./package.json", "utf-8"));
const logoText = logo.createLogo("wonderful\napp", "cyberpunk");
const banner = [
"=".repeat(80),
logoText,
`Version: ${pkg.version}`,
`Started: ${new Date().toLocaleString()}`,
"=".repeat(80),
].join("\n");
console.log(banner);
}
printAppBanner();

You can also apply gradients to the entire banner:
function printColoredBanner() {
const pkg = JSON.parse(fs.readFileSync("./package.json", "utf-8"));
const logoText = logo.setText("wonderful\napp").addFontStyle().getText();
const bannerText = [
"=".repeat(80),
logoText,
`Version: ${pkg.version}`,
`Started: ${new Date().toLocaleString()}`,
"=".repeat(80),
].join("\n");
// Apply gradient to the entire banner
console.log(logo.setText(bannerText).addRandomGradient());
}
printColoredBanner();

Display logos with animations:
import logo from 'cli-ascii-logo';
// Display with fade-in animation
await logo.setText('MyApp').addFontStyle().display({
gradient: 'cyberpunk',
animation: 'fade-in',
duration: 2000,
clearBefore: true,
});
// Other animation types: 'slide-in', 'typing'
await logo.setText('Hello').addFontStyle().display({
animation: 'typing',
duration: 1500,
});
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Run tests with UI
npm run test:ui
# Generate coverage report
npm run test:coverage
# Lint code
npm run lint
# Auto-fix linting issues
npm run lint:fix
# Format code with Prettier
npm run format
# Check formatting
npm run format:check
# Build TypeScript to dist/
npm run build
MIT
Contributions welcome! Please ensure:
npm test)npm run lint)npm run format)Open an issue or PR on GitHub.
FAQs
Create beautiful ASCII art logos with gradient colors for your CLI applications
We found that cli-ascii-logo demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.