Coder Social home page Coder Social logo

shenliqing / gvc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gvcgo/gvc

0.0 0.0 0.0 79.44 MB

GVC is a very powerful scaffolding tool for local dev-enviroment management supporting Mac/Win/Linux.

License: MIT License

Shell 0.70% Go 90.95% Batchfile 0.74% Vim Script 1.14% VBScript 6.47%

gvc's Introduction

What's GVC?

At the very beginning, GVC is just the abbreviation for Go-Version-Controller, which means, it provides auto-installation, environment variables handling, as well as multi-versions management only for Go compilers.

As we know, we already have gvm or g with the similar features implemented. So, why do we need a new one?

The reason to create GVC is for more convenience and a better UI(maybe TUI more pricisely).

However, this never becomes the end of the story. After the version-management for Go has been implemented, an idea for managing other languages flashes across my mind. Therefore, GVC starts to support version-control and auto-installation also for Java/Python/NodeJS/Flutter/Julia/Protoc/Rust/Cpp/Vlang/Typst.

At this point, GVC becomes General-Version-Controller.

And the story still continues.

Auto-installation for Visual Studio Code(VSCode) and NeoVim is adopted.The WebDAV support is also introduced for saving config files from VSCode/NeoVim to user's netdisk(eg. jianguoyun.com). So, you can rebuild your Development Environment using these files on any machine.

Besides, GVC also supports asciinema terminal recording, browser data management, counting lines of code, etc.

Finally, GVC becomes something just like a Scaffolding Tool for local development environments management.


What's supported?

Lang/App additions
go homepage go homepage cn|aliyun mirror
java/jdk homepage java/jdk cn
maven homepage maven downloads
gradle homepage gradle releases
python homepage pyenv|pyenv-win
nodejs homepage nodejs versions
rust homepage rust homepage cn
Cygwin homepage Cygwin installation
Msys2 homepage Msys2 tsinghua mirror
vcpkg-tool vcpkg
julia homepage julia community cn
vlang homepage vlang github
typst homepage typst github
flutter homepage flutter nju mirror
vscode homepage vscode cdn acceleration
NeoVim homepage NeoVim github
Homebrew homepage Homebrew shell script
Browser data management Browser data management github
neobox vpns sing-box|xray-core|wgcf
github hosts file github hosts file
asciinema asciinema for full-platform
count lines of code(cloc) cloc
protobuf protoc-go-gen

Download & Install

  • Download the latest release.
  • Unzip, double click the executable file, or run executable file in Terminal/PowerShell.
  • Open a new Terminal/PowerShell, then the command g is available. Help info will be displayed using 'g help'.

Main features

GVC is a command-line tool, use "g help" or "gvc help", to see help info.

$moqsien> g help

NAME:
   g.exe - gvc <Command> <SubCommand>...

USAGE:
   g.exe [global options] command [command options] [arguments...]

DESCRIPTION:
   A productive tool to manage your development environment.

COMMANDS:
   go, g                            Go version management.
   proto, protobuf, protoc, pt      Protoc installation.
   python, py                       Python version management.
   java, jdk, j                     Java jdk version management.
   maven, mav, ma                   Maven version management.
   gradle, gra, gr                  Gradle version management.
   nodejs, node, no                 NodeJS version management.
   flutter, flu, fl                 Flutter version management.
   julia, jul, ju                   Julia version management.
   rust, rustc, ru, r               Rust installation.
   cpp                              C/C++ management.
   typst, ty                        Typst installation.
   vlang, vl                        Vlang installation.
   vscode, vsc, vs, v               VSCode and extensions installation.
   nvim, neovim, nv, n              Neovim installation.
   neobox-shell, shell, box, ns     Start a neobox shell.
   neobox-runner, nbrunner, nbr     Start a neobox client.
   neobox-keeper, nbkeeper, nbk     Start a neobox keeper.
   browser, br                      Browser data management.
   homebrew, brew, hb               Homebrew installation or update.
   gsudo, winsudo, gs, ws           Gsudo for windows.
   hosts, h, host                   System hosts file management(need admistrator or root).
   github, gh                       Github download speedup.
   cloc, cl                         Count lines of code.
   asciinema, ascii, asc            Asciinema terminal recorder.
   config, conf, cnf, c             Config file management for gvc.
   version, ver, vsi                Show gvc version info.
   check, checklatest, checkupdate  Check and download the latest version of gvc.
   show, sho, sh                    Show [gvc] installation path and config file path.
   uninstall, unins, delete, del    [Caution] Remove gvc and softwares installed by gvc!
   help, h                          Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h  show help
