
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
tiny-progress
Advanced tools
Ultra-minimal progress indicators for Node.js CLI tools - zero dependencies, <5kb
Ultra-minimal progress indicators for Node.js CLI tools
tiny-progress is a lightweight, zero-dependency NPM package providing simple progress indicators for console-based scripts and CLI tools. It features automatic TTY detection with graceful fallback for non-interactive environments.
npm install tiny-progress
const { dots, bar, spinner } = require('tiny-progress');
// Dots indicator
const d = dots({ char: '•', interval: 200 });
d.start();
setTimeout(() => d.stop('✅ Done!'), 3000);
// Progress bar
const b = bar({ total: 100, width: 40 });
for (let i = 0; i <= 100; i++) {
setTimeout(() => {
b.update(i);
if (i === 100) b.finish('Complete!');
}, i * 50);
}
// Spinner
const s = spinner({ message: 'Loading...' });
s.start();
setTimeout(() => s.stop('✅ Loaded!'), 2000);
dots(options)Creates a heartbeat-style progress indicator that prints characters at fixed intervals.
| Option | Type | Default | Description |
|---|---|---|---|
interval | number | 250 | Time between prints (milliseconds) |
char | string | '.' | Character to print |
message | string | undefined | Optional prefix message |
start() - Begins the dots animationstop(message) - Stops animation and prints final messageconst { dots } = require('tiny-progress');
const d = dots({
char: '•',
interval: 200,
message: 'Processing files'
});
d.start();
// Simulate work
setTimeout(() => {
d.stop('✅ Files processed successfully!');
}, 5000);
bar(options)Creates a traditional progress bar with percentage display and visual fill indicator.
| Option | Type | Default | Description |
|---|---|---|---|
total | number | 100 | Total progress value |
width | number | 40 | Bar width in characters |
char | string | '█' | Fill character |
incomplete | string | '░' | Empty character |
format | string | '{bar} {percentage}%' | Display format |
update(current) - Updates progress to current valuefinish(message) - Completes progress and shows final message{bar} - The progress bar visual{percentage} - Percentage complete (0-100){current} - Current progress value{total} - Total progress valueconst { bar } = require('tiny-progress');
const b = bar({
total: 50,
width: 30,
format: '{bar} {current}/{total} ({percentage}%)'
});
// Simulate incremental progress
for (let i = 0; i <= 50; i++) {
setTimeout(() => {
b.update(i);
if (i === 50) {
b.finish('🎉 Upload complete!');
}
}, i * 100);
}
spinner(options)Creates a rotating spinner animation for indeterminate progress.
| Option | Type | Default | Description |
|---|---|---|---|
frames | Array | Unicode spinner | Animation frames |
interval | number | 80 | Frame change interval (ms) |
message | string | undefined | Text to display alongside spinner |
start() - Begins spinner animationstop(message) - Stops spinner and shows final messageupdateMessage(message) - Updates display message while spinningconst customFrames = ['◐', '◓', '◑', '◒'];
const s = spinner({ frames: customFrames, interval: 100 });
const { spinner } = require('tiny-progress');
const s = spinner({ message: 'Connecting to server' });
s.start();
setTimeout(() => {
s.updateMessage('Authenticating user');
}, 2000);
setTimeout(() => {
s.updateMessage('Loading dashboard');
}, 4000);
setTimeout(() => {
s.stop('✅ Connected successfully!');
}, 6000);
tiny-progress automatically detects whether it's running in a TTY (interactive terminal) environment:
# Interactive mode (full animation)
node your-script.js
# Non-interactive mode (plain text)
node your-script.js > output.log
node your-script.js | grep "Done"
const fs = require('fs');
const { bar, spinner } = require('tiny-progress');
async function processFiles(files) {
const progress = bar({
total: files.length,
format: 'Processing: {bar} {current}/{total} files ({percentage}%)'
});
for (let i = 0; i < files.length; i++) {
// Simulate file processing
await new Promise(resolve => setTimeout(resolve, 200));
progress.update(i + 1);
}
progress.finish('✅ All files processed!');
}
// Usage
processFiles(['file1.txt', 'file2.txt', 'file3.txt']);
const https = require('https');
const { bar } = require('tiny-progress');
function downloadFile(url, filename) {
const progress = bar({
total: 0, // Will be set when we know file size
format: 'Downloading: {bar} {percentage}%'
});
https.get(url, (response) => {
const totalSize = parseInt(response.headers['content-length']);
progress.total = totalSize;
let downloaded = 0;
response.on('data', (chunk) => {
downloaded += chunk.length;
progress.update(downloaded);
});
response.on('end', () => {
progress.finish(`✅ Downloaded ${filename}`);
});
});
}
const { spinner, dots, bar } = require('tiny-progress');
async function deployApp() {
// Step 1: Build
const buildSpinner = spinner({ message: 'Building application' });
buildSpinner.start();
await simulateWork(3000);
buildSpinner.stop('✅ Build complete');
// Step 2: Upload
const uploadProgress = bar({
total: 100,
format: 'Uploading: {bar} {percentage}%'
});
for (let i = 0; i <= 100; i++) {
await new Promise(resolve => setTimeout(resolve, 50));
uploadProgress.update(i);
}
uploadProgress.finish('✅ Upload complete');
// Step 3: Deploy
const deployDots = dots({
char: '.',
message: 'Deploying'
});
deployDots.start();
await simulateWork(2000);
deployDots.stop('🚀 Deployment successful!');
}
function simulateWork(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
deployApp();
Run the included tests to verify functionality:
# Run all tests
npm test
# Test specific scenarios
node test/test.js
node test/non-tty-test.js
# Test non-TTY behavior
node test/test.js > output.log
Contributions are welcome! Please feel free to submit a Pull Request.
MIT © tiny-progress contributors
Why tiny-progress?
When you need simple progress indicators without the overhead of larger libraries. Perfect for CLI tools, build scripts, and any Node.js application where you want to show progress without bloating your dependency tree. Ultra-minimal NPM package that provides progress indicators for console based scripts and CLI tools
FAQs
Ultra-minimal progress indicators for Node.js CLI tools - zero dependencies, <5kb
We found that tiny-progress 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

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.