Skip to content
Jennifer Programming Language

Installing & running

Which binary?

On Linux (the supported platform) Jennifer ships as two binaries built from the same source with different compilers:

BinaryBuildPick when
jenniferstandard Go (default)The default. Every host feature; on compute-heavy work the two builds are within ~1.5x either way per workload on the serial benchmark, and this one wins the end-to-end wall clock once spawn parallelism is involved (see technical/benchmark.md); the reliable choice for multi-core parallel spawn. Required for os.run / os.spawn / os.wait / os.poll / os.kill and the whole net library.
jennifer-tinyTinyGoConstrained variant. Smaller binary for minimal-footprint deployments (embedded systems, minimal containers, small scripting hosts). No os/exec (a TinyGo runtime gap), no network stack (no netdev driver), no sql. Run-only: the tokens / ast / fmt / lint / profile / test / serve development subcommands are in the default binary only. Each missing surface throws an error pointing at jennifer.

Both binaries install side by side. The packages below install both, as do the tarball and a from-source build. The best-effort macOS / Windows / Android builds ship the standard jennifer only (see macOS / Windows below).

The Linux releases cover these architectures:

Release archGo target.deb.ipkjennifer-tinyRuns on
amd64linux/amd64amd64x86_64yes64-bit x86
arm64linux/arm64arm64aarch64_genericyes64-bit ARM (Raspberry Pi 3 and later in 64-bit mode)
armv7linux/arm, GOARM=7none (use armhf)arm_cortex-a7_neon-vfpv4yes32-bit ARMv7 with VFP; not ARMv6
armv6linux/arm, GOARM=6armhfarm_arm1176jzf-s_vfpyes32-bit ARMv6 with VFP (Raspberry Pi Zero / 1) and every ARMv7
386linux/386i386i386_pentium4yes32-bit x86 with SSE2
riscv64linux/riscv64riscv64riscv64_riscv64no (no TinyGo target)64-bit RISC-V