$moqsien> g version

 ██████  ██    ██  ██████
██           ██    ██ ██
██   ███  ██    ██ ██
██    ██    ██  ██  ██
 ██████    ████    ██████

┌────────────────────────────────────────────────────────────────────┐
|                                                                    |
|                                                                    |
|     Version:     v1.4.2(f684b2a1a57c560228add15590783d428d92b480)  |
|     UpdateAt:    Wed Aug 23 17:33:08 2023 +0800                    |
|     Homepage:    https://github.com/moqsien/gvc                    |
|     Email:       [email protected]                               |
|                                                                    |
|                                                                    |
└────────────────────────────────────────────────────────────────────┘

Subcommand: go

$moqsien> g go help

NAME:
   g.exe go - Go version management.

USAGE:
   g.exe go command [command options] [arguments...]

COMMANDS:
   remote, r                                Show remote versions.
   use, u                                   Download and use version.
   local, l                                 Show installed versions.
   remove-unused, ru                        Remove unused versions.
   remove-version, rm                       Remove a version.
   add-envs, env, e, ae                     Add envs for go.
   search-package, sp, search               Search for third-party packages.
   build, bui, b                            Compiles go code for multi-platforms [with <-ldflags "-s -w"> builtin].
   list-distributions, list-dist, dist, ld  List the platforms supported by go compilers.
   help, h                                  Shows a list of commands or help for one command

OPTIONS:
   --help, -h  show help

In this subcommand, you can show/install/remove/change go compiler versions, search third-party packages written in Go, and build Go source code for multi-platforms without prepare any scripts.

Subcommand: proto

$moqsien> g proto help

NAME:
   g.exe proto - Protoc installation.

USAGE:
   g.exe proto command [command options] [arguments...]

COMMANDS:
   install, ins, i             Install protoc.
   install-go-plugin, igo, ig  Install protoc-gen-go.
   help, h                     Shows a list of commands or help for one command

OPTIONS:
   --help, -h  show help

In this subcommand, you can auto-install protoc and protoc-gen-go.

Subcommand: python

$moqsien> g python help

NAME:
   g.exe python - Python version management.

USAGE:
   g.exe python command [command options] [arguments...]

COMMANDS:
   remote, r           Show remote versions.
   use, u              Download and use a version.
   local, l            Show installed versions.
   remove-version, rm  Remove a version.
   update, up          Install or update pyenv.
   path, pth           Show pyenv versions path.
   help, h             Shows a list of commands or help for one command

OPTIONS:
   --help, -h  show help

This subcommand benifits a lot from pyenv/pyenv-win.

Subcommand: java

$moqsien> g java help

NAME:
   g.exe java - Java jdk version management.

USAGE:
   g.exe java command [command options] [arguments...]

COMMANDS:
   use, u                  Download and use jdk. <Command> {gvc jdk use [-z] xxx}
   remote, r               Show available versions.  <Command> {gvc jdk remote [-z]}
   local, l                Show installed versions.
   remove, rm              Remove an installed version.
   remove-unused, rmu, ru  Remove unused versions.
   help, h                 Shows a list of commands or help for one command

OPTIONS:
   --help, -h  show help

In this subcommand, the option "-z" if for users in China.

Subcommand: cpp

$moqsien> g cpp help

NAME:
   g.exe cpp - C/C++ management.

USAGE:
   g.exe cpp command [command options] [arguments...]

