Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ formatters:
settings:
goimports:
local-prefixes:
- github.com/matzehuels/stacktower
- github.com/stacktower-io/stacktower

linters:
default: none
Expand Down
16 changes: 8 additions & 8 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ builds:
- arm64
ldflags:
- -s -w
- -X github.com/matzehuels/stacktower/pkg/buildinfo.Version={{.Version}}
- -X github.com/matzehuels/stacktower/pkg/buildinfo.Commit={{.Commit}}
- -X github.com/matzehuels/stacktower/pkg/buildinfo.Date={{.Date}}
- -X github.com/stacktower-io/stacktower/pkg/buildinfo.Version={{.Version}}
- -X github.com/stacktower-io/stacktower/pkg/buildinfo.Commit={{.Commit}}
- -X github.com/stacktower-io/stacktower/pkg/buildinfo.Date={{.Date}}

archives:
# CLI archive (for Homebrew, manual download)
Expand Down Expand Up @@ -86,7 +86,7 @@ changelog:

release:
github:
owner: matzehuels
owner: stacktower-io
name: stacktower
draft: false
prerelease: auto
Expand All @@ -101,20 +101,20 @@ release:
Download the appropriate binary for your platform below, or install via Go:

```bash
go install github.com/matzehuels/stacktower@{{.Tag}}
go install github.com/stacktower-io/stacktower@{{.Tag}}
```

footer: |
**Full Changelog**: https://github.com/matzehuels/stacktower/compare/{{ .PreviousTag }}...{{ .Tag }}
**Full Changelog**: https://github.com/stacktower-io/stacktower/compare/{{ .PreviousTag }}...{{ .Tag }}

brews:
- name: stacktower
repository:
owner: matzehuels
owner: stacktower-io
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP_TOKEN }}"
directory: Formula
homepage: https://github.com/matzehuels/stacktower
homepage: https://github.com/stacktower-io/stacktower
description: Visualize dependency graphs as elegant stacked tower diagrams
license: Apache-2.0
test: |
Expand Down
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Thanks for your interest in contributing!
## Getting Started

