Giter Site home page Giter Site logo

enr / webman Goto Github PK

View Code? Open in Web Editor NEW

This project forked from candrewlee14/webman

1.0 0.0 0.0 571 KB

Add, remove, and manage different versions of web-distributed software binaries. No elevated permissions required!

License: MIT License

Shell 9.14% Go 89.46% PowerShell 1.40%

webman's Introduction

A cross-platform package manager for the web!


schema-linter bintest report-card

Add, remove, and manage different versions of web-distributed software binaries. No elevated permissions required!

Warning: This repo is still under development and has not stabilized. There may be frequent breaking changes until a 1.x release.

Package recipes are located in the webman-pkgs repo. Recipes are simple YAML files that make it easy to submit a new package. Webman locates version numbers online and installs packages from the web, so you'll always have the most up-to-date software available!

Windows (Powershell), Linux, and MacOS are supported!

Installation

MacOS, Linux, Git Bash, WSL, etc.

curl https://raw.githubusercontent.com/candrewlee14/webman/main/scripts/install.sh | sh

Windows Powershell

Webman requires the ability to create symlinks! Make sure to enable developer mode so that admin privileges aren't required.

Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/candrewlee14/webman/main/scripts/install.ps1')

NOTE: Never blindly run a shell script from the internet. Please check the source shell or powershell file. Alternatively, download the latest release manually.

Philosophy

I wanted a cross-platform package manager like webi with no dependencies, a nice CLI, and a simple package configuration format. I wanted a generalized version of nvm, nvm-windows, and gvm for easily switching between package versions. I wanted an easy way to install groups of packages, like the tools in modern-unix.

That's why I built webman.

All of webman's resources are located in ~/.webman. The only directory that needs to go on your system PATH is ~/.webman/bin. Simply remove the ~/.webman directory and all of webman's packages and resources will be removed.

Security is an important priority to me here. Package recipes cannot specify commands to be run, only endpoints to access. Everything is implemented in Go.

Examples

Below are examples of adding, removing, and switching with webman.

Add Software

webman add go will install the latest version of Go.

webman add [email protected] will install a specific version (0.9.1) of Zig.

webman add rg lsd zig node go [email protected] will install each of the package versions listed.

webman group add modern-unix will allow checkbox selections for adding packages in the modern-unix group.

webman add example

Run Software

webman run go will run the in-use version of Go (if installed).

webman run [email protected] --version will run a specific version (0.9.1) of Zig with the argument --version.

webman run node:npm --version will run npm --version using the in-use version of node.

Remove Software

webman remove go will allow you to select an installed version of the Go package to uninstall/

webman group remove modern-unix will allow checkbox selections for removing packages in the modern-unix group.

webman remove example

Switch to Other Versions of Software

webman switch go will allow you to select an installed version of the go package to switch to use. If rg --version previously showed 13.0.0, try running webman switch rg and selecting version 12.0.0 (after it has been installed). Running rg --version again will say 12.0.0.

Webman does version management.

webman switch example

Check Packages & Test Locally

You can create new package recipes by adding a simple recipe file in a cloned webman-pkgs directory. Check if it is in a valid format with webman dev check [WEBMAN-PKGS-DIR].

Next, webman dev bintest [NEW-PKG] -l [WEBMAN-PKGs-DIR] will do a cross-platform installation test on a package.

The package recipe format was built around making it easy to contribute new packages to webman, so if you're missing a package, go ahead and create it!

Disable output color and ANSI escape codes

Set NO_COLOR environment variable to hava a raw console output.

Setup

Run the script above or download the binary for your OS and architecture here.

Alternatively, if you have Go installed, run:

go install https://github.com/candrewlee14/webman@latest

Next, add ~/.webman/bin to your system PATH. If you are on Windows, use %USERPROFILE% instead of ~.

Now you're ready to use webman! Hope you enjoy :)

Updating

You can update webman at any time using webman add webman --switch.

webman's People

Contributors

candrewlee14 avatar jolheiser avatar andrusgerman avatar enr avatar

Stargazers

Roman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.