You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+80-3Lines changed: 80 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,6 @@
2
2
3
3
Inspired by [XKCD #2347](https://xkcd.com/2347/), StackTower renders dependency graphs as **physical towers** where blocks rest on what they depend on. Your application sits at the top, supported by libraries below—all the way down to that one critical package maintained by *some dude in Nebraska*.
4
4
5
-
Traditional node-link diagrams are technically correct but don't *feel* like anything. Tower visualizations tap into intuition: width shows importance, depth reveals foundation, and the structure makes hidden dependencies visible at a glance.
6
5
7
6
📖 **[Read the full story at stacktower.io](https://www.stacktower.io)**
The render layer accepts a simple JSON format, making it easy to visualize **any** directed graph—not just package dependencies. You can hand-craft graphs for component diagrams, callgraphs, or pipe output from other tools.
113
+
114
+
### Minimal Example
115
+
116
+
```json
117
+
{
118
+
"nodes": [
119
+
{ "id": "app" },
120
+
{ "id": "lib-a" },
121
+
{ "id": "lib-b" }
122
+
],
123
+
"edges": [
124
+
{ "from": "app", "to": "lib-a" },
125
+
{ "from": "lib-a", "to": "lib-b" }
126
+
]
127
+
}
128
+
```
129
+
130
+
### Required Fields
131
+
132
+
| Field | Type | Description |
133
+
|-------|------|-------------|
134
+
|`nodes[].id`| string | Unique node identifier (displayed as label) |
135
+
|`edges[].from`| string | Source node ID |
136
+
|`edges[].to`| string | Target node ID |
137
+
138
+
### Optional Fields
139
+
140
+
| Field | Type | Description |
141
+
|-------|------|-------------|
142
+
|`nodes[].row`| int | Pre-assigned layer (computed automatically if omitted) |
143
+
|`nodes[].kind`| string | Internal use: `"subdivider"` or `"auxiliary"`|
144
+
|`nodes[].meta`| object | Freeform metadata for display features |
145
+
146
+
### Recognized `meta` Keys
147
+
148
+
These keys are read by specific render flags. All are optional—missing keys simply disable the corresponding feature.
The `--detailed` flag (node-link only) displays **all** meta keys in the node label.
162
+
102
163
## How It Works
103
164
104
165
1.**Parse** — Fetch package metadata from registries (PyPI, crates.io, npm)
@@ -121,11 +182,27 @@ The ordering step is where the magic happens. StackTower uses an optimal search
121
182
122
183
HTTP responses are cached in `~/.cache/stacktower/` with a 24-hour TTL. Use `--refresh` to bypass.
123
184
185
+
## Adding New Languages
186
+
187
+
To add support for a new package manager (e.g., Ruby/RubyGems):
188
+
189
+
1.**Create a registry client** in `pkg/integrations/rubygems/client.go` — parse the registry API, extract dependencies, use `integrations.BaseClient` for HTTP + caching
190
+
191
+
2.**Create a source parser** in `pkg/source/ruby/ruby.go` — implement the `source.PackageInfo` interface (`GetName`, `GetVersion`, `GetDependencies`, `ToMetadata`, `ToRepoInfo`)
0 commit comments