shumoku
v0.2.6
Published
Modern network topology visualization library for TypeScript/JavaScript
Downloads
518
Maintainers
Readme
Shumoku
Modern network topology visualization library for TypeScript/JavaScript.
Installation
npm install shumokuThis includes all core functionality plus 900+ vendor icons (Yamaha, Aruba, AWS, Juniper).
For NetBox integration (optional):
npm install @shumoku/netboxQuick Start
import { YamlParser, HierarchicalLayoutEngine, SvgRenderer } from 'shumoku'
const yaml = `
name: "Simple Network"
nodes:
- id: router
label: "Core Router"
type: router
vendor: yamaha
model: rtx3510
- id: switch
label: "Main Switch"
type: l2-switch
links:
- from: { node: router }
to: { node: switch }
bandwidth: 10G
`
// Parse YAML to network graph
const parser = new YamlParser()
const graph = parser.parse(yaml)
// Layout the graph
const engine = new HierarchicalLayoutEngine()
const layout = await engine.layout(graph)
// Render to SVG
const renderer = new SvgRenderer()
const svg = renderer.render(layout)Features
- YAML-based definitions - Simple, readable network topology definitions
- Automatic layout - Hierarchical layout powered by ELK.js
- Vendor icons - Built-in icons for Yamaha, Aruba, AWS, Juniper (900+ icons)
- SVG export - High-quality vector output
- TypeScript - Full type safety
Included Packages
This package bundles:
@shumoku/core- Core library (models, layout, renderer)@shumoku/parser-yaml- YAML parser@shumoku/icons- Vendor-specific icons (900+)
Documentation
- Playground - Interactive demo
- YAML Reference - Full syntax reference
- GitHub
License
MIT
