Link Search Menu Expand Document

Installation

There are many ways to install and use Napkin. This page will help to decide which was is easier and better suited for your need.

Main installation options are:

  • Homebrew on macOS. This is the fastest and easiest way of getting Napkin on macOS.
  • Pre-build binary for Linux and macOS operating systems. This is the fastest and easiest way of getting Napkin on Linux. Just download and unpack – and you are good to go.
  • Docker image with Napkin and various useful utilities. Installation with this method is easy too – pull the image and extract a wrapper script out of it.
  • Cachix distribution for NixOS. If you use NixOS, you are probably familiar with cachix tool. Getting Napkin with cachix is a one-line command.
  • VSCode devcontainer actually uses the same docker image under the hood as Docker installation method but enables code completion and other useful IDE features out-of-the-box. This is the preferred way of installing Napkin.

Native

The Napkin native binary is a self extracting archive with a binary file that does not require a docker or nix environment to be executed.

The latest Linux (x86_64 or arm64) and macOs (universal or intel / apple) versions are continuously updated as being released.

Due to the technical limitations, this version of Napkin does not support some advanced features, but it is perfectly fine to use for basic use-cases.

Please note, that archive contains not only a binary itself, but also a folder with dynamically loaded libraries for the corresponding operating system, which should be located in the following structure. If you need to move napkin binary to the different location, move the whole napkin directory instead.

napkin
├── bin
│   └── napkin
└── lib
    ├── libc++.1.0.dylib
    ├── libc++abi.dylib
    ├── libcharset.1.dylib
    ├── libcom_err.3.0.dylib
    ├── libcrypto.1.1.dylib
    ├── libffi.8.dylib
    ├── libgmp.10.dylib
    ├── libgssapi_krb5.2.2.dylib
    ├── libiconv-nocharset.dylib
    ├── libiconv.dylib
    ├── libk5crypto.3.1.dylib
    ├── libkrb5.3.3.dylib
    ├── libkrb5support.1.1.dylib
    ├── libncursesw.6.dylib
    ├── libpq.5.dylib
    ├── libresolv.9.dylib
    ├── libssl.1.1.dylib
    └── libz.dylib

If you need a specific version of Napkin, use directory browser in these locations:

Unlike tar, system’s un-archiver on macOS adds com.apple.quarantine attribute to all binary files it extracts from the archive. Execute xattr -dr com.apple.quarantine EXTRACTED_FOLDER command before using Napkin to prevent macOS security mechanisms from triggering.

Homebrew

The Napkin native binary can be also installed on macOS with the help of Homebrew package manager. Napkin can be installed by running these commands in the terminal:

shell

brew tap soostone/napkin
brew install napkin --no-quarantine

Due to the technical limitations, this version of Napkin does not support some advanced features, but it is perfectly fine to use for basic use-cases.

Docker

Napkin docker image contains a wrapper script, which is suited for better integration with your host computer while running Napkin (opening browser window, accessing settings, etc.). To install napkin and extract the wrapper script, execute following command:

shell

docker run --rm --pull=always soostone/napkin-exe cat /bin/napkin-docker > ./napkin-docker && chmod +x ./napkin-docker

Extracted ./napkin-docker script can be used the same way as Napkin native binary:

shell

./napkin-docker version
Napkin version: 0.5.10
Git commit hash: b8c0506dde5ed71b415e884f2b735a923a620813
Built at: 2021-12-23 17:01:34.628557302 UTC

If you need to use different version of Napkin, docker has the following naming theme:

  • soostone/napkin-exe:latest - Released latest version (note, that soostone/napkin-exe and soostone/napkin-exe:latest are semantically equivalent).
  • soostone/napkin-exe:v$VERSION - Napkin from $VERSION version (for example, v0.5.9).
  • soostone/napkin-exe:v$VERSION-dev - Latest Napkin build for not yet released $VERSION version.

So this command will download and the v0.5.9 version of Napkin and update the wrapper script in the current folder:

docker run --rm --pull=always soostone/napkin-exe:v0.5.9 cat /bin/napkin-docker > ./napkin-docker && chmod +x ./napkin-docker

Since docker image contains the wrapper script itself, update procedure is trivial, just pull the newer image and extract the script:

shell

docker run --pull=always --rm soostone/napkin-exe cat /bin/napkin-docker > ./napkin-docker && chmod +x ./napkin-docker

Docker manual contains all technical details about using Napkin from docker container.

Cachix

Installation via cachix is intended for NixOS users and consists of the following steps:

  • Install cachix tool by following official instructions (step 2)

shell

nix-env -iA cachix -f https://cachix.org/api/v1/install
  • Install latest version of Napkin

For macOS:

  • intel architecture

shell

sh <(curl -sL https://napkin-public-storage-bucket.s3.us-east-1.amazonaws.com/cachix/darwin-x86_64/branch/master/index.html)
  • apple architecture

shell

sh <(curl -sL https://napkin-public-storage-bucket.s3.us-east-1.amazonaws.com/cachix/darwin-aarch64/branch/master/index.html)

For Linux:

  • x86_64 architecture

shell

sh <(curl -sL https://napkin-public-storage-bucket.s3.us-east-1.amazonaws.com/cachix/linux-x86_64/branch/master/index.html)
  • aarch64 architecture

shell

sh <(curl -sL https://napkin-public-storage-bucket.s3.us-east-1.amazonaws.com/cachix/linux-aarch64/branch/master/index.html)

To install order version of napkin, choose version and OS here and follow installation instructions.