COMMANDS:
   install-msys2, insm, im                Install the latest msys2.
   uninstall-msys2, unim, um, remove, rm  Uninstall msys2.
   install-cygwin, insc, ic               Install Cygwin.
   install-vcpkg, insv, iv                Install vcpkg.
   help, h                                Shows a list of commands or help for one command

OPTIONS:
   --help, -h  show help

This subcommand is for Windows users. It will install Msys2 or Cygwin, just to your preference. You can also install the Cpp-package-manager vcpkg maintained by Microsoft.

Subcommand: vlang

$moqsien> g vlang help

NAME:
   g.exe vlang - Vlang installation.

USAGE:
   g.exe vlang command [command options] [arguments...]

COMMANDS:
   install, ins, i             Install Vlang.
   install-analyzer, insa, ia  Install v-analyzer and related extension for vscode.
   setenv, env, se, e          Set env for Vlang.
   help, h                     Shows a list of commands or help for one command

OPTIONS:
   --help, -h  show help

Vlang is a fantastic new language with high performance. This subcommand will install or update to the latest version of Vlang. You can also install v-analyser, which brings vlang the code completion/IntelliSense/go to definition features for VSCode and other editors. If you have VSCode installed, this subcommand will automatically install related extensions and config the settings for you.

Subcommand: vscode

$moqsien> g vscode help

NAME:
   g.exe vscode - VSCode and extensions installation.

USAGE:
   g.exe vscode command [command options] [arguments...]

COMMANDS:
   install, i, ins                    Automatically install vscode.
   install-extensions, ie, iext       Automatically install extensions for vscode.
   use-msys2-cygwin-git, use-git, ug  Repair and make use of git.exe from Msys2/Cygwin.
   help, h                            Shows a list of commands or help for one command

OPTIONS:
   --help, -h  show help

This subcommand will install VSCode for you. You can also install extensions using the extension-info-files saved to WebDAV by GVC. An adapter for git tools in Msys2/Cygwin to VSCode usage is available in this subcommand. You can easily make use of the git tool from either Msys2 or Cygwin in VSCode.

Subcommand: hosts

$moqsien> g hosts help

NAME:
   g.exe hosts - Sytem hosts file management(need admistrator or root).

USAGE:
   g.exe hosts command [command options] [arguments...]

COMMANDS:
   fetch, f  Fetch github hosts info.
   show, s   Show hosts file path.
   help, h   Shows a list of commands or help for one command

OPTIONS:
   --help, -h  show help

This subcommand will automatically update the hosts file. Main purpose of this subcommand is to speedup visits to github, microsoft, steam, etc.

Subcommand: github

$moqsien> g github help

NAME:
   g.exe github - Github download speedup.

USAGE:
   g.exe github command [command options] [arguments...]

COMMANDS:
   download, dl, d        Download files from github project.
   openbrowser, open, ob  Open acceleration website in browser.
   help, h                Shows a list of commands or help for one command

OPTIONS:
   --help, -h  show help

This subcommand speedups github downloadings in China.

Subcommand: browser

$moqsien> g browser help

NAME:
   g.exe browser - Browser data management.

USAGE:
   g.exe browser command [command options] [arguments...]

COMMANDS:
   show-info, show, sh  Show supported browsers and data restore dir.
   push, psh, pu        Push browser Bookmarks/Password/ExtensionInfo to webdav.
   save, sa, s          Save browser Bookmarks/Password/ExtensionInfo to local dir.
   pull, pul, pl        Pull browser data from webdav to local dir.
   help, h              Shows a list of commands or help for one command

OPTIONS:
   --help, -h  show help

This subcommand handles browser data, save data to WebDAV.

Subcommand: asciinema

$moqsien> g asciinema help

NAME:
   g.exe asciinema - Asciinema terminal recorder.

USAGE:
   g.exe asciinema command [command options] [arguments...]