```bash
git clone https://github.com/matzehuels/stacktower.git
git clone https://github.com/stacktower-io/stacktower.git
cd stacktower
make install-tools # Install golangci-lint, goimports, govulncheck
make check # Run all CI checks locally
Expand Down Expand Up @@ -42,7 +42,7 @@ make cover # Tests with coverage

## Architecture

Stacktower follows a clean layered architecture. See the [pkg.go.dev documentation](https://pkg.go.dev/github.com/matzehuels/stacktower) for detailed API docs.
Stacktower follows a clean layered architecture. See the [pkg.go.dev documentation](https://pkg.go.dev/github.com/stacktower-io/stacktower) for detailed API docs.

```
internal/cli/ # Command-line interface
Expand Down Expand Up @@ -113,7 +113,7 @@ var Language = &deps.Language{

3. **Register in CLI** in `internal/cli/parse.go`

See [`pkg/core/deps`](https://pkg.go.dev/github.com/matzehuels/stacktower/pkg/core/deps) for detailed documentation.
See [`pkg/core/deps`](https://pkg.go.dev/github.com/stacktower-io/stacktower/pkg/core/deps) for detailed documentation.

## Adding a Manifest Parser

Expand Down Expand Up @@ -151,9 +151,9 @@ func RenderMyFormat(l layout.Layout, opts ...MyFormatOption) ([]byte, error) {

2. **Register in CLI** in `internal/cli/render.go`

See [`pkg/core/render/tower/sink`](https://pkg.go.dev/github.com/matzehuels/stacktower/pkg/core/render/tower/sink) for existing implementations.
See [`pkg/core/render/tower/sink`](https://pkg.go.dev/github.com/stacktower-io/stacktower/pkg/core/render/tower/sink) for existing implementations.

## Questions?

Open an [issue](https://github.com/matzehuels/stacktower/issues) — we're happy to help!
Open an [issue](https://github.com/stacktower-io/stacktower/issues) — we're happy to help!

10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ BINARY := stacktower
VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
COMMIT := $(shell git rev-parse --short HEAD 2>/dev/null || echo "unknown")
DATE := $(shell date -u +%Y-%m-%dT%H:%M:%SZ)
LDFLAGS := -X github.com/matzehuels/stacktower/pkg/buildinfo.Version=$(VERSION) \
-X github.com/matzehuels/stacktower/pkg/buildinfo.Commit=$(COMMIT) \
-X github.com/matzehuels/stacktower/pkg/buildinfo.Date=$(DATE)
LDFLAGS := -X github.com/stacktower-io/stacktower/pkg/buildinfo.Version=$(VERSION) \
-X github.com/stacktower-io/stacktower/pkg/buildinfo.Commit=$(COMMIT) \
-X github.com/stacktower-io/stacktower/pkg/buildinfo.Date=$(DATE)

# =============================================================================
# Default Target
Expand Down Expand Up @@ -41,12 +41,12 @@ check: fmt lint test vuln

fmt:
@gofmt -s -w .
@goimports -w -local github.com/matzehuels/stacktower .
@goimports -w -local github.com/stacktower-io/stacktower .

fmt-check:
@echo "Checking formatting..."
@test -z "$$(gofmt -l .)" || (echo "Files not formatted:"; gofmt -l .; exit 1)
@test -z "$$(goimports -l -local github.com/matzehuels/stacktower .)" || (echo "Imports not formatted:"; goimports -l -local github.com/matzehuels/stacktower .; exit 1)
@test -z "$$(goimports -l -local github.com/stacktower-io/stacktower .)" || (echo "Imports not formatted:"; goimports -l -local github.com/stacktower-io/stacktower .; exit 1)
@echo "Formatting OK"

lint:
Expand Down
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Stacktower

[![CI](https://github.com/matzehuels/stacktower/actions/workflows/ci.yml/badge.svg)](https://github.com/matzehuels/stacktower/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/matzehuels/stacktower/graph/badge.svg)](https://codecov.io/gh/matzehuels/stacktower)
[![Go Report Card](https://goreportcard.com/badge/github.com/matzehuels/stacktower)](https://goreportcard.com/report/github.com/matzehuels/stacktower)
[![Go Reference](https://pkg.go.dev/badge/github.com/matzehuels/stacktower.svg)](https://pkg.go.dev/github.com/matzehuels/stacktower)
[![Release](https://img.shields.io/github/v/release/matzehuels/stacktower)](https://github.com/matzehuels/stacktower/releases)
[![CI](https://github.com/stacktower-io/stacktower/actions/workflows/ci.yml/badge.svg)](https://github.com/stacktower-io/stacktower/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/stacktower-io/stacktower/graph/badge.svg)](https://codecov.io/gh/stacktower-io/stacktower)
[![Go Report Card](https://goreportcard.com/badge/github.com/stacktower-io/stacktower)](https://goreportcard.com/report/github.com/stacktower-io/stacktower)
[![Go Reference](https://pkg.go.dev/badge/github.com/stacktower-io/stacktower.svg)](https://pkg.go.dev/github.com/stacktower-io/stacktower)
[![Release](https://img.shields.io/github/v/release/stacktower-io/stacktower)](https://github.com/stacktower-io/stacktower/releases)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

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_.
Expand All @@ -28,19 +28,19 @@ Inspired by [XKCD #2347](https://xkcd.com/2347/), Stacktower renders dependency
### Homebrew (macOS/Linux)

```bash
brew install matzehuels/tap/stacktower
brew install stacktower-io/homebrew-tap/stacktower
```

### Go

```bash
go install github.com/matzehuels/stacktower@latest
go install github.com/stacktower-io/stacktower@latest
```

### From Source

```bash
git clone https://github.com/matzehuels/stacktower.git
git clone https://github.com/stacktower-io/stacktower.git
cd stacktower
go build -o bin/stacktower ./cmd/stacktower
```
Expand Down Expand Up @@ -956,10 +956,10 @@ Stacktower can be used as a Go library for programmatic graph visualization.

```go
import (
"github.com/matzehuels/stacktower/pkg/core/dag"
"github.com/matzehuels/stacktower/pkg/core/dag/transform"
"github.com/matzehuels/stacktower/pkg/core/render/tower/layout"
"github.com/matzehuels/stacktower/pkg/core/render/tower/sink"
"github.com/stacktower-io/stacktower/pkg/core/dag"
"github.com/stacktower-io/stacktower/pkg/core/dag/transform"
"github.com/stacktower-io/stacktower/pkg/core/render/tower/layout"
"github.com/stacktower-io/stacktower/pkg/core/render/tower/sink"
)

// Build a graph
Expand All @@ -974,16 +974,16 @@ l := layout.Build(g, 800, 600)
svg := sink.RenderSVG(l, sink.WithGraph(g), sink.WithPopups())
```

📚 **[Full API documentation on pkg.go.dev](https://pkg.go.dev/github.com/matzehuels/stacktower)**
📚 **[Full API documentation on pkg.go.dev](https://pkg.go.dev/github.com/stacktower-io/stacktower)**

Key packages:

- [`pkg/core/dag`](https://pkg.go.dev/github.com/matzehuels/stacktower/pkg/core/dag) — DAG data structure and crossing algorithms
- [`pkg/core/dag/transform`](https://pkg.go.dev/github.com/matzehuels/stacktower/pkg/core/dag/transform) — Graph normalization pipeline
- [`pkg/core/render/tower`](https://pkg.go.dev/github.com/matzehuels/stacktower/pkg/core/render/tower) — Layout, ordering, and rendering
- [`pkg/core/deps`](https://pkg.go.dev/github.com/matzehuels/stacktower/pkg/core/deps) — Dependency resolution from registries
- [`pkg/pipeline`](https://pkg.go.dev/github.com/matzehuels/stacktower/pkg/pipeline) — Complete parse → layout → render pipeline
- [`pkg/security`](https://pkg.go.dev/github.com/matzehuels/stacktower/pkg/security) — Vulnerability scanning via OSV.dev
- [`pkg/core/dag`](https://pkg.go.dev/github.com/stacktower-io/stacktower/pkg/core/dag) — DAG data structure and crossing algorithms
- [`pkg/core/dag/transform`](https://pkg.go.dev/github.com/stacktower-io/stacktower/pkg/core/dag/transform) — Graph normalization pipeline
- [`pkg/core/render/tower`](https://pkg.go.dev/github.com/stacktower-io/stacktower/pkg/core/render/tower) — Layout, ordering, and rendering
- [`pkg/core/deps`](https://pkg.go.dev/github.com/stacktower-io/stacktower/pkg/core/deps) — Dependency resolution from registries
- [`pkg/pipeline`](https://pkg.go.dev/github.com/stacktower-io/stacktower/pkg/pipeline) — Complete parse → layout → render pipeline
- [`pkg/security`](https://pkg.go.dev/github.com/stacktower-io/stacktower/pkg/security) — Vulnerability scanning via OSV.dev

## Contributing

Expand Down Expand Up @@ -1013,7 +1013,7 @@ Commit messages follow [Conventional Commits](https://www.conventionalcommits.or
## Learn More

- 📖 **[stacktower.io](https://www.stacktower.io)** — Interactive examples and the full story behind tower visualizations
- 🐛 **[Issues](https://github.com/matzehuels/stacktower/issues)** — Bug reports and feature requests
- 🐛 **[Issues](https://github.com/stacktower-io/stacktower/issues)** — Bug reports and feature requests

## License

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ We recommend always using the latest release.
Instead, report them privately via one of these methods:

1. **GitHub Security Advisories** (Preferred)
Go to the [Security tab](https://github.com/matzehuels/stacktower/security/advisories) and click "Report a vulnerability"
Go to the [Security tab](https://github.com/stacktower-io/stacktower/security/advisories) and click "Report a vulnerability"

2. **Email**
Contact the maintainer directly (see GitHub profile)
Expand Down
6 changes: 3 additions & 3 deletions blogpost/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
</svg>
<span>Try the App</span>
</a>
<a href="https://github.com/matzehuels/stacktower" target="_blank" rel="noopener noreferrer"
<a href="https://github.com/stacktower-io/stacktower" target="_blank" rel="noopener noreferrer"
class="nav-link" title="View on GitHub">
<svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor">
<path
Expand Down Expand Up @@ -179,7 +179,7 @@ <h1 class="hero-title">Stacking Dependencies</h1>
</svg>
<span>Try the Web App</span>
</a>
<a href="https://github.com/matzehuels/stacktower" target="_blank" rel="noopener"
<a href="https://github.com/stacktower-io/stacktower" target="_blank" rel="noopener"
class="hero-cta hero-github">
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
<path
Expand Down Expand Up @@ -971,7 +971,7 @@ <h2>Wrapping Up</h2>
algorithm from scratch. It was about finding the right decomposition, borrowing good ideas for
each piece, and stitching them together into something that fits this particular problem.</p>

<p>If you want to explore the code, it's all <a href="https://github.com/matzehuels/stacktower"
<p>If you want to explore the code, it's all <a href="https://github.com/stacktower-io/stacktower"
target="_blank" rel="noopener">open source on GitHub</a>. You can render your own towers
from the CLI, or try the <a href="https://app.stacktower.io" target="_blank"
rel="noopener">interactive web app</a> to build and share towers right from your browser.
Expand Down
2 changes: 1 addition & 1 deletion blogpost/llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ It fetches dependency data from package registries and maintainer information fr

## Links

- Source Code: https://github.com/matzehuels/stacktower
- Source Code: https://github.com/stacktower-io/stacktower
- Author: Matthias Huels (https://huels.ai)
- Original Inspiration: XKCD #2347 (https://xkcd.com/2347/)

Expand Down
4 changes: 2 additions & 2 deletions cmd/stacktower/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

"github.com/spf13/cobra"

"github.com/matzehuels/stacktower/internal/cli"
"github.com/matzehuels/stacktower/internal/cli/ui"
"github.com/stacktower-io/stacktower/internal/cli"
"github.com/stacktower-io/stacktower/internal/cli/ui"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/stacktower/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"testing"

"github.com/matzehuels/stacktower/internal/cli"
"github.com/stacktower-io/stacktower/internal/cli"
)

func TestExitCodeForError(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/matzehuels/stacktower
module github.com/stacktower-io/stacktower

go 1.25.8

Expand Down
59 changes: 55 additions & 4 deletions internal/cli/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (

"github.com/spf13/cobra"

"github.com/matzehuels/stacktower/internal/cli/ui"
"github.com/matzehuels/stacktower/pkg/buildinfo"
"github.com/matzehuels/stacktower/pkg/integrations/github"
"github.com/matzehuels/stacktower/pkg/session"
"github.com/stacktower-io/stacktower/internal/cli/ui"
"github.com/stacktower-io/stacktower/pkg/buildinfo"
"github.com/stacktower-io/stacktower/pkg/integrations/github"
"github.com/stacktower-io/stacktower/pkg/session"
)

// sessionTTL is the duration for CLI sessions (30 days).
Expand All @@ -34,6 +34,7 @@ Your session is stored in ~/.config/stacktower/sessions/`,
cmd.AddCommand(c.githubLogoutCommand())
cmd.AddCommand(c.githubWhoamiCommand())
cmd.AddCommand(c.githubInstallCommand())
cmd.AddCommand(c.githubUninstallCommand())

return cmd
}
Expand Down Expand Up @@ -182,6 +183,56 @@ and configure which repositories it can access.`,
}
}

// githubUninstallCommand creates the uninstall subcommand.
func (c *CLI) githubUninstallCommand() *cobra.Command {
return &cobra.Command{
Use: "uninstall",
Short: "Uninstall the Stacktower GitHub App",
Long: `Open the GitHub App settings page to uninstall Stacktower.

This removes Stacktower's access to your repositories. You can re-install
at any time with 'stacktower github install'.`,
RunE: func(cmd *cobra.Command, args []string) error {
ctx := cmd.Context()

sess, err := loadGitHubSession(ctx)
if err != nil {
ui.PrintWarning("Not logged in. Run 'stacktower github login' first.")
return nil
}

client := github.NewContentClient(sess.AccessToken)
installation, err := client.HasAppInstallation(ctx, buildinfo.GitHubAppSlug)
if err != nil {
c.Logger.Debug("failed to check app installation", "error", err)
}

if installation == nil {
ui.PrintInfo("GitHub App is not installed")
ui.PrintDetail("Run 'stacktower github install' to install it")
return nil
}

uninstallURL := fmt.Sprintf("https://github.com/settings/installations/%d", installation.ID)

ui.PrintNewline()
ui.PrintHeader("Uninstall Stacktower GitHub App")
ui.PrintKeyValue("Installed on", "@"+installation.Account.Login)
ui.PrintKeyValue("URL", ui.StyleLink.Render(uninstallURL))
ui.PrintNewline()
ui.PrintDetail("The settings page will open in your browser.")
ui.PrintDetail("Scroll to \"Danger zone\" and click Uninstall.")
ui.PrintNewline()

if err := openBrowser(uninstallURL); err != nil {
ui.PrintDetail("Copy the URL above and paste it in your browser")
}

return nil
},
}
}

// =============================================================================
// Session Management
// =============================================================================
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/spf13/cobra"

"github.com/matzehuels/stacktower/internal/cli/ui"
"github.com/stacktower-io/stacktower/internal/cli/ui"
)

// cacheCommand creates the cache management command.
Expand Down
14 changes: 7 additions & 7 deletions internal/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ import (
"github.com/charmbracelet/log"
"github.com/spf13/cobra"

"github.com/matzehuels/stacktower/internal/cli/ui"
"github.com/matzehuels/stacktower/pkg/buildinfo"
"github.com/matzehuels/stacktower/pkg/cache"
"github.com/matzehuels/stacktower/pkg/core/dag"
"github.com/matzehuels/stacktower/pkg/observability"
"github.com/matzehuels/stacktower/pkg/pipeline"
"github.com/matzehuels/stacktower/pkg/security"
"github.com/stacktower-io/stacktower/internal/cli/ui"
"github.com/stacktower-io/stacktower/pkg/buildinfo"
"github.com/stacktower-io/stacktower/pkg/cache"
"github.com/stacktower-io/stacktower/pkg/core/dag"
"github.com/stacktower-io/stacktower/pkg/observability"
"github.com/stacktower-io/stacktower/pkg/pipeline"
"github.com/stacktower-io/stacktower/pkg/security"
)

// =============================================================================
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"testing"

"github.com/matzehuels/stacktower/pkg/cache"
"github.com/stacktower-io/stacktower/pkg/cache"
)

func TestNewCache(t *testing.T) {
Expand Down
Loading
Loading