Terminal toolkit for colorful logs, loading effects, tables, steps, and CLI output.
Install
·
Usage
·
Features
npm install scriptdxImport what you need and write to stdout / stderr like any CLI script:
import {
logSection,
logSuccess,
logWarning,
logError,
runStep,
showTable,
} from "scriptdx";
logSection("Deploy", "Example workflow with scriptdx");
await runStep(async () => {
await new Promise((resolve) => setTimeout(resolve, 500));
}, "Building project");
logSuccess("Build finished");
const table = showTable(
["Service", "Port"],
[
["API", "3000"],
["Worker", "3001"],
],
);
process.stdout.write(`${table}\n`);
logWarning("Dry run only");
logError("Connection refused (example)");Run the interactive tutorial from the repo:
npm run tutorialSee docs/README.md for copy-paste examples per category (logger, loading, menu, table, validations, font, and more).
| Category | Highlights |
|---|---|
| Logger | logInfo, logSuccess, logWarning, logError, logColor, color.* |
| Loading | simpleLoading, linearLoading with custom frame strings |
| Step | runStep — async tasks with spinner and success/failure feedback |
| Spinner | createSpinner for manual progress control |
| Table | showTable, showTableWithBorders for aligned terminal tables |
| Menu | runMenuByIndex for numbered CLI menus |
| Validations | hasTool, summarizeToolValidation for dependency checks |
| System | isLinux, isWindows |
| Font | showScriptTitle — large ASCII banner text |