Skip to content

Install

On Linux, macOS and WSL, you can install Pen through Homebrew.

  1. Install Homebrew.

  2. Run the following command in your terminal.

    Terminal window
    brew install pen-lang/pen/pen

Now, you should be able to run a pen command in your shell.

Terminal window
pen --version

You can also build Pen from source on your local machine.

  1. Install the following software using a package manager of your choice (e.g. apt for Ubuntu and Homebrew for macOS.)

  2. Install Turtle.

    Terminal window
    cargo install turtle-build
    # Or, via Homebrew,
    brew install pen-lang/pen/turtle
  3. Clone the Git repository.

    Terminal window
    git clone https://github.com/pen-lang/pen
  4. Run a cargo command in the repository’s directory.

    Terminal window
    cargo install --path cmd/pen
  5. Set a PEN_ROOT environment variable to the directory.

    Terminal window
    export PEN_ROOT=<directory>

Now, you are ready to use the pen command built manually.