COMMANDS:
   record, rec, r  Record terminal operations.
   play, pl, p     Play local asciinema file.
   auth, au, a     Bind local install-id to your asciinem.org account.
   upload, up, u   Upload local asciinema file to asciinema.org.
   help, h         Shows a list of commands or help for one command

OPTIONS:
   --help, -h  show help

This subcommand provides terminal recording features for both Powershell and Unix-Like Shells.

Subcommand: cloc

$moqsien> g cloc help

NAME:
   g.exe cloc - Count lines of code.

USAGE:
   g.exe cloc [command options] [arguments...]

OPTIONS:
   --by-file, --bf                                    Report results for every encountered source file. (default: false)
   --debug, --de, -d                                  Dump debug log for developer. (default: false)
   --skip-duplicated, --skipdup, --sd                 Skip duplicated files. (default: false)
   --show-lang, --shlang, --sl                        Print about all languages and extensions. (default: false)
   --sort-tag value, --sort value, --st value         Sort based on a certain column["name", "files", "blank", "comment", "code"]. (default: "name")
   --output-type value, --output value, --ot value    Output type [values: default,cloc-xml,sloccount,json]. (default: "default")
   --exclude-ext value, --excl value, --ee value      Exclude file name extensions (separated commas).
   --include-lang value, --langs value, --il value    Include language name (separated commas).
   --match value, --mat value, -m value               Include file name (regex).
   --not-match value, --nmat value, --nm value        Exclude file name (regex).
   --match-dir value, --matd value, --md value        Include dir name (regex).
   --not-match-dir value, --nmatd value, --nmd value  Exclude dir name (regex).
   --help, -h                                         show help

This subcommand provides CLOC(Count Lines of Code) features.

Subcommand: config

$moqsien> g config help

NAME:
   g.exe config - Config file management for gvc.

USAGE:
   g.exe config command [command options] [arguments...]

COMMANDS:
   webdav, dav, w  Setup webdav account info.
   pull, pl        Pull settings from remote webdav and apply them to applications.
   push, ph        Gather settings from applications and sync them to remote webdav.
   reset, rs, r    Reset the gvc config file to default values.
   help, h         Shows a list of commands or help for one command

OPTIONS:
   --help, -h  show help

The subcommand webdav will interactively direct you to configure your WebDAV Account info and secrets for encrytion of browser data. The subcommand push and pull will interact with remote WebDAV. The subcommand reset will reset gvc-config-files to default values.

Subcommand: neobox-shell

PS C:\Users\moqsien> g neobox-shell help
NAME:
   g.exe neobox-shell - Start a neobox shell.

USAGE:
   g.exe neobox-shell [command options] [arguments...]

OPTIONS:
   --help, -h  show help

This subcommand will start the neobox-shell. neobox provides some available free VPNs for user.

Supported command in neobox-shell

>>> help

Commands:
  add            Add proxies to neobox mannually.
  cfips          download/update valid cloudflare ips.
  clear          clear the screen
  exit           exit the program
  export         Export vpn history list.
  filter         Filter vpns by verifier.
  gc             Start GC manually.
  geoinfo        Install/Update geoip&geosite for sing-box.
  help           display help
  parse          Parse raw proxy URIs to human readable ones.
  pingunix       Setup ping without root for Unix-like OS.
  restart        Restart the running sing-box client with a chosen vpn. [restart vpn_index]
  setkey         Setup rawlist encrytion key for neobox. [With no args will set key to default value]
  show           Show neobox info.
  start          Start an sing-box client/keeper.
  stop           Stop the running sing-box client/keeper.
  system         enable current vpn as system proxy. [disable when an arg is provided]
  wireguard      register wireguard account and update licenseKey to warp plus [if a licenseKey is specified].

Note: You should read docs(in Chinese) for neobox, for details, see neobox.


special statement

gvc provides no paid services, so, users should make use of it within the limits permitted by law in his/her country.


Demo

  • gvc installation asciicast

  • go version management. asciicast

  • neobox free vpns. asciicast

  • vscode installation, and vscode extensions installation asciicast

thanks to


buy me a coffee

wechat alipay

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.