Beautiful plots in your terminal.
npm install @termplot/termplotBeautiful plots in your terminal.

Termplot renders the most beautiful and advanced plots directly inside your
terminal by running a web app inside an ephemeral web browser, taking a
screenshot, and using modern escape codes to render the image.
``nushell`
npm install -g @termplot/termplot
Simply pipe a Plotly configuration JSON file directly into Termplot in any
terminal that supports the iterm image protocol:
`nushell`
cat plotly-config.json | termplot
You can see examples in ./examples.
Learn how to write Plotly configuration files in their
documentation.
Termplot only supports the iTerm image protocol, which works in iTerm2 and
Wezterm.
Termplot currently only supports Plotly plots.
Termplot finds an open port, runs a React Router / express web app, runs a
puppeteer web browser, and navigates
to the web app, loading the desired plot, taking a screenshot of the plot,
rendeirng the screenshot in the terminal, and then exiting.
These tools make Termplot possible:
- plotly.js
- puppeteer
- express
- react-router
- ansi-escapes
- [x] Cat files into termplot and render the images in iTerm2/Wezterm
- [ ] Support config templates for easy plotting
- [ ] Support png file output
- [ ] Support other image protocols for other terminals
- [ ] Support other plotting libraries
- [ ] nushell plugin to hold browser open for faster rendering
- [ ] Provide serve` alternative for viewing interactive plots in a browser
---
Copyright (C) 2025 Ryan X. Charles