back to home

yaronn / blessed-contrib

Build terminal dashboards using ascii/ansi art and javascript

15,715 stars
843 forks
97 issues
JavaScript

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing yaronn/blessed-contrib in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/yaronn/blessed-contrib)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

blessed-contrib Build dashboards (or any other application) using ascii/ansi art and javascript. Friendly to terminals, ssh and developers. Extends blessed with custom drawille and other widgets. You should also check WOPR: a markup for creating terminal reports, presentations and infographics. **Contributors:** Yaron Naveh (@YaronNaveh) Chris (@xcezzz) Miguel Valadas (@mvaladas) Liran Tal (@lirantal) **Demo (full size):** (source code) **Running the demo** git clone https://github.com/yaronn/blessed-contrib.git cd blessed-contrib npm install node ./examples/dashboard.js Works on Linux, OS X and Windows. For Windows follow the pre requisites. Installation (to build custom projects) npm install blessed blessed-contrib Usage You can use any of the default widgets of blessed (texts, lists and etc) or the widgets added in blessed-contrib (described below). A layout is optional but useful for dashboards. The widgets in blessed-contrib follow the same usage pattern: See below for a complete list of widgets. Widgets Line Chart Bar Chart Stacked Bar Chart Map Gauge Stacked Gauge Donut LCD Display Rolling Log Picture Sparkline Table Tree Markdown Line Chart **Examples:** simple line chart, multiple lines, 256 colors Bar Chart Stacked Bar Chart Map Gauge Stacked Gauge Either specify each stacked portion with a and ... Or, you can just supply an array of numbers and random colors will be chosen. Donut Data passed in uses and to draw the donut graph. Color is optional and defaults to green. Updating the donut is as easy as passing in an array to using the same array format as in the constructor. Pass in as many objects to the array of data as you want, they will automatically resize and try to fit. However, please note that you will still be restricted to actual screen space. You can also hardcode a specific numeric into the donut's core display instead of the percentage by passing an property to the data, such as: See an example of this in one of the donuts settings on . LCD Display Please see the **examples/lcd.js** for an example. The example provides keybindings to adjust the and and in real-time so that you can see how they manipulate the look and feel. Rolling Log Picture (Also check the new blessed image implementation which has several benefits over this one.) note: only png images are supported Sparkline Table Tree Options • keys : Key to expand nodes. Default : ['enter','default'] • extended : Should nodes be extended/generated by default? Be careful with this setting when using a callback function. Default : false • template : • extend : Suffix "icon" for closed node. Default : '[+]' • retract : Suffix "icon" for opened node. Default : '[-]' • lines : Show lines in tree. Default : true Nodes Every node is a hash and it can have custom properties that can be used in "select" event callback. However, there are several special keys : • name • *Type* : • *Desc* : Node name • If the node isn't the root and you don't specify the name, will be set to hash key • *Example* : { name: 'Fruit'} • children • *Type* : or • *Desc* : Node children. • The function must return a hash that could have been used as children property • If you use a function, the result will be stored in and • *Example* : • Hash : {'Fruit':{ name: 'Fruit', children:{ 'Banana': {}, 'Cherry': {}}}} • Function : see • childrenContent • *Type* : • *Desc* : Children content for internal usage *DO NOT MODIFY* • If is a hash, • If is a function, it's used to store the result • You can read this property, but you should never write it. • Usually this will be used to check in your function to generate children only once • extended • *Type* : • *Desc* : Determine if this node is extended • No effect when the node have no child • Default value for each node will be if the node option is not set • *Example* : {'Fruit':{ name: 'Fruit', extended: true, children:{ 'Banana': {}, 'Cherry': {}}}} Markdown Colors You can use 256 colors (source): Layouts Grid Carousel Grid A grid layout can auto position your elements in a grid layout. When using a grid, you should not create the widgets, rather specify to the grid which widget to create and with which params. Each widget can span multiple rows and columns. Carousel A carousel layout switches between different views based on time or keyboard activity. One use case is an office dashboard with rotating views: Samples Terminal Dashboard **Running the sample** git clone https://github.com/yaronn/blessed-contrib.git cd blessed-contrib npm install node ./examples/dashboard.js **Installation (for a custom dashboard)** npm install blessed npm install blessed-contrib **A simple dashboard** **Rich dashboard** See source code Troubleshooting If you see questions marks or some (or all) missign characters try running with these env vars to fix encoding / terminal: License This library is under the MIT License More Information Created by Yaron Naveh (twitter, blog)