Giter Site home page Giter Site logo

version-manager / woof Goto Github PK

View Code? Open in Web Editor NEW
28.0 2.0 1.0 3.98 MB

The version manager to end all version managers.

Home Page: https://version-manager.github.io/woof

License: Mozilla Public License 2.0

Shell 99.74% jq 0.26%
bash basalt version-manager shell asdf sdkman

woof's Introduction

Woof

The version manager to end all version managers

STATUS: IN DEVELOPMENT

Why?

  • Your OS's package manager doesn't contain the latest (or multiple) $language versions
  • You want an OS-independent way to install and switch between $language versions
  • You are tired of installing and configuring version managers (or version manager plugins) for every single language
  • More repeatable and reproducible builds

Features

  • Just Fucking Works
  • Optionally configurationless
  • Clean Bash code
    • Favors builtins and native Bash features (over external commands)
  • Supports 35 tools on at least x86_64 (see roadmap and languages for details)
  • Compatible with .tool-versions, nvm's .nvmrc and read things from popular version managers like rvm and pyenv
  • Fast
  • Uses no symlinks or shims

Preview (v0.5.0)

Demo

Prerequisites

External utilities are only used due to necessity or efficiency. The following are used

  • cURL
  • jq 1.6
  • POSIX mv, cat, cp, uname, stty,, etc.
  • sort (TODO: phase out -V GNUism)
  • Optional: pv

Installation

Use Basalt, a Bash package manager, to install this project globally

basalt global add hyperupcall/woof

woof's People

Contributors

hyperupcall avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

madjarx

woof's Issues

Make console output to right of colon gray rather than white

      Info: Constructing version table
  Fetching: https://nodejs.org/download/release/v18.1.0/node-v18.1.0-linux-x64.tar.gz
################################################################################################################################################################### 100.0%
 Unpacking: /storage/ur/storage_home/Docs/Programming/repos/Groups/Bash/woof/woof/state/workspace-nodejs/./file.tar.gz
41.6MiB 0:00:00 [52.8MiB/s] [==========================================================================================================================>] 100%
 Installed: v18.1.0
     Using: v18.1.0
      Info: Setting v18.1.0 as global default for nodejs

Use `n`'s behavior of sharing global module directory?

Potential code

	# TODO
	# Here, we ensure that the correct corresponding npm version is installed
	# when switching versions. 
	# mkdir -p "$WOOF_MODULE_COMMON_DIR/node_modules"
	# m.ensure rm -rf "$WOOF_MODULE_COMMON_DIR/node_modules"/{corepack,npm}
	# m.ensure cp -r "$PWD/dir/lib/node_modules"/{corepack,npm} "$WOOF_MODULE_COMMON_DIR/node_modules"
	# m.rmln "$WOOF_MODULE_COMMON_DIR/node_modules" "$PWD/dir/lib/node_modules" 

We'll want this to be shared for all versions (global, directory, etc).

Improve error messages

Stuff like "Failed to find corresponding row in version table" etc. should be devoid of implementation detail

Somehow `hash` after resymlink or local install

  • Can do so with a shell function, but that would necessitate duplicating argument parsing code
  • Can create a file at /tmp/woof-reshim that, if exists, tells shell function to hash (easiest)
  • Create background process for each spawned shell that will hash via IPC
    • Long term solution, as similar to the history

Rework TUI

Future development is blocked on a better TUI for expressing actions and the like. The current TUI works, but is one dimensional and does not support many features

To make this possible, I'm writing a Bash TUI library. It builds upon bash-term. When its ready enough, I'll make it public at hyperupcall/bash-tui and use it from this project.

The final TUI should look something like this:

plugin 1   |  [tool a] [tool b] [tool c] 
plugin 2   |  [variant a] [variant b] [variant c]
           |
           |
Sidebar    |
           |
           |
           |
           |
----------------------------------------------------------
                            status bar

Until then, this place will be relatively desolate

Polish

  • woof list (make this work better)
    • Make --all the default if none are supplied on the command line
  • Error if give arguments to subcommand that is expecting none
  • Allow for passing multiple 'plugins' for each subcommand
  • what to do with the prunes? (put them at the bin/woof.sh file)
  • Add version metadata to plugins
  • think about refactor to use globally variables. $tool_name, $plugin_name, etc. and the like. these values are only mutated in particular places at the start of program execution. makes things easier, maybe will even improve perf due to fewer allocations
  • change install_dir/blah to tools_dir because that's what it is

Check

Check version tables and make sure that for each version, architecture, and platform that there are no duplicates

  • This would catch at least Please (since there is a server/client binary) for super early versions

Also check to ensure version matches regular expression of semantic version or date

  • This would catch FStar, where early versions are just weird

Installation

When installing this on actual systems, have an option to be via package manager

That way on servers, PATH is already sorted out. Or, install to /opt via install script with various symlinks to bin /usr/local/bin

Clarify plugin naming and usage

In some areas, plugins are prefixed with woof-plugin-*. At other times, they are not. Unify this.

Clarify how tool selection works when a plugin only has ONE tool, or it wants to choose a tool by default.

For example, the python tool may have the tools python, micropython, jpython.

  • python:{python,micropython} -> does what you expect
  • python -> show tool selection menu
  • python/ -> show tool selection menu
  • python/:default
  • python/p

Track symlinked files for each `plugin`

So when switching between different variatns, can unlink everything in that particular plugin (without unsymlinking absolutely everything, which will wreck performance and behavior (since its a race condition)

Change default 'out' directory

Currently, all directories are named 'dir' before copying their extracted contents to the <tool>/<version> directory.

I'd like to make the name less generic - to something like 'out', 'extracted', or 'final'

Improve plugin install

  • Support multiple arguments
  • Shorthand for woof-plugin repositories in version-manager repository

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.