homepage: https://github.com/sharkdp/bat
tagline: |
bat: A cat(1) clone with syntax highlighting and Git integration.
-description: |
- `bat` is pretty much what `cat` would be if it were developed today's in the world of Markdown, git, etc.
---
+## Updating `bat`
+
+```bash
+webi bat@stable
+```
+
+Use the `@beta` tag for pre-releases.
+
+## Cheat Sheet
+
+> `bat` is pretty much what `cat` would be if it were developed today's in the
+> world of Markdown, git, etc.
+
### How to run on Windows 10
On Windows 10 you'll get an error like this:
--- /dev/null
+---
+title: Homebrew
+homepage: https://brew.sh
+tagline: |
+ Brew: The Missing Package Manager for macOS (and Linux).
+---
+
+## Updating `brew`
+
+`brew` has its own built-in upgrade management.
+
+```bash
+brew update
+brew upgrade
+```
+
+## Cheat Sheet
+
+> Homebrew installs the stuff you need that Apple (or your Linux system) didn’t.
+
+### How to install CLI packages
+
+```bash
+brew update
+brew install node
+```
+
+### How to install GUI packages
+
+```bash
+brew update
+brew cask install docker
+```
+
+### Where are things installed?
+
+```bash
+/usr/local/Cellar/
+/opt/homebrew-cask/Caskroom/
+```
#!/bin/bash
-# title: Homebrew
-# homepage: https://brew.sh
-# tagline: |
-# Brew: The Missing Package Manager for macOS (and Linux).
-# description: |
-# Homebrew installs the stuff you need that Apple (or your Linux system) didn’t.
-# examples: |
-# ```bash
-# brew install node
-# ```
-
# Straight from https://brew.sh
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
homepage: https://github.com/caddyserver/caddy
tagline: |
Caddy is a fast, multi-platform web server with automatic HTTPS.
-description: |
- Caddy makes it easy to use Let's Encrypt to handle HTTPS (TLS/SSL) and to reverse proxy APIs and WebSockets to other apps - such as those written node, Go, python, ruby, and PHP.
---
+## Updating `caddy`
+
+```bash
+webi caddy@stable
+```
+
+Use the `@beta` tag for pre-releases, or `@x.y.z` for a specific version.
+
+## Cheat Sheet
+
+> Caddy makes it easy to use Let's Encrypt to handle HTTPS (TLS/SSL) and to
+> reverse proxy APIs and WebSockets to other apps - such as those written node,
+> Go, python, ruby, and PHP.
+
+### How to serve a directory
+
+```bash
+caddy file-server --browse --listen :4040
+```
+
+### How to redirect and reverse proxy
+
+Here's what a fairly basic `Caddyfile` looks like:
+
+```txt
+# redirect www to bare domain
+www.example.com {
+ redir https://example.com{uri} permanent
+}
+
+example.com {
+ # turn on standard streaming compression
+ encode gzip zstd
+
+ # reverse proxy /api to :3000
+ reverse_proxy /api/* localhost:3000
+
+ # serve static files from public folder, but not /api
+ @notApi {
+ file {
+ try_files {path} {path}/ /index.html
+ }
+ not path /api/*
+ }
+ route {
+ rewrite @notApi {http.matchers.file.relative}
+ }
+ root * /srv/example.com/public/
+ file_server
+}
+```
+
+And here's how you run caddy with it:
+
```bash
-caddy start
+caddy run --config ./Caddyfile
```
homepage: https://github.com/denoland/deno
tagline: |
Deno: A secure runtime for JavaScript and TypeScript.
-description: |
- Deno proves that lightning does strike twice. It's the ease of use of node, the intentional tooling of Go, and built in Rust.
---
+## Updating `deno`
+
+```bash
+webi deno@stable
+```
+
+Use the `@beta` tag for pre-releases, or `@x.y.z` for a specific version.
+
+## Cheat Sheet
+
+> Deno proves that lightning does strike twice. It's the ease of use of node,
+> the intentional tooling of Go, and built in Rust.
+
+### Hello World
+
The obligatory Hello World
```bash
--- /dev/null
+---
+title: Flutter
+homepage: https://flutter.dev
+tagline: |
+ Flutter is a UI Toolkit for mobile, web, and desktop.
+---
+
+## Updating `flutter`
+
+```bash
+webi flutter@stable
+```
+
+Use `@lts` for long-term support and the `@beta` and `@alpha` tags for
+pre-releases and dev releases, or `@x.y.z` for a specific version.
+
+## Cheat Sheet
+
+> Flutter is Google’s UI toolkit for building beautiful, natively compiled
+> applications for mobile, web, and desktop from a single codebase.
+
+### How to create a new app
+
+```bash
+flutter create my_app
+```
+++ /dev/null
-# title: Flutter
-# homepage: https://flutter.dev
-# tagline: |
-# Flutter is a UI Toolkit for mobile, web, and desktop.
-# description: |
-# Flutter is Google’s UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop from a single codebase.
-# examples: |
-#
-# ```bash
-# flutter create my_app
-# ```
-
-END
homepage: https://git-scm.com
tagline: |
git: --fast-version-control
-description: |
- > Git is a fast, scalable, distributed revision control system with an
- > unusually rich command set that provides both high-level operations and full
- > access to internals.
---
+## Updating `git`
+
+```bash
+webi git@stable
+```
+
+## Cheat Sheet
+
+> Git is a fast, scalable, distributed revision control system with an unusually
+> rich command set that provides both high-level operations and full access to
+> internals.
+
Github's [Git 'Hello World'](https://guides.github.com/activities/hello-world/)
is a good place to get started if you're new to git.
--- /dev/null
+---
+title: Gitea
+homepage: https://github.com/go-gitea/gitea
+tagline: |
+ Gitea: Git with a cup of tea, painless self-hosted git service.
+---
+
+## Updating `gitea`
+
+```bash
+webi gitea@stable
+```
+
+Use the `@beta` tag for pre-releases, or `@x.y.z` for a specific version.
+
+## Cheat Sheet
+
+> Gitea is a clean, lightweight self-hosted Github clone. It only uses a few
+> megabytes of RAM so it's perfect for hosting git on small VPSes and Raspberry
+> Pis. It's forked from Gogs, and very familiar user-friendly for Github users
+> in comparison to Gitlab or Bitbucket.
+
+### How to run `gitea`
+
+```bash
+gitea web --config ~/.local/opt/gitea/custom/conf/app.ini
+```
+
+Note: `gitea` does NOT respect the _current working directory_ - the `./custom/`
+folder must always exist in the location of the binary, which will be
+`~/.local/opt/gitea/`.
+++ /dev/null
-# title: Gitea
-# homepage: https://github.com/go-gitea/gitea
-# tagline: |
-# Gitea: Git with a cup of tea, painless self-hosted git service.
-# description: |
-# Gitea is a clean, lightweight self-hosted Github clone. It only uses a few megabytes of RAM so it's perfect for hosting git on small VPSes and Raspberry Pis. It's forked from Gogs, and very familiar user-friendly for Github users in comparison to Gitlab or Bitbucket.
-# examples: |
-# ```bash
-# gitea web --config $HOME/srv/git.example.com/custom/conf/app.ini
-# ```
-
-END
--- /dev/null
+---
+title: Go
+homepage: https://golang.org
+tagline: |
+ Go makes it easy to build simple, reliable, and efficient software.
+---
+
+## Updating `go`
+
+```bash
+webi golang@stable
+```
+
+Use the `@beta` tag for pre-releases, or `@x.y.z` for a specific version.
+
+## Cheat Sheet
+
+> Go is designed, through and through, to make Software Engineering easy. It's
+> fast, efficient, reliably, and something you can learn in a weekend. If you
+> subscribe to [_The Zen of Python_](https://www.python.org/dev/peps/pep-0020/),
+> you'll [love](https://go-proverbs.github.io/) >
+> [Go](https://www.youtube.com/watch?v=PAAkCSZUG1c).
+
+### Hello World
+
+```bash
+mkdir -p hello/
+pushd hello/
+```
+
+```bash
+cat << EOF >> main.go
+package main
+
+import (
+ "fmt"
+)
+
+func main () {
+ fmt.Println("Hello, World!")
+}
+EOF
+```
+
+```bash
+go fmt ./...
+go build .
+./hello
+> Hello, World!
+```
+++ /dev/null
-# title: Go
-# homepage: https://golang.org
-# tagline: |
-# Go makes it easy to build simple, reliable, and efficient software.
-# description: |
-# Go is designed, through and through, to make Software Engineering easy. It's fast, efficient, reliably, and something you can learn in a weekend. If you subscribe to [_The Zen of Python_](https://www.python.org/dev/peps/pep-0020/), you'll [love](https://go-proverbs.github.io/) [Go](https://www.youtube.com/watch?v=PAAkCSZUG1c).
-# examples: |
-# ```bash
-# mkdir -p hello/
-# pushd hello/
-# ```
-#
-# ```bash
-# cat << EOF >> main.go
-# package main
-#
-# import (
-# "fmt"
-# )
-#
-# func main () {
-# fmt.Println("Hello, World!")
-# }
-# EOF
-# ```
-#
-# ```bash
-# go fmt ./...
-# go build .
-# ./hello
-# > Hello, World!
-# ```
-
-END
--- /dev/null
+---
+title: Hugo
+homepage: https://github.com/gohugoio/hugo
+tagline: |
+ Hugo: The world’s fastest framework for building websites.
+---
+
+## Updating `hugo`
+
+```bash
+webi hugo@stable
+```
+
+Use the `@beta` tag for pre-releases.
+
+## Cheat Sheet
+
+> Hugo is one of the most popular open-source static site generators. It makes
+> building websites fun again.
+
+### Create a new site
+
+```bash
+# create a new site
+hugo new site ./blog.example.com
+```
+
+```bash
+# compile a site
+hugo
+```
+
+```bash
+# serve a site in dev mode
+hugo server -D
+```
+++ /dev/null
-# title: Hugo
-# homepage: https://github.com/gohugoio/hugo
-# tagline: |
-# Hugo: The world’s fastest framework for building websites.
-# description: |
-# Hugo is one of the most popular open-source static site generators. It makes building websites fun again.
-# examples: |
-# ```bash
-# # create a new site
-# hugo new site ./blog.example.com
-# ```
-#
-# ```bash
-# # compile a site
-# hugo
-# ```
-#
-# ```bash
-# # serve a site in dev mode
-# hugo server -D
-# ```
-
-END
homepage: https://stedolan.github.io/jq/
tagline: |
jq is a lightweight and flexible command-line JSON processor.
-description: |
- `jq` is like `sed` for JSON data - you can use it to slice and filter and map and transform structured data with the same ease that `sed`, `awk`, `grep` and friends let you play with text.
---
+## Updating `jq`
+
+```bash
+webi jq@stable
+```
+
+Use the `@beta` tag for pre-releases.
+
+## Cheat Sheet
+
+> `jq` is like `sed` for JSON data - you can use it to slice and filter and map
+> and transform structured data with the same ease that `sed`, `awk`, `grep` and
+> friends let you play with text.
+
All jq selectors begin with `.` - don't forget that!
Be sure to checkout the
--- /dev/null
+---
+title: macOS
+homepage: https://bootableinstaller.com/macos/
+tagline: |
+ Creates a bootable macOS installer ISO in ~/Downloads.
+---
+
+## Cheat Sheet
+
+> Downloads the official OS X / macOS dmg from Apple to create bootable
+> installers - works from macOS, Linux, or even Windows (through VirtualBox).
+
+Use with Balena Etcher to burn ISO to USB, or boot with VirtualBox.
+
+```txt
+Created ~/Downloads/el-capitan.iso
+```
-# title: macOS
-# homepage: https://bootableinstaller.com/macos/
-# tagline: |
-# Creates a bootable macOS installer ISO in ~/Downloads.
-# description: |
-# Downloads the official OS X / macOS dmg from Apple to create bootable installers - works from macOS, Linux, or even Windows (through VirtualBox).
-# examples: |
-#
-# Use with Balena Etcher to burn ISO to USB, or boot with VirtualBox.
-#
-# ```txt
-# Created ~/Downloads/el-capitan.iso
-# ```
+#!/bin/bash
set -e
set -u
homepage: https://webinstall.dev/myip
tagline: |
My IP answers the question "what's my IP address?"
-description: |
- `myip` will contact ipify.org to tell you your IP addresses:
-
- 1. `api.ipify.org` for your IPv4 or A address
- 2. `api6.ipify.org` for your IPv6 or AAAA address
---
+## Updating `myip`
+
+```bash
+webi myip
+```
+
+## Cheat Sheet
+
+`myip` will contact ipify.org to tell you your IP addresses:
+
+1. `api.ipify.org` for your IPv4 or A address
+2. `api6.ipify.org` for your IPv6 or AAAA address
+
Example output:
```txt
homepage: https://nodejs.org
tagline: |
Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
-description: |
- Node is great for simple, snappy HTTP(S) servers, and for stitching APIs together with minimal fuss or muss.
-
- Installing node via webi will:
-
- - pick a compatible version from the [Node Releases API](https://nodejs.org/dist/index.tab)
- - download and unpack to `$HOME/.local/opt/node/`
- - update your `PATH` in `$HOME/.config/envman/PATH.env`
- - run `npm config set scripts-prepend-node-path=true`
- - (prevents conflicts with other installed node versions)
- - absolutely leave system file permisions alone
- - (no dreaded `sudo npm` permission errors)
---
-Hello World
+## Updating `node`
+
+```bash
+webi node@stable
+```
+
+Use `@lts` for long-term support and the `@beta` tag for pre-releases, or
+`@x.y.z` for a specific version.
+
+## Cheat Sheet
+
+Node is great for simple, snappy HTTP(S) servers, and for stitching APIs
+together with minimal fuss or muss.
+
+Installing node via webi will:
+
+- pick a compatible version from the
+ [Node Releases API](https://nodejs.org/dist/index.tab)
+- download and unpack to `$HOME/.local/opt/node/`
+- update your `PATH` in `$HOME/.config/envman/PATH.env`
+- run `npm config set scripts-prepend-node-path=true`
+ - (prevents conflicts with other installed node versions)
+- absolutely leave system file permisions alone
+ - (no dreaded `sudo npm` permission errors)
+
+### Hello World
```bash
node -e 'console.log("Hello, World!")'
> Hello, World!
```
-A Simple Web Server
+### A Simple Web Server
`server.js`:
node server.js
```
-An Express App
+### An Express App
```bash
mkdir my-server
var app = express();
app.use('/', function (req, res, next) {
- res.end("Hello, World!");
+ res.end('Hello, World!');
});
module.exports = app;
homepage: https://git.rootprojects.org/root/pathman
tagline: |
Pathman: cross-platform PATH management for bash, zsh, fish, cmd.exe, and PowerShell.
-description: |
- Manages PATH on various OSes and shells
- - Mac, Windows, Linux
- - Bash, Zsh, Fish
- - Command, Powershell
---
+## Updating `pathman`
+
+```bash
+webi pathman
+```
+
+## Cheat Sheet
+
+Manages PATH on various OSes and shells
+
+- Mac, Windows, Linux
+- Bash, Zsh, Fish
+- Command, Powershell
+
+```bash
+pathman help
+```
+
+### Usage
+
```bash
pathman add ~/.local/bin
```
pathman remove ~/.local/bin
```
+Note: Even on Windows 10 it is best to use Unix-style `/` paths and `~` for
+`%USERPROFILE%`.
+
```bash
pathman list
```
+
+```txt
+pathman-managed PATH entries:
+
+ $HOME/.local/bin
+ $HOME/.local/opt/go/bin
+ $HOME/go/bin
+ $HOME/.local/opt/node/bin
+
+other PATH entries:
+
+ /usr/local/bin
+ /usr/bin
+ /bin
+ /usr/sbin
+ /sbin
+```
--- /dev/null
+---
+title: Postgres
+homepage: https://www.postgresql.org/
+tagline: |
+ PostgreSQL: The World's Most Advanced Open Source Relational Database.
+---
+
+## Updating `postgres`
+
+```bash
+webi postgres@stable
+```
+
+Use `@x.y.z` for a specific version.
+
+## Cheat Sheet
+
+> Postgres is the all-in-one database for beginners and experts alike. It
+> handles SQL, 'NoSQL', JSON, HSTORE, Full-Text Search, Messages Queues and
+> more. Best bang for buck.
+
+### Initialize a database with a password
+
+```bash
+echo "postgres" > /tmp/pwfile
+mkdir -p $HOME/.local/share/postgres/var/
+
+initdb -D $HOME/.local/share/postgres/var/ \
+ --username postgres --pwfile "/tmp/pwfile" \
+ --auth-local=password --auth-host=password
+
+rm /tmp/pwfile
+```
+
+### Start the postgres server
+
+```bash
+postgres -D $HOME/.local/share/var/postgres -p 5432
+```
+
+### Connect with the psql client
+
+```bash
+psql 'postgres://postgres:postgres@localhost:5432/postgres'
+```
+++ /dev/null
-# title: Postgres
-# homepage: https://www.postgresql.org/
-# tagline: |
-# PostgreSQL: The World's Most Advanced Open Source Relational Database.
-# description: |
-# Postgres is the all-in-one database for beginners and experts alike. It handles SQL, 'NoSQL', JSON, HSTORE, Full-Text Search, Messages Queues and more. Best bang for buck.
-# examples: |
-#
-# Initialize a database with a password
-#
-# ```bash
-# echo "postgres" > /tmp/pwfile
-# mkdir -p $HOME/.local/share/postgres/var/
-#
-# initdb -D $HOME/.local/share/postgres/var/ \
-# --username postgres --pwfile "/tmp/pwfile" \
-# --auth-local=password --auth-host=password
-#
-# rm /tmp/pwfile
-# ```
-#
-# Start the postgres server
-#
-# ```bash
-# postgres -D $HOME/.local/share/var/postgres -p 5432
-# ```
-#
-# Connect with the psql client
-#
-# ```bash
-# psql 'postgres://postgres:postgres@localhost:5432/postgres'
-# ```
-#
-
-END
homepage: https://docs.microsoft.com/en-us/powershell/
tagline: |
PowerShell Core is a cross-platform (Windows, Linux, and macOS) automation and configuration tool/framework.
-description: |
- The core benefit of running `pwsh` on Mac or Linux is that you get a way to debug Windows 10 scripts without having to boot up Windows 10.
-
- For example, if you want to create a `curl.exe -A "windows" | powershell` script for Windows 10 (as we do), it's helpful to be able to do some level of debugging on other platforms.
---
+> The core benefit of running `pwsh` on Mac or Linux is that you get a way to
+> debug Windows 10 scripts without having to boot up Windows 10.
+
+For example, if you want to create a `curl.exe -A "windows" | powershell` script
+for Windows 10 (as we do), it's helpful to be able to do some level of debugging
+on other platforms.
+
<!--
For example, if you wanted to install Node.js with powershell and
webinstall.dev, you can:
--- /dev/null
+---
+title: Prettier
+homepage: https://prettier.io/
+tagline: |
+ Prettier is an opinionated code formatter.
+---
+
+## Updating `prettier`
+
+```bash
+npm install -g prettier@latest
+```
+
+## Cheat Sheet
+
+> The core value of Prettier is not in what it gives, but in what it takes away:
+> countless hours of bikeshedding over code style choices. Also, it makes git
+> merges much nicer.
+
+Prettify all web files in a project, recursively:
+
+```bash
+prettier --write '**/*{.md,.js,.html,.css}' --ignore ./dist
+```
+
+Tell Prettier which files to ignore every time
+
+```bash
+echo "./dist" >> .prettierignore
+```
+
+Tell Prettier which settings to use - do NOT use `package.json` when it's not
+necessary!
+
+**`.prettierrc`**:
+
+```bash
+{
+ "trailingComma": "none",
+ "tabWidth": 2,
+ "singleQuote": true,
+ "proseWrap": "always"
+}
+```
-# title: Prettier
-# homepage: https://prettier.io/
-# tagline: |
-# Prettier is an opinionated code formatter.
-# description: |
-# The core value of Prettier is not in what it gives, but in what it takes away: countless hours of bikeshedding over code style choices. Also, it makes git merges much nicer.
-# examples: |
-# Prettify all web files in a project, recursively:
-#
-# ```bash
-# prettier --write '**/*{.md,.js,.html,.css}' --ignore ./dist
-# ```
-#
-# Tell Prettier which files to ignore every time
-#
-# ```bash
-# echo "./dist" >> .prettierignore
-# ```
-#
-# Tell Prettier which settings to use - do NOT use `package.json` when it's not necessary!
-#
-# **`.prettierrc`**:
-#
-# ```bash
-# {
-# "trailingComma": "none",
-# "tabWidth": 2,
-# "singleQuote": true,
-# "proseWrap": "always"
-# }
-# ```
-#
+#!/bin/bash
if [ -z "$(npm --version 2>/dev/null)" ]; then
webi node
--- /dev/null
+---
+title: Ripgrep
+homepage: https://github.com/BurntSushi/ripgrep
+tagline: |
+ Ripgrep is a git and sourcecode-aware drop-in grep replacement.
+---
+
+## Updating `rg`
+
+```bash
+webi rg@stable
+```
+
+Use the `@beta` tag for pre-releases.
+
+## Cheat Sheet
+
+> Ripgrep (`rg`) is smart. It's like grep if grep were built for code. It
+> respects `.gitignore` and `.ignore`, has all of the sensible options you want
+> (colors, numbers, etc) turned on by default, is written in Rust, and simply
+> outperforms grep in every imaginable way. R.I.P. grep.
+
+```bash
+rg <search-term> # searches recursively, ignoring .git, node_modules, etc
+```
+
+```bash
+rg 'function doStuff'
+```
+
+```bash
+rg 'doStuff\(.*\)'
+```
+++ /dev/null
-# title: Ripgrep
-# homepage: https://github.com/BurntSushi/ripgrep
-# tagline: |
-# Ripgrep is a git and sourcecode-aware drop-in grep replacement.
-# description: |
-# Ripgrep (`rg`) is smart. It's like grep if grep were built for code. It respects `.gitignore` and `.ignore`, has all of the sensible options you want (colors, numbers, etc) turned on by default, is written in Rust, and simply outperforms grep in every imaginable way. R.I.P. grep.
-# examples: |
-#
-# ```bash
-# rg <search-term> # searches recursively, ignoring .git, node_modules, etc
-# ```
-#
-# ```bash
-# rg 'function doStuff'
-# ```
-#
-# ```bash
-# rg 'doStuff\(.*\)'
-# ```
-
-END
--- /dev/null
+---
+title: Rust
+homepage: https://rust-lang.org
+tagline: |
+ Rust: Empowering everyone to build reliable and efficient software.
+---
+
+## Updating rustlang
+
+```bash
+rustup update
+```
+
+You can `rustup use x.y.z` for a specific version or toolchain.
+
+## Cheat Sheet
+
+> Rust is what C++ and D were trying to do, but didn't. It's a modern, safe,
+> high-performance language, which also just so happens to be used to build all
+> of your favorite CLI tools, such as:
+
+- rg (ripgrep, modern grep)
+- fd (modern find)
+- sd (modern sed)
+- lsd (modern ls)
+- bat (modern cat)
+
+### Install rust from rust.rs
+
+```bash
+curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
+```
+
+### Hello World
+
+```bash
+cargo install ripgrep
+```
+
+```bash
+cargo new hello --bin
+cargo build --release
+./hello
+> "Hello, world!"
+```
#!/bin/bash
-# title: Rust
-# homepage: https://rust-lang.org
-# tagline: |
-# Rust: Empowering everyone to build reliable and efficient software.
-# description: |
-# Rust is what C++ and D were trying to do, but didn't. It's a modern, safe, high-performance language, which also just so happens to be used to build all of your favorite CLI tools, such as:
-# - rg (ripgrep, modern grep)
-# - fd (modern find)
-# - sd (modern sed)
-# - lsd (modern ls)
-# - bat (modern cat)
-# examples: |
-# ```bash
-# cargo install ripgrep
-# ```
-# <br/>
-#
-# ```bash
-# cargo new hello --bin
-# cargo build --release
-# ./hello
-# > "Hello, world!"
-# ```
-
-
# Straight from https://rustup.rs/
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
homepage: https://git.rootprojects.org/root/serviceman
tagline: |
Serviceman: cross-platform service management for Linux, Mac, and Windows.
-description: |
- Serviceman is a hassle-free wrapper around your system launcher. It works with the default system launcher to make it easy to start _user_- and _system_-level services, such as webservers, backup scripts, network and system tools, etc.
-
- Supports
- - `launchctl` (macOS)
- - `systemctl` (Linux)
- - The Registry (Windows)
---
+## Updating `serviceman`
+
+```bash
+webi serviceman@stable
+```
+
+## Cheat Sheet
+
+> Serviceman is a hassle-free wrapper around your system launcher. It works with
+> the default system launcher to make it easy to start _user_- and
+> _system_-level services, such as webservers, backup scripts, network and
+> system tools, etc.
+
+Supports
+
+- `launchctl` (macOS)
+- `systemctl` (Linux)
+- The Registry (Windows)
+
Serviceman can run an app in just about any programming language very simply.
If you'd like to learn what `serviceman` does without actually making changes,
add the `--dryrun` option.
-### Node.js
+### Example: Bash
+
+```bash
+sudo env PATH="$PATH" serviceman add bash ./backup.sh /mnt/data
+```
+
+### Example: Node.js
**Development Server**
npm start
```
-### Golang
+### Example: Golang
```bash
pushd ./my-go-package/
./my-service --port 80
```
-### And even bash!
-
-```bash
-sudo env PATH="$PATH" serviceman add bash ./backup.sh /mnt/data
-```
-
### How to see all services
```bash
tagline: |
SSH adduser: Because friends don't let friends login or run stuff as root
linux: true
-description: |
- Many modern web programs (`npm` and `postgres`, for example) will not function correctly if run as root.
+---
- `ssh-adduser` will
+## Cheat Sheet
- 1. add the user `app`
- 2. set a random, 32-character password (as a failsafe)
- 3. copy the `root` user's **`~/.ssh/authorized_keys`** (so the same users can still login)
- 4. give the `app` user `sudo` (admin) privileges
- 5. allow `app` to `sudo` without a password
----
+> Many modern web programs (`npm` and `postgres`, for example) will not function
+> correctly if run as root.
+
+`ssh-adduser` will
+
+1. add the user `app`
+2. set a random, 32-character password (as a failsafe)
+3. copy the `root` user's **`~/.ssh/authorized_keys`** (so the same users can
+ still login)
+4. give the `app` user `sudo` (admin) privileges
+5. allow `app` to `sudo` without a password
How to create a new user named 'app':
homepage: https://webinstall.dev/ssh-pubkey
tagline: |
Get your SSH public key.
-description: |
- > Your SSH Public Key is used for secure login from your laptop to servers and
- > other network devices - such as Raspberry Pis, game consoles, and home cloud
- > systems. The file public key _always_ ends in `.pub`.
+---
- `ssh-pubkey` will:
+## Cheat Sheet
- 1. Create a new ssh keypair if you don’t already have one
- 2. Copy your new or existing SSH Public Key to your `Downloads` folder
- 3. Print the location of the copied key, and its contents to the screen
----
+> Your SSH Public Key is used for secure login from your laptop to servers and
+> other network devices - such as Raspberry Pis, game consoles, and home cloud
+> systems. The file public key _always_ ends in `.pub`.
+
+`ssh-pubkey` will:
+
+1. Create a new ssh keypair if you don’t already have one
+2. Copy your new or existing SSH Public Key to your `Downloads` folder
+3. Print the location of the copied key, and its contents to the screen
The easiest way to get your SSH Public Key:
tagline: |
Set a new passphrase on your SSH Private Key.
linux: true
-description: |
- `ssh-setpass` will ask you for your old passphrase and then for the new one to reset it with.
---
+
+## Cheat Sheet
+
+> `ssh-setpass` will ask you for your old passphrase and then for the new one to
+> reset it with.
+
+```bash
+ssh-setpass
+```
homepage: https://webinstall.dev/ssh-utils
tagline: |
SSH Utils: Because --help takes to long.
-description: |
- SSH Utils includes shortcut commands for some common tasks, including `ssh-pubkey`, `ssh-setpass`, and `ssh-adduser`
---
+## Cheat Sheet
+
+> SSH Utils includes shortcut commands for some common tasks, including
+> `ssh-pubkey`, `ssh-setpass`, and `ssh-adduser`
+
**ssh-pubkey**:
`ssh-pubkey` will make sure you have an SSH key, and then print it to the screen
homepage: https://github.com/fatih/vim-go
tagline: |
vim-go adds Go language support for Vim.
-description: |
- `vim-go` provides integration with various official and 3rd part go tooling for linting, vetting, etc.
-
- You'll also need `ALE`, `syntastic`, or similar.
---
+## Updating `vim-go`
+
+```bash
+webi vim-go
+```
+
+## Cheat Sheet
+
+> `vim-go` provides integration with various official and 3rd part go tooling
+> for linting, vetting, etc.
+
+You'll also need `ALE`, `syntastic`, or similar.
+
### How to install by hand
```bash
--- /dev/null
+---
+title: vim-sensible
+homepage: https://github.com/tpope/vim-sensible
+tagline: |
+ Vim Sensible: sensible defaults for vim
+---
+
+## Updating `vim-sensible`
+
+```bash
+webi vim-sensible
+```
+
+## Cheat Sheet
+
+> Think of sensible.vim as one step above 'nocompatible' mode: a universal set
+> of defaults that (hopefully) everyone can agree on.
+
+Installs to `$HOME/.vim/pack/plugins/start`.
+
+It just works.
#!/bin/bash
-# title: vim-sensible
-# homepage: https://github.com/tpope/vim-sensible
-# tagline: |
-# Vim Sensible: sensible defaults for vim
-# description: |
-# Think of sensible.vim as one step above 'nocompatible' mode: a universal set of defaults that (hopefully) everyone can agree on.
-# examples: |
-#
-# Installs to `$HOME/.vim/pack/plugins/start`.
-# It just works.
-#
-
{
set -e
set -u
homepage: https://github.com/vim-syntastic/syntastic
tagline: |
Syntastic runs files through external syntax checkers and displays any resulting errors to the user.
-description: |
- vim-syntastic has been superseded by [ALE](https://github.com/dense-analysis/ale), but it lives on in my heart, my `.vim`, and my `.vimrc`.
---
+## Updating `vim-syntastic`
+
+```bash
+webi vim-syntastic
+```
+
+## Cheat Sheet
+
+`vim-syntastic` has been superseded by
+[ALE](https://github.com/dense-analysis/ale), but it lives on in my heart, my
+`.vim`, and my `.vimrc`.
+
### How to install manually
```bash
tagline: |
VPS Add Swap: because a little RAM can go a long way.
linux: true
-description: |
- Creates permanent swap space that will be activated on each boot.
+---
- `vps-addswap` will
+## Cheat Sheet
- 1. create a permanent swapfile `/var/swapfile`
- 2. format and activate the swapfile
- 3. add '/var/swapfile none swap sw 0 0' to `/etc/fstab`
----
+> Creates permanent swap space that will be activated on each boot.
+
+`vps-addswap` will
+
+1. create a permanent swapfile `/var/swapfile`
+2. format and activate the swapfile
+3. add '/var/swapfile none swap sw 0 0' to `/etc/fstab`
### What is `swap`?
+++ /dev/null
----
-title: VPS My IP
-homepage: https://webinstall.dev/vps-myip
-tagline: |
- VPS My IP answers the question "what's my IP address?"
-description: |
- `vps-myip` will contact ipify.org to tell you your IP addresses:
-
- 1. `api.ipify.org` for your IPv4 or A address
- 2. `api6.ipify.org` for your IPv6 or AAAA address
----
-
-Example output:
-
-```txt
-IPv4 (A) : 136.36.196.101
-IPv6 (AAAA): 2605:a601:a919:9800:f8be:f2c4:9ad7:9763
-```
-
-### What is an IP address?
-
-An IP or Internet Protocol address is basically the phone number of your
-computer or server.
-
-Whenever you visit a domain - such as https://google.com - the `google.com` part
-is _resolved_ to the IP address using, quite literally, the internet's Contacts
-list, known as DNS.
-
-### How to get your IP address?
-
-Due to how complex networking can be, the most reliable way to get your IP
-address is basically to "make a call" to another server and ask it to tell you
-what shows up on the "called id", as it were.
-
-_IPify_ is such a service.
-
-You likely have an IPv4 or A address as well as an IPv6 or AAAA address.
-
-To find out your IPv4 or A address:
-
-```bash
-curl -s https://api.ipify.org
-```
-
-To find out your IPv6 or AAAA address:
-
-```bash
-curl -s https://api6.ipify.org
-```
-
-To find out either address:
-
-```bash
-curl -s https://api46.ipify.org
-```
-
-You can also use the `ifconfig`, `ip`, or `ipconfig` commands to figure this
-out, but they may give you incorrect information if the network setup is complex
-(as is the case... most of the time - home and business networks, cloud
-networks, etc).
+++ /dev/null
-#!/usr/bin/env pwsh
-
-$ipv4 = curl.exe -sf https://api.ipify.org
-
-IF(!($ipv4 -eq $null -or $ipv4 -eq ""))
-{
- echo "IPv4 (A) : $ipv4"
-}
-
-$ipv6 = curl.exe -sf https://api6.ipify.org
-
-IF(!($ipv6 -eq $null -or $ipv6 -eq ""))
-{
- echo "IPv6 (AAAA): $ipv6"
-}
+++ /dev/null
-#!/bin/bash
-
-{
- set -e
- set -u
-
- ipv4=$(curl -s https://api.ipify.org)
- ipv6=$(curl -s https://api6.ipify.org)
-
- if [ -n "$ipv4" ]; then
- echo "IPv4 (A) : $ipv4"
- fi
-
- if [ -n "$ipv6" ] && [ "ipv6" != "ipv4" ]; then
- echo "IPv6 (AAAA): $ipv6"
- fi
-}
homepage: https://webinstall.dev/vps-utils
tagline: |
VPS Utils make it easy to setup and manage a VPS
-description: |
- VPS Utils includes shortcut commands for some common tasks, including `cap-net-bind`, 'vps-addswap', and 'vps-myip'
---
+## Cheat Sheet
+
+> VPS Utils includes shortcut commands for some common tasks, including
+> `cap-net-bind`, 'vps-addswap', and 'myip'
+
**cap-net-bind**:
`cap-net-bind` will give the specified program the ability to listen on
setcap 'cap_net_bind_service=+ep' $(readlink -f $(which node))
```
-**vps-myip**:
+**myip**:
Will output externally detected IPv4 and IPv6 addresses. See
<https://webinstall.dev/vps-myip>.
```bash
-vps-myip
+myip
```
```txt
--- /dev/null
+---
+title: Webi
+homepage: https://webinstall.dev
+tagline: |
+ Webi is how developers install their tools.
+---
+
+## Updating `webi`
+
+```bash
+webi webi
+```
+
+Since `webi` is just a small helper script, it's always update on each use.
+
+## Cheat Sheet
+
+> `webi` is what you would have created if you automated how you install your
+> common tools yourself: Simple, direct downloads from official sources,
+> unpacked into `$HOME/.local`, added to `PATH`, symlinked for easy version
+> switching, with minimal niceties like resuming downloads and 'stable' tags.
+
+- Easy to remember.
+- No magic, no nonesense, no bulk.
+- What you would have done for yourself.
+
+You can install _exactly_ what you need, from memory, via URL:
+
+```bash
+curl https://webinstall.dev/node@lts | bash
+```
+
+Or via `webi`, the tiny `curl | bash` shortcut command that comes with each
+install:
+
+```bash
+webi node@latest
+```
+
+```bash
+webi golang@v1.14
+```
+
+```bash
+webi rustlang
+```
+
+You can see exactly what PATHs have been edited:
+
+```bash
+pathman list
+```
+
+And where:
+
+```bash
+cat $HOME/.config/envman/PATH.env
+```
+++ /dev/null
-# title: Webi
-# homepage: https://webinstall.dev
-# tagline: |
-# Webi is how developers install their tools.
-# description: |
-# Webi is what you would have created if you automated how you install your common tools yourself: Simple, direct downloads from official sources, unpacked into `$HOME/.local`, added to `PATH`, symlinked for easy version switching, with minimal niceties like resuming downloads and 'stable' tags.
-#
-# - Easy to remember.
-# - No magic, no nonesense, no bulk.
-# - What you would have done for yourself.
-#
-# examples: |
-# You can install _exactly_ what you need, from memory, via URL:
-#
-# ```bash
-# curl https://webinstall.dev/node@lts | bash
-# ```
-#
-# Or via `webi`, the tiny `curl | bash` shortcut command that comes with each install:
-#
-# ```bash
-# webi node@latest
-# ```
-#
-# ```bash
-# webi golang@v1.14
-# ```
-#
-# ```bash
-# webi rustlang
-# ```
-#
-# You can see exactly what PATHs have been edited:
-#
-# ```bash
-# pathman list
-# ```
-#
-# And where:
-#
-# ```bash
-# cat $HOME/.config/envman/PATH.env
-# ```
-#
-
-END