Skip to content

Commit 425d206

Browse files
committed
doc: Update readme
1 parent 9926868 commit 425d206

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
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*.
44

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.
65

76
📖 **[Read the full story at stacktower.io](https://www.stacktower.io)**
87

@@ -63,7 +62,7 @@ The repository ships with pre-parsed graphs so you can experiment immediately:
6362
# Real packages with full metadata
6463
stacktower render examples/real/flask.json -t tower --style handdrawn --merge -o flask.svg
6564
stacktower render examples/real/serde.json -t tower --popups -o serde.svg
66-
stacktower render examples/real/express.json -t tower --ordering barycenter -o express.svg
65+
stacktower render examples/real/express.json -t tower --ordering barycentric -o express.svg
6766

6867
# Synthetic test cases
6968
stacktower render examples/test/diamond.json -t tower -o diamond.svg
@@ -121,6 +120,22 @@ The ordering step is where the magic happens. StackTower uses an optimal search
121120

122121
HTTP responses are cached in `~/.cache/stacktower/` with a 24-hour TTL. Use `--refresh` to bypass.
123122

123+
## Adding New Languages
124+
125+
To add support for a new package manager (e.g., Ruby/RubyGems):
126+
127+
1. **Create a registry client** in `pkg/integrations/rubygems/client.go` — parse the registry API, extract dependencies, use `integrations.BaseClient` for HTTP + caching
128+
129+
2. **Create a source parser** in `pkg/source/ruby/ruby.go` — implement the `source.PackageInfo` interface (`GetName`, `GetVersion`, `GetDependencies`, `ToMetadata`, `ToRepoInfo`)
130+
131+
3. **Wire into CLI** in `internal/cli/parse.go`:
132+
```go
133+
cmd.AddCommand(newParserCmd("ruby <gem>", "Parse Ruby dependencies",
134+
func() (source.Parser, error) { return ruby.NewParser(source.DefaultCacheTTL) }, &opts))
135+
```
136+
137+
The generic `source.Parse()` handles concurrent fetching, depth limits, and graph construction automatically.
138+
124139
## Learn More
125140

126141
- 📖 **[stacktower.io](https://www.stacktower.io)** — Interactive examples and the full story behind tower visualizations

0 commit comments

Comments
 (0)