
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
Visualize and explore graphs and trees right in your terminal. Fast, interactive, and easy to use for understanding your data.
Cosmo provides a fast and interactive way to explore node/edge data structures directly in your terminal. Whether you point it at a JSON/YAML file or use it programmatically, you can smoothly navigate large hierarchies and general graphs.
Cosmo into your own projects to render graphs and trees from your own data structures.NPM
npm i -g cosmo-flow
Yarn
yarn global add cosmo-flow
You can use the cosmo command to visualize a JSON or YAML file directly in your terminal. It has the following options:
--file <path-to-file>: The path to the JSON or YAML file you want to visualize.--colorscheme <theme>: The theme to use for the visualization. The available themes are: aura, dracula, atom, and catppuccin.# Visualize a JSON file
cosmo --file mock/small_tree.json
# Visualize a YAML file with a specific theme
cosmo --file mock/small_tree.yaml --colorscheme dracula
You can also use cosmo as a package in your project.
import { cosmo } from "cosmo-flow";
const nodes = [
{ id: "1", value: "Hello" },
{ id: "2", value: "World" },
];
const edges = [{ id: "1-2", source: "1", target: "2" }];
cosmo({ nodes, edges });
Once the application is running, you can use the following keys to navigate:
h, j, k, l to pan the view./ to open the search bar and find nodes by their ID or value.Escape or Space to open the main menu.s to see all available commands.Cosmo accepts JSON or YAML files with the following structure:
JSON
{
"nodes": [{ "id": "string", "value": "string" }],
"edges": [{ "id": "string", "source": "string", "target": "string" }]
}
YAML
nodes:
- id: b1
value: Root
- id: b2
value: L1 - L
- id: b3
value: L1 - R
edges:
- id: be1
source: b1
target: b2
- id: be2
source: b1
target: b3
The nodes array should contain objects with an id and a value. The edges array should contain objects with an id, a source (which is the id of the source node), and a target (which is the id of the target node).
Have an idea for a new feature? We'd love to hear from you! The best way to suggest a new feature is to open an issue on our GitHub repository.
When you open an issue, please provide a clear and detailed description of the feature you'd like to see. Explain why you think it would be a valuable addition to Cosmo, and if possible, provide a simple example of how it might work.
We appreciate your feedback and contributions to making Cosmo even better!
| Main Menu | Keybindings |
|---|---|
![]() | ![]() |
| File Explorer | Export |
|---|---|
![]() | ![]() |
| Search | Nodes/Edges Highlighting |
|---|---|
![]() | ![]() |
| Colorschemes | Graph Example |
|---|---|
![]() | ![]() |

FAQs
Unknown package
We found that cosmo-flow demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.