Skip to content

Installation

Ayooluwa Isaiah edited this page Aug 4, 2021 · 27 revisions

F2 is written in Go, so you can install it through go install (requires Go 1.16 or later):

$ go install github.com/ayoisaiah/f2/cmd/f2@latest

You can also install it via npm or yarn:

With npm:

$ npm i @ayoisaiah/f2 -g

With yarn:

$ yarn global add @ayoisaiah/f2

Arch Linux

F2 is available on the Arch User Repository:

$ yay -S f2-bin

Debian / Ubuntu based distributions

Download the appropriate deb file for your system architecture from the releases page:

$ curl -LO https://github.com/ayoisaiah/f2/releases/download/v1.7.0/f2_1.7.0_linux_amd64.deb # 64-bit
$ sudo dpkg -i f2_1.7.0_linux_amd64.deb

Fedora / CentOS

Download the appropriate rpm file for your system architecture from the releases page:

$ curl -LO https://github.com/ayoisaiah/f2/releases/download/v1.7.0/f2_1.7.0_linux_amd64.rpm # 64-bit
$ sudo rpm -i f2_1.7.0_linux_amd64.rpm

Scoop (Windows)

$ scoop bucket add ayoisaiah-scoop-bucket https://github.com/ayoisaiah/scoop-bucket
$ scoop install f2

Download pre-compiled binaries

Pre-compiled binaries for Linux, Windows, and macOS on the releases page. Download the file archive for your operating system and architecture, then copy it to your $PATH:

For Linux:

# download archive
$ curl -LO https://github.com/ayoisaiah/f2/releases/download/v1.7.0/f2_1.7.0_linux_amd64.tar.gz

# extract archive
$ tar -xvzf f2_1.7.0_linux_amd64.tar.gz

# make binary executable
$ chmod +x f2

# move binary to path
$ sudo mv f2 /usr/local/bin

For macOS:

# download archive
$ curl -LO https://github.com/ayoisaiah/f2/releases/download/v1.7.0/f2_1.7.0_darwin_amd64.tar.gz

# extract archive
$ tar -xvzf f2_1.7.0_darwin_amd64.tar.gz

# make binary executable
$ chmod +x f2

# move binary to path
$ sudo mv f2 /usr/local/bin

For Windows:

Learn how to add a directory to your $PATH in Windows here.

# download archive
$ curl.exe -LO https://github.com/ayoisaiah/f2/releases/download/v1.7.0/f2_1.7.0_windows_amd64.tar.gz

# extract archive
$ tar -xvzf f2_1.7.0_windows_amd64.tar.gz

# move binary a directory in your path
$ move f2.exe C:\Users\<user>\.bin

Build from source

  1. Verify that you have Go v1.16 or later installed:
$ go version
go version go1.16 linux/amd64
  1. Clone this repository
$ git clone https://github.com/ayoisaiah/f2
$ cd f2
  1. Build and install binary to $GOBIN
$ go install ./...
  1. Run f2 --version to see if it worked
$ f2 --version
Clone this wiki locally