Cosmo is a fast, interactive graph visualizer that makes graphs and trees easy to understand, beautifully arranged, and fully explorable without ever leaving your command line. Pass your data structures directly from code or file and see them come to life.Cosmo is a fast, interactive graph visualizer that makes graphs and trees easy to understand, beautifully arranged, and fully explorable without ever leaving your command line. Pass your data structures directly from code or file and see them come to life.

Cosmo: The Graph Visualization Tool Built for Your Terminal

2025/10/22 14:17

Visualize and explore complex data structures — right from your terminal. Cosmo is a fast, interactive graph visualizer that makes graphs and trees easy to understand, beautifully arranged, and fully explorable without ever leaving your command line.

\


Why Build Cosmo?

When working with complex data structures — trees, dependency maps, object graphs — it’s too easy to get lost. Most visualizers need a GUI, a canvas, or complex positioning logic. But what if all that could just appear in your terminal?

That’s what Cosmo does. You feed it nodes and edges — and it automatically computes a clear, readable layout.

No coordinates. No configuration. Just render and explore.

Pan or search across your data. Every interaction is optimized for terminal fluidity — it feels like a minimal, responsive GUI built on ASCII art.


Render Graphs Programmatically

Cosmo works seamlessly as part of your workflow. Pass your data structures directly from code and see them come to life:

import { cosmo } from "cosmo-flow"; const nodes = [ { id: "1", value: "Root" }, { id: "2", value: "Child" }, { id: "3", value: "Leaf" }, ]; const edges = [ { id: "1-2", source: "1", target: "2" }, { id: "2-3", source: "2", target: "3" }, ]; cosmo({ nodes, edges });

No need to predefine coordinates or specify layout rules — Cosmo handles positioning automatically, ensuring a clean, balanced visual every time.


Graphs from Files

Cosmo can also visualize graphs from JSON or YAML files with zero setup. Just run:

$ cosmo --file path/to/graph.json

Alternatively, Cosmo has a built-in file explorer lets you browse and search your filesystem for graph files — so you can open and switch files without leaving the terminal.

Explore, Search, Navigate

Once running, navigation is effortless:

  • Pan: Use arrow keys or h, j, k, l for navigation. Hold Shift while using these keys to pan faster.
  • Search: Press / to find nodes by ID or value
  • Menu: Access themes, keybindings, and commands with Space or Escape

With built-in color themes like aura, dracula, atom, and catppuccin, you can adapt the visualization to your preferred terminal look.


Behind the Scenes

Cosmo uses a modern rendering layer built on react-curse, enabling smooth interactivity in a purely terminal environment. This makes it fast enough to handle large data sets while maintaining clarity and aesthetics.


Upcoming features include:

  • Better edge paths
  • In-place editing and edge rewiring.
  • Live reload support.
  • Layout customization.
  • Export to SVG/PNG.

Why You’ll Love It

If you’ve ever wanted to see your data structures instead of imagining them, Cosmo gives you that instant clarity — directly in your terminal session. It’s simple, elegant, and fits naturally into any developer workflow.

\ Explore the full project on GitHub:https://github.com/turutupa/cosmo

Disclaimer: The articles reposted on this site are sourced from public platforms and are provided for informational purposes only. They do not necessarily reflect the views of MEXC. All rights remain with the original authors. If you believe any content infringes on third-party rights, please contact service@support.mexc.com for removal. MEXC makes no guarantees regarding the accuracy, completeness, or timeliness of the content and is not responsible for any actions taken based on the information provided. The content does not constitute financial, legal, or other professional advice, nor should it be considered a recommendation or endorsement by MEXC.

You May Also Like

SEC issues investor guide on crypto wallets and custody risks

SEC issues investor guide on crypto wallets and custody risks

The SEC released a guide on crypto wallets and custody for investors.
Share
Cryptopolitan2025/12/14 08:38
UK Looks to US to Adopt More Crypto-Friendly Approach

UK Looks to US to Adopt More Crypto-Friendly Approach

The post UK Looks to US to Adopt More Crypto-Friendly Approach appeared on BitcoinEthereumNews.com. The UK and US are reportedly preparing to deepen cooperation on digital assets, with Britain looking to copy the Trump administration’s crypto-friendly stance in a bid to boost innovation.  UK Chancellor Rachel Reeves and US Treasury Secretary Scott Bessent discussed on Tuesday how the two nations could strengthen their coordination on crypto, the Financial Times reported on Tuesday, citing people familiar with the matter.  The discussions also involved representatives from crypto companies, including Coinbase, Circle Internet Group and Ripple, with executives from the Bank of America, Barclays and Citi also attending, according to the report. The agreement was made “last-minute” after crypto advocacy groups urged the UK government on Thursday to adopt a more open stance toward the industry, claiming its cautious approach to the sector has left the country lagging in innovation and policy.  Source: Rachel Reeves Deal to include stablecoins, look to unlock adoption Any deal between the countries is likely to include stablecoins, the Financial Times reported, an area of crypto that US President Donald Trump made a policy priority and in which his family has significant business interests. The Financial Times reported on Monday that UK crypto advocacy groups also slammed the Bank of England’s proposal to limit individual stablecoin holdings to between 10,000 British pounds ($13,650) and 20,000 pounds ($27,300), claiming it would be difficult and expensive to implement. UK banks appear to have slowed adoption too, with around 40% of 2,000 recently surveyed crypto investors saying that their banks had either blocked or delayed a payment to a crypto provider.  Many of these actions have been linked to concerns over volatility, fraud and scams. The UK has made some progress on crypto regulation recently, proposing a framework in May that would see crypto exchanges, dealers, and agents treated similarly to traditional finance firms, with…
Share
BitcoinEthereumNews2025/09/18 02:21