Documentation
Building from Source

Building from Source

How to build and run hostly locally.

Prerequisites

  • Node.js 18+
  • pnpm — the repo pins a pnpm version via packageManager in package.json
  • Caddy (opens in a new tab) on your PATH (needed at runtime, not to build)

Clone & Install

git clone https://github.com/bilalbentoumi/hostly.git
cd hostly
pnpm install

Build

hostly is written in TypeScript and compiled to dist/. The build also makes the CLI entry executable.

pnpm build

This runs tsc and then chmod +x dist/cli.js. The compiled entry point is dist/cli.js, which is what the bin field in package.json points to.

Develop

Watch and recompile on change:

pnpm dev

In another terminal, run the freshly built CLI:

node dist/cli.js

Test & Lint

pnpm test

This runs xo (opens in a new tab) (lint) and ava (opens in a new tab) (tests). Tests use ink-testing-library (opens in a new tab) to render components and assert on terminal output.

Run Locally Without Publishing

Link the package globally so the hostly command resolves to your working copy:

pnpm build
npm link
hostly

Run npm unlink -g hostly to remove the link.