Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SOPMOD II

Version manager for Soppo. SOPMOD is entirely dogfooded and has been rewritten from Rust to Soppo, hence the "II".

SOPMOD handles installing, updating, and switching between multiple versions of Soppo. It also manages Go installations that Soppo uses internally for compilation, and automatically installs sopls (the Soppo Language Server) alongside each Soppo version.

Installation

curl -fsSL https://soppolang.dev/install.sh | sh

After installation, add ~/.sopmod/bin to your PATH:

export PATH="$HOME/.sopmod/bin:$PATH"

Usage

# Install latest sop 
sopmod install sop latest

# Install a specific version
sopmod install sop 0.4.1

# Update to latest
sopmod update sop

# Set default version
sopmod default 0.4.1

# List installed versions
sopmod list

# Remove a version
sopmod remove sop 0.4.0

Per-project versions

Pin a specific Soppo version for your project by adding to sop.mod:

sop = "0.4"

When you run sop in a directory with a sop.mod file, SOPMOD automatically uses the pinned version. Version matching is flexible - sop = "0.4" will match any 0.4.x version installed.

Go versions

Soppo compiles to Go, so it needs a Go installation. SOPMOD manages this automatically and when you set a default Soppo version, SOPMOD automatically installs and configures a compatible Go version. You can also pin a Go version in sop.mod:

go = "1.25"

How it works

SOPMOD installs versions to ~/.sopmod/:

~/.sopmod/
  config.toml        # Default versions
  bin/
    sop              # Shim that dispatches to correct version
    sopls            # Shim for the language server
  go/
    1.22.0/
    1.23.0/
  sop/
    0.4.0/
      sop
      sopls
    0.4.1/
      sop
      sopls

The sop and sopls binaries in ~/.sopmod/bin/ are shims that:

  1. Check for sop.mod in the current or parent directories
  2. Use the pinned version if specified
  3. Fall back to the default version from config.toml
  4. Execute the appropriate binary

Licence

BSD 3-Clause. See LICENCE.

About

Soppo version manager.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages