Howdy

Getting started

This guide takes you from an empty terminal to a running Howdy app. You will install the tools Howdy builds on, install the howdy command line, and create your first project.

Before you begin

Howdy apps are written in Gleam and run on the Erlang virtual machine, so a Howdy project will not build or run without these three tools installed:

  • Gleam, the language and its build tool
  • Erlang/OTP, the runtime Gleam compiles to
  • rebar3, the Erlang build tool Gleam uses to compile some of Howdy's dependencies

The Gleam website has up to date instructions for installing all three on every platform: Installing Gleam.

The default PostgreSQL database needs a PostgreSQL server, which the generated project can run for you with Docker, and a SQLite project needs a C compiler to build.

Check everything is ready:

gleam --version
erl -version
rebar3 --version

Install the Howdy CLI

The howdy command creates new projects for you. It is a single program written in Go, and there are two ways to install it.

With the install script

The quickest way is the install script, which downloads the latest build for your machine from the CLI's releases and checks it against the release's checksums. There is one for macOS and Linux and one for Windows, and both work on Intel and ARM.

On macOS and Linux, run this in a terminal:

curl -fsSL https://tryhowdy.dev/install.sh | bash

This puts howdy in ~/.local/bin. If that is not on your PATH yet, the script tells you the line to add to your shell's profile. Set HOWDY_INSTALL_DIR to install somewhere else, or HOWDY_VERSION for a particular release:

curl -fsSL https://tryhowdy.dev/install.sh | HOWDY_VERSION=1.0.0 bash

On Windows, run this in PowerShell:

irm https://tryhowdy.dev/install.ps1 | iex

This puts howdy.exe in %LOCALAPPDATA%\Programs\howdy and adds that folder to your PATH, for the window you ran it in and every terminal you open after. Set HOWDY_INSTALL_DIR to install somewhere else, or HOWDY_VERSION for a particular release:

$env:HOWDY_VERSION = "1.0.0"; irm https://tryhowdy.dev/install.ps1 | iex

You can also download the zip for your machine from the latest release and put howdy.exe on your PATH yourself.

Once it is installed, howdy upgrade keeps the CLI up to date.

With Go

If you have Go 1.25 or newer, you can build and install the CLI from source instead:

git clone https://github.com/howdy-gleam/howdy-cli.git
cd howdy-cli
go install .

Go installs programs to $HOME/go/bin, so make sure that directory is on your PATH.

Either way, check the install worked:

howdy --help

Create your project

Run howdy new with a name for your app:

howdy new my_app

Project names follow Gleam's rules: lowercase letters, digits and underscores, starting with a letter. You can also give a path such as apps/my_app, and the last segment becomes the project name.

The CLI checks that Gleam is installed, writes the project files, formats them and downloads the dependencies. The new project comes with:

  • a themed home page built with Howdy UI
  • hot reload for development
  • a database with an example todo list, including a JSON API and a live component on the home page
  • a test suite

Choose a database

By default the project uses PostgreSQL. The app connects using the DATABASE_URL setting, and the project includes a docker-compose.yml that runs PostgreSQL on port 5432 with a development database and a test database, so you will want Docker installed. Copy .env.example to .env to point DATABASE_URL at a different server.

Pass --database sqlite to build the same project on SQLite instead, which needs no setup: the database is a file created and migrated the first time the app starts.

howdy new my_app --database sqlite

Don't need a database? Create a page-only project instead:

howdy new my_app --no-database

--database and --no-database cannot be used together.

Run it

Move into your new project and start the development server:

cd my_app
gleam dev

With PostgreSQL, the default, start the database first. The app and the tests both need it running:

cd my_app
docker compose up -d
gleam dev

Open http://127.0.0.1:8789 and say howdy to your new app. Changes to your code rebuild and refresh the page automatically, and compile errors show up in the browser while the last working version keeps serving.

When you want to run the app without the reload watcher, use gleam run, and run the tests with gleam test.

The howdy command does more than create projects. It can add controllers, records and migrations to your app too: see The howdy command.