{"id":13452092,"url":"https://github.com/cronvel/terminal-kit","last_synced_at":"2025-05-10T11:27:35.593Z","repository":{"id":19432990,"uuid":"22676524","full_name":"cronvel/terminal-kit","owner":"cronvel","description":"Terminal utilities for node.js","archived":false,"fork":false,"pushed_at":"2025-03-05T18:19:25.000Z","size":6065,"stargazers_count":3208,"open_issues_count":78,"forks_count":206,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-05-08T22:37:24.804Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cronvel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-08-06T09:05:16.000Z","updated_at":"2025-05-07T15:12:44.000Z","dependencies_parsed_at":"2025-02-04T10:28:18.149Z","dependency_job_id":"45471f0c-649c-40f1-b253-55e94052d27a","html_url":"https://github.com/cronvel/terminal-kit","commit_stats":{"total_commits":1279,"total_committers":20,"mean_commits":63.95,"dds":"0.40422204847537135","last_synced_commit":"02068000a00e5bd16b66bd629fdabc79a7ed551e"},"previous_names":[],"tags_count":622,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cronvel%2Fterminal-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cronvel%2Fterminal-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cronvel%2Fterminal-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cronvel%2Fterminal-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cronvel","download_url":"https://codeload.github.com/cronvel/terminal-kit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253166474,"owners_count":21864467,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T07:01:12.619Z","updated_at":"2025-05-10T11:27:35.542Z","avatar_url":"https://github.com/cronvel.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","🛠️ Developer Tools","others","Node.js / JavaScript 🟨"],"sub_categories":[],"readme":"\n[![★](https://img.shields.io/github/stars/cronvel/terminal-kit.svg?label=❤)](https://github.com/cronvel/terminal-kit/stargazers)\n[![License](https://img.shields.io/github/license/cronvel/terminal-kit.svg)](https://github.com/cronvel/terminal-kit)\n[![Downloads](https://img.shields.io/npm/dm/terminal-kit.svg)](https://www.npmjs.com/package/terminal-kit)\n[![Version](https://img.shields.io/npm/v/terminal-kit.svg)](https://www.npmjs.com/package/terminal-kit)\n[![Run on repl.it](http://repl.it/badge/github/cronvel/terminal-kit)](https://repl.it/github/cronvel/terminal-kit)\n\n[![Stats](https://nodei.co/npm/terminal-kit.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://www.npmjs.com/package/terminal-kit)\n\n\n\n# Terminal Kit\n\nA full-blown terminal lib featuring: 256 colors, styles, keys \u0026 mouse handling, input field, progress bars, \nscreen buffer (including **32-bit composition** and **image loading**), text buffer, and many more...\n\nWhether you just need colors \u0026 styles, build a simple interactive command line tool or a complexe terminal application:\nthis is the absolute terminal lib for Node.js!\n\nIt does **NOT** depend on ncurses.\n\nSome tutorials are available at [blog.soulserv.net/tag/terminal](http://blog.soulserv.net/tag/terminal/).\n\n\n\n## Screenshot, PleaZe!\n\nThis is a fraction of what Terminal-Kit can do, with only few lines of code.\nClick any image to see the documentation related to the feature!\n\n[![Styles output](https://raw.githubusercontent.com/cronvel/terminal-kit/master/sample/style-doc1.png)](doc/low-level.md)\n\n[![Word-wrapping](https://raw.githubusercontent.com/cronvel/terminal-kit/master/sample/wordwrap-doc1.png)](doc/high-level.md#ref.wrapColumn)\n← Word-wrapping\n\n[![Table](https://raw.githubusercontent.com/cronvel/terminal-kit/master/sample/table-doc1.png)](doc/high-level.md#ref.table)\n← Table with automatic column computing, cell fitting and word-wrapping\n\n[![Input field output](https://raw.githubusercontent.com/cronvel/terminal-kit/master/sample/input-field-doc1.gif)](doc/high-level.md#ref.inputField)\n\n[![File input output](https://raw.githubusercontent.com/cronvel/terminal-kit/master/sample/file-input-doc1.gif)](doc/high-level.md#ref.fileInput)\n\n[![Input field output](https://raw.githubusercontent.com/cronvel/terminal-kit/master/sample/input-field-doc4.gif)](doc/high-level.md#ref.inputField)\n\n[![Single line menu output](https://raw.githubusercontent.com/cronvel/terminal-kit/master/sample/single-line-menu-doc1.gif)](doc/high-level.md#ref.singleLineMenu)\n\n[![Single column menu output](https://raw.githubusercontent.com/cronvel/terminal-kit/master/sample/single-column-menu-doc1.gif)](doc/high-level.md#ref.singleColumnMenu)\n\n[![Grid menu output](https://raw.githubusercontent.com/cronvel/terminal-kit/master/sample/grid-menu-doc1.gif)](doc/high-level.md#ref.gridMenu)\n\n[![Progress bar output](https://raw.githubusercontent.com/cronvel/terminal-kit/master/sample/progress-bar-doc1.gif)](doc/high-level.md#ref.progressBar)\n\n[![Progress bar output](https://raw.githubusercontent.com/cronvel/terminal-kit/master/sample/progress-bar-doc2.gif)](doc/high-level.md#ref.progressBar)\n\n[![Slow typing output](https://raw.githubusercontent.com/cronvel/terminal-kit/master/sample/slow-typing-doc1.gif)](doc/high-level.md#ref.slowTyping)\n\n[![Yes or no output](https://raw.githubusercontent.com/cronvel/terminal-kit/master/sample/yes-no-doc1.gif)](doc/high-level.md#ref.yesOrNo)\n\n[![Spaceship](https://raw.githubusercontent.com/cronvel/terminal-kit/master/demo/record.gif)](doc/ScreenBuffer.md)\n← Surfaces and Sprites\n\n[![Draw an image inside the terminal](https://raw.githubusercontent.com/cronvel/terminal-kit/master/sample/image-loading.png)](doc/high-level.md#ref.drawImage)\n← Load and draw an image inside the terminal\n\n\n\n## Key features\n\n*New:* [Document model](doc/document-model.md#top) for building rich app GUI\n\n*New:* [Spinner](doc/high-level.md#ref.spinner)\n\n*New:* [Table](doc/high-level.md#ref.table) with automatic column computing, cell fitting and word-wrapping\n\n*New:* Promises can be used instead of callback everywhere\n\n*New:* [Word-wrapping](doc/high-level.md#ref.wrapColumn) along full terminal width or a pre-defined column-width\n\n*New:* [ScreenBuffer HD](doc/ScreenBufferHD.md#top) 32-bit (RGBA) surfaces with composition and image loading\n\n* [colors, 256 colors or even 24-bit colors](doc/low-level.md#ref.colors), if the terminal supports it\n* [styles (bold, underline, italic, and many more)](doc/low-level.md#ref.styles)\n* [style mixing](doc/low-level.md#ref.chainable)\n* [chainable](doc/low-level.md#ref.chainable)\n* [string formatting](doc/low-level.md#ref.string-formatting)\n* [short style markup](doc/low-level.md#ref.style-markup)\n* [terminal window title](doc/low-level.md#ref.misc)\n* [cursor positioning](doc/low-level.md#ref.movingCursor)\n* [keyboard input](doc/high-level.md#ref.grabInput)\n* [mouse support (GPM is supported for the Linux Console)](doc/high-level.md#ref.grabInput)\n* [input field](doc/high-level.md#ref.inputField)\n* [single line menu](doc/high-level.md#ref.singleLineMenu)\n* [single column menu](doc/high-level.md#ref.singleColumnMenu)\n* [grid/table menu](doc/high-level.md#ref.gridMenu)\n* [progress bar](doc/high-level.md#ref.progressBar)\n* [interactive 'yes or no'](doc/high-level.md#ref.yesOrNo)\n* [screen \u0026 off-screen buffers (a concept similar to SDL's *Surface*)](doc/ScreenBuffer.md#top)\n* [text buffers](doc/TextBuffer.md#top)\n* [change the terminal color palette](doc/high-level.md#ref.setPalette)\n* [draw an image file (PNG, JPEG, GIF) directly inside the terminal](doc/high-level.md#ref.drawImage)\n* [event-driven](doc/events.md#top)\n\n\n\n## Quick examples\n\n```js\n// Require the lib, get a working terminal\nvar term = require( 'terminal-kit' ).terminal ;\n\n// The term() function simply output a string to stdout, using current style\n// output \"Hello world!\" in default terminal's colors\nterm( 'Hello world!\\n' ) ;\n\n// This output 'red' in red\nterm.red( 'red' ) ;\n\n// This output 'bold' in bold\nterm.bold( 'bold' ) ;\n\n// output 'mixed' using bold, underlined \u0026 red, exposing the style-mixing syntax\nterm.bold.underline.red( 'mixed' ) ;\n\n// printf() style formatting everywhere:\n// this will output 'My name is Jack, I'm 32.' in green\nterm.green( \"My name is %s, I'm %d.\\n\" , 'Jack' , 32 ) ;\n\n// Since v0.16.x, style markup are supported as a shorthand.\n// Those two lines produce the same result.\nterm( \"My name is \" ).red( \"Jack\" )( \" and I'm \" ).green( \"32\\n\" ) ;\nterm( \"My name is ^rJack^ and I'm ^g32\\n\" ) ;\n\n// Width and height of the terminal\nterm( 'The terminal size is %dx%d' , term.width , term.height ) ;\n\n// Move the cursor at the upper-left corner\nterm.moveTo( 1 , 1 ) ;\n\n// We can always pass additional arguments that will be displayed...\nterm.moveTo( 1 , 1 , 'Upper-left corner' ) ;\n\n// ... and formated\nterm.moveTo( 1 , 1 , \"My name is %s, I'm %d.\\n\" , 'Jack' , 32 ) ;\n\n// ... or even combined with other styles\nterm.moveTo.cyan( 1 , 1 , \"My name is %s, I'm %d.\\n\" , 'Jack' , 32  ) ;\n\n// Get some user input\nterm.magenta( \"Enter your name: \" ) ;\nterm.inputField(\n\tfunction( error , input ) {\n\t\tterm.green( \"\\nYour name is '%s'\\n\" , input ) ;\n\t}\n) ;\n```\n\n\n### ♥♥ [I want to READ THE DOC NOW!](doc/documentation.md#ref.TOC) ♥♥\n\n\n#### License: MIT\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcronvel%2Fterminal-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcronvel%2Fterminal-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcronvel%2Fterminal-kit/lists"}