The one armhf .deb carries the armv6 binaries, so it installs on any 32-bit ARM Debian / Raspberry Pi OS system (Raspberry Pi OS's armhf baseline is ARMv6); the armv7 build ships as a tarball and an .ipk only.

A Jennifer int is 64-bit on every one of them; on the 32-bit targets only the memory a program can use is smaller (a 4 GiB address space).

Install

Debian / Ubuntu (.deb)

Pick the right .deb for your architecture from the latest Releases page, verify the checksum, and install:

sh
# Replace X.Y.Z with the release version, e.g. 0.27.0
ARCH=$(dpkg --print-architecture)   # amd64, arm64, armhf, i386 or riscv64
curl -LO "https://github.com/jennifer-language/jennifer/releases/download/X.Y.Z/jennifer_X.Y.Z_${ARCH}.deb"
curl -LO "https://github.com/jennifer-language/jennifer/releases/download/X.Y.Z/jennifer_X.Y.Z_${ARCH}.deb.sha256"
sha256sum -c "jennifer_X.Y.Z_${ARCH}.deb.sha256"
sudo dpkg -i "jennifer_X.Y.Z_${ARCH}.deb"

Installs /usr/bin/jennifer + /usr/bin/jennifer-tiny (not on riscv64), man pages under /usr/share/man/man1/, bash completion, the XDG MIME definition that registers .j as text/x-jennifer with file managers and editors, and Vim + Neovim syntax highlighting (in both /usr/share/vim/vimfiles and /usr/share/nvim/site, so .j files highlight with no per-user setup). A Sublime Text / bat syntax also ships at /usr/share/jennifer/syntaxes/jennifer.sublime-syntax; bat needs a one-time activation (copy it into $(bat --config-dir)/syntaxes/ and run bat cache --build) since it compiles syntaxes into a per-user cache.

Arch Linux (AUR)

Two packages:

sh
# Prebuilt binary, downloads the release tarball (fast install):
yay -S jennifer-bin
# or paru -S jennifer-bin, or any other AUR helper.

# Builds from source on each install, tracks main:
yay -S jennifer-git

Both install the same files as the .deb. jennifer-bin follows the releases; jennifer-git rebuilds from the latest commit on main on each upgrade.

Linux (tarball)

For distros without a native package, grab the per-arch tarball from the Releases page:

sh
# Replace X.Y.Z and ARCH with the release version + your arch
curl -LO "https://github.com/jennifer-language/jennifer/releases/download/X.Y.Z/jennifer-X.Y.Z-linux-${ARCH}.tar.gz"
tar -xzf "jennifer-X.Y.Z-linux-${ARCH}.tar.gz"
cd "jennifer-X.Y.Z-linux-${ARCH}"
./jennifer version
./jennifer-tiny version

The tarball lays out as:

text
jennifer-X.Y.Z-linux-ARCH/
├── jennifer               # standard-Go binary (default)
├── jennifer-tiny          # TinyGo binary (constrained)
├── README.md
├── JENNIFER.md
└── share/
    ├── man/man1/          # jennifer.1, jennifer-tiny.1
    ├── mime/packages/     # jennifer.xml (XDG MIME)
    ├── bash-completion/   # completions/jennifer (+ jennifer-tiny symlink)
    ├── vim/vimfiles/      # syntax/ + ftdetect/ (Vim highlighting)
    ├── nvim/site/         # syntax/ + ftdetect/ (Neovim highlighting)
    └── jennifer/
        ├── modules/       # importable .j modules (import "name.j";)
        └── syntaxes/      # jennifer.sublime-syntax (Sublime Text / bat)

To install system-wide:

sh
sudo install -m 0755 jennifer      /usr/local/bin/
sudo install -m 0755 jennifer-tiny /usr/local/bin/
sudo install -m 0644 share/mime/packages/jennifer.xml /usr/local/share/mime/packages/
sudo update-mime-database /usr/local/share/mime || true
# System modules, so a bare `import "name.j";` resolves. /usr/share/jennifer/modules
# is the built-in default; install elsewhere and point JENNIFER_SYSMODDIR (or
# --sysmoddir) at it instead. To print the path in effect:
#   echo 'use io; use meta; io.printf("%s\n", meta.SYSMODDIR);' | jennifer run -
sudo mkdir -p /usr/share/jennifer/modules
sudo install -m 0644 share/jennifer/modules/*.j /usr/share/jennifer/modules/

Container image

Each release publishes multi-arch images to GHCR (linux/amd64, linux/arm64, linux/arm/v7, linux/386 and linux/riscv64, plus linux/arm/v6 for :alpine; :static has the first three; see packaging/docker/README.md). The image bundles both binaries and the system modules, so a bare import "name.j"; resolves with no setup. The container sets WORKDIR /work and ENTRYPOINT ["jennifer"], so you mount your code at /work and pass the jennifer subcommand as the container command.

Three variants:

  • :latest / :<version> is the Debian-slim default (full host features - os.run, TLS, apt-get in a derived image).
  • :alpine / :<version>-alpine is the small image that still works as a build base: it has /bin/sh and apk, so a FROM ...:alpine Dockerfile can RUN shell steps and add packages.
  • :static / :<version>-static is a minimal distroless build (~15-25MB) with no /bin/sh: a runtime image to copy an app into, not a build base. A shell-form RUN in a derived image fails (the exec form RUN ["/usr/bin/jennifer", "run", "build.j"] works), and os.run of external programs is unavailable - use it for pure-interpreter or web-serving workloads, as the last stage of a multi-stage build.

:latest and the version tags track releases; a :dev (also :main) slim image is rebuilt from the latest commit on main on every push - a moving tag for trying unreleased changes. The slim and alpine images also bundle the jvc deck manager, so an app image can run RUN jvc install to vendor its decks (the static image does not carry it: vendor in a slim or alpine build stage and copy vendor/ across). Build details, the two-stage jvc recipe, and local-build recipes are in packaging/docker/README.md.

Docker

sh
# Run a script from the current directory (mounted at /work).
docker run --rm -v "$PWD:/work" ghcr.io/jennifer-language/jennifer run app.j

# Pipe a program on stdin.
echo 'use io; io.printf("hi\n");' | docker run --rm -i ghcr.io/jennifer-language/jennifer run -

# Interactive REPL (the default command).
docker run --rm -it ghcr.io/jennifer-language/jennifer

# Serve a web app (port is whatever the program passes to web.run / httpd).
docker run --rm -p 8080:8080 -v "$PWD:/work" ghcr.io/jennifer-language/jennifer run server.j

For a long-running service, a Compose file keeps the mount, port, and restart policy in one place:

yaml
# compose.yaml  (or docker-compose.yml)
services:
  app:
    image: ghcr.io/jennifer-language/jennifer:latest
    command: ["run", "server.j"]   # args to the `jennifer` entrypoint
    volumes:
      - ./:/work                    # your code, resolved from the image's /work workdir
    ports:
      - "8080:8080"                 # match the port your program serves on
    restart: unless-stopped
sh
docker compose up        # start (add -d to run detached)

Podman

The same image and flags work with docker swapped for podman.

sh
# Run a script (add :Z to the bind mount on SELinux hosts so the container can read it).
podman run --rm -v "$PWD:/work:Z" ghcr.io/jennifer-language/jennifer run app.j

# Interactive REPL.
podman run --rm -it ghcr.io/jennifer-language/jennifer

# Serve a web app.
podman run --rm -p 8080:8080 -v "$PWD:/work:Z" ghcr.io/jennifer-language/jennifer run server.j

podman compose up reads the same Compose file shown above. To run it as a managed background service, generate a systemd/Quadlet unit with podman generate systemd (or a .container Quadlet file). Rootless Podman can't bind host ports below 1024 without extra configuration - map to a high port (-p 8080:8080) and reverse-proxy if you need :80 / :443.

macOS / Windows (unsupported)

Linux is the only supported platform. As a convenience, best-effort unsupported binaries for macOS (Intel + Apple Silicon), Windows (64- and 32-bit) and Android (arm64) are attached to each release, named ...-UNSUPPORTED. Read the caveats before relying on them:

  • Best-effort, may be absent. They come from a pipeline step that is allowed to fail; if a build breaks, that release won't have them, and it does not hold up the Linux release.
  • Standard jennifer only. No jennifer-tiny - TinyGo's macOS / Windows host support is too limited to ship. This is the full-featured build, so os.run / os.spawn, the net library, and the rest of the surface all work.
  • Unsigned. On macOS, Gatekeeper quarantines the download - clear it with xattr -d com.apple.quarantine ./jennifer (or right-click -> Open). On Windows, SmartScreen warns about an unknown publisher - choose "More info" -> "Run anyway".
  • No support. Bugs specific to macOS / Windows may not be fixed; supported development and testing happen on Linux. Supported builds for these platforms are planned after 1.0.0 (see the roadmap, M31).
  • Android (arm64). Go links only android/arm64 without the NDK, so that is the one Android build. It is built for Termux's prefix (/data/data/com.termux/files/usr): copy jennifer to $PREFIX/bin and the archive's share/jennifer/modules to $PREFIX/share/jennifer/modules; Termux's $PREFIX/etc/resolv.conf and hosts are found without configuration, and $TMPDIR is honoured. Elsewhere set JENNIFER_SYSMODDIR and JENNIFER_RESOLV_CONF. Android has no /usr/bin/env, so a script's shebang names the interpreter: #!/data/data/com.termux/files/usr/bin/jennifer run (Termux's termux-exec also rewrites /usr/bin/env shebangs).
  • Just the binary (macOS). The -UNSUPPORTED archive holds only the executable plus JENNIFER.md, README.md, and the licence - no installer, man pages, MIME registration, or shell completion. Windows gets an installer (below); a Homebrew tap for macOS is planned (below).

macOS: Homebrew (planned)

A Homebrew formula is in the repo but not yet published to a tap, so brew install does not work yet; use the -UNSUPPORTED binary above. Once the tap is live, it builds jennifer from source - so it runs on both Intel and Apple Silicon with no Gatekeeper prompt (Homebrew does not quarantine what it builds), puts jennifer on your PATH, and bundles the system modules so a bare import "name.j"; resolves with no setup. It will still be a best-effort unsupported build (Linux is the only supported platform) and install the standard jennifer only (no jennifer-tiny). See packaging/homebrew/.

Windows installer

Windows releases also ship a jennifer-<version>-setup.exe - the same best-effort unsupported build wrapped in an Inno Setup installer. It is unsigned (SmartScreen: "More info" -> "Run anyway") and unsupported, but saves the manual setup:

  • Offers a choice at startup: Install for all users (elevates, installs to C:\Program Files\Jennifer, system-wide PATH / env) or Install for me only (no admin, %LOCALAPPDATA%\Programs\Jennifer, per-user). Running the setup as administrator gets the all-users / Program Files install. Either way it adds jennifer.exe to PATH, so jennifer works in a fresh terminal.
  • Bundles the Jennifer-coded system modules and sets JENNIFER_SYSMODDIR, so a bare import "name.j"; resolves (on Windows the built-in module path is a Unix path that does not exist, so the plain .zip cannot import modules without setting this yourself).
  • Optionally associates .j files (opt-in): double-click opens the source in Notepad; a "Run with Jennifer" right-click action runs it.
  • Uninstall from Apps & Features, which reverses the PATH, the environment variable, and the association.

Prefer the plain -UNSUPPORTED.zip if you want a portable, no-registry copy (or you are on 32-bit Windows - the installer is 64-bit only); set JENNIFER_SYSMODDIR yourself to use modules from the zip.

Windows 8.1 and earlier cannot run it: Go (since 1.21) builds binaries that require Windows 10 or newer (or Windows Server 2016+). The 32-bit build targets 32-bit Windows 10 / 11.

Build from source

For development, or a platform without a prebuilt artifact. You need standard Go, plus TinyGo for jennifer-tiny. From the repository root:

sh
# Build both binaries:
make build

# Or just one:
make build-go      # produces ./jennifer      (standard Go, default)
make build-tinygo  # produces ./jennifer-tiny (TinyGo, constrained)

# Quick iteration without rebuilding:
go run ./cmd/jennifer run examples/hello.j

The make targets regenerate internal/version/version_gen.go from git state before invoking the toolchain, so ./jennifer version always reflects the current commit. See ../libraries/meta.md for the meta.VERSION string format.

Install prefix

The binary carries the install prefix it was built for, /usr by default. make build PREFIX=<dir> (an absolute path) builds for another one:

PathDefault (PREFIX=/usr)Overridden by
System modules<PREFIX>/share/jennifer/modules--sysmoddir, JENNIFER_SYSMODDIR
Docs (JENNIFER.md)<PREFIX>/share/doc/jennifer-
resolv.conf, hosts<PREFIX>/etc/..., then /etc/... (/usr uses /etc only)JENNIFER_RESOLV_CONF, JENNIFER_HOSTS
Temporary files$TMPDIR, else the platform's (/tmp; /data/local/tmp on Android)TMPDIR
sh
make build PREFIX=/opt/jennifer
sudo install -D -m 0755 jennifer /opt/jennifer/bin/jennifer
sudo mkdir -p /opt/jennifer/share/jennifer/modules
sudo install -m 0644 modules/*.j /opt/jennifer/share/jennifer/modules/   # minus *_test.j
/opt/jennifer/bin/jennifer version -v   # prefix, each path and where it came from

A self-contained userland under an app's data directory (Termux on Android, for one) builds with its own prefix (Termux exports PREFIX, which make picks up) and keeps its resolv.conf in $PREFIX/etc, which the resolver finds without configuration (see the resolver configuration). The release builds and the packages (Debian, Arch, OpenWrt, the container image) use /usr.

Running

sh
# Run a Jennifer source file (.j extension required):
jennifer run examples/hello.j

# Print the build version:
jennifer version

You can also pipe source in on stdin by passing - as the filename:

sh
echo 'use io; io.printf("hi\n");' | jennifer run -
jennifer run - < program.j
cat program.j | jennifer run -

When reading from stdin, error messages name the source <stdin>, and include / local import paths resolve relative to the current working directory.

Interactive REPL

jennifer repl starts an interactive session:

text
$ jennifer repl
jennifer - Jennifer programming language interpreter
type :quit (or Ctrl-D) to exit; :help for help
>>> use io;
>>> def x as int init 21;
>>> $x + $x;
42
>>> io.printf("hi\n");
hi
>>> func dbl(n as int) {
...   return $n * 2;
... }
>>> dbl(7);
14
>>> :quit
  • Statements still end with ;. If a line ends with an unclosed { or (, the prompt switches to ... and waits for you to finish the block.
  • A bare expression at the end of an input (like $x + $x;) prints its value. null results (including the return value of printf) are suppressed.
  • String results print with double quotes ("hello", not hello).
  • Variables, constants, functions, and library imports persist for the whole session. Functions can be redefined freely as you iterate.
  • File splices (include "lib.j";) work in the REPL and resolve relative to the directory you launched jennifer repl from.
  • :quit, :exit, or Ctrl-D end the session; :help shows a reminder.

The prompt supports the standard shell line-editing keys:

KeyAction
Left / RightMove cursor
Home / EndJump to line start / end
Ctrl+A / Ctrl+ESame as Home / End
Ctrl+Left / Ctrl+RightMove by word
Backspace, DeleteDelete character
Ctrl+W, Ctrl+BackspaceDelete word backward
Ctrl+U / Ctrl+KKill to line start / end
Up / DownBrowse history
Ctrl+CCancel the current line

History is in memory only and holds up to 100 entries. When stdin is piped (echo ... | jennifer repl), the line editor is bypassed and the REPL reads lines normally.

Inspection and formatting

Three commands show what the lexer and parser make of your source and keep it in canonical shape:

sh
# Print the lexer's token stream, one per line
jennifer tokens examples/hello.j

# Print the parsed (and preprocessed) AST as JSON
jennifer ast examples/hello.j

# Reformat the source to canonical style (see style-guide.md)
jennifer fmt examples/hello.j

By default fmt writes the formatted source to stdout. -w (or --write) rewrites the named files in place (jennifer fmt -w foo.j, jennifer fmt -w *.j); an already-canonical file is left untouched. fmt does no globbing itself: let the shell select files, recursively via ** (see the formatter reference). The formatter is idempotent and preserves runtime behavior; the test suite checks both on every example in the repository. See style-guide.md for the style rules.