Skip to content
Merged
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
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ Ever joined a project and had to check which package manager it uses before runn
- ⬆️ **Self-upgrade** — `spm upgrade` updates spm to the latest release from GitHub
- 🔎 **Interactive search** — `spm add` with no args lets you search and pick a package from the npm registry
- 📋 **Package details** — press Enter on a search result to view metadata (license, downloads, stars, repo) and pick a specific version to install
- ✨ **Progress TUI** — `spm install` shows a live spinner with elapsed time and scrolling logs (use `--raw` for raw output)

### Built With

Expand Down Expand Up @@ -177,9 +176,6 @@ spm install --notify
# Combine vibes and notification
spm install --vibes --notify

# Show raw package manager output (skip progress TUI)
spm install --raw

# Run a security audit on dependencies
spm audit

Expand Down
12 changes: 0 additions & 12 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@ import (
"strings"
"time"

"github.com/mattn/go-isatty"
"github.com/spf13/cobra"

"github.com/decampsrenan/spm/internal/audio"
"github.com/decampsrenan/spm/internal/detector"
"github.com/decampsrenan/spm/internal/ecosystem"
"github.com/decampsrenan/spm/internal/progress"
"github.com/decampsrenan/spm/internal/prompt"
"github.com/decampsrenan/spm/internal/resolver"
"github.com/decampsrenan/spm/internal/runner"
Expand All @@ -27,7 +25,6 @@ import (
var dryRun bool
var vibes bool
var notify bool
var rawOutput bool

var rootCmd = &cobra.Command{
Use: "spm",
Expand Down Expand Up @@ -163,7 +160,6 @@ func init() {
rootCmd.PersistentFlags().BoolVar(&dryRun, "dry-run", false, "Print command instead of executing it")
rootCmd.PersistentFlags().BoolVar(&vibes, "vibes", false, "Play background music during install")
rootCmd.PersistentFlags().BoolVar(&notify, "notify", false, "Play a sound when the command finishes")
rootCmd.PersistentFlags().BoolVar(&rawOutput, "raw", false, "Show raw package manager output (skip progress TUI)")
// Allow unknown flags to pass through to the underlying package manager
// (e.g. spm add react --save-dev, spm dev --port 3000)
rootCmd.FParseErrWhitelist.UnknownFlags = true
Expand Down Expand Up @@ -352,14 +348,6 @@ func run(command string, extraArgs []string) error {

args := resolver.Resolve(det.PM, command, extraArgs)

// Use progress TUI for install/add commands when stdout is a TTY and --raw is not set.
if command == "install" || command == "i" || command == "add" {
isTTY := isatty.IsTerminal(os.Stdout.Fd()) || isatty.IsCygwinTerminal(os.Stdout.Fd())
if isTTY && !rawOutput {
return progress.Run(args, dryRun, vibes, notify)
}
}

return runner.Run(args, dryRun, vibes && command == "install", notify)
}

Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@ module github.com/decampsrenan/spm
go 1.25.8

require (
charm.land/bubbles/v2 v2.0.0
charm.land/bubbletea/v2 v2.0.2
charm.land/huh/v2 v2.0.3
charm.land/lipgloss/v2 v2.0.2
github.com/gopxl/beep/v2 v2.1.1
github.com/mattn/go-isatty v0.0.8
github.com/spf13/cobra v1.10.2
golang.org/x/mod v0.34.0
golang.org/x/sys v0.42.0
)

require (
charm.land/bubbles/v2 v2.0.0 // indirect
charm.land/bubbletea/v2 v2.0.2 // indirect
github.com/atotto/clipboard v0.1.4 // indirect
github.com/catppuccin/go v0.2.0 // indirect
github.com/charmbracelet/colorprofile v0.4.2 // indirect
Expand All @@ -38,7 +40,5 @@ require (
github.com/rivo/uniseg v0.4.7 // indirect
github.com/spf13/pflag v1.0.9 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
golang.org/x/mod v0.34.0 // indirect
golang.org/x/sync v0.19.0 // indirect
golang.org/x/sys v0.42.0 // indirect
)
163 changes: 0 additions & 163 deletions internal/progress/model.go

This file was deleted.

143 changes: 0 additions & 143 deletions internal/progress/progress.go

This file was deleted.

Loading
Loading