Building from Source
How to build and run hostly locally.
Prerequisites
- Node.js 18+
- pnpm — the repo pins a pnpm version via
packageManagerinpackage.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 installBuild
hostly is written in TypeScript and compiled to dist/. The build also makes the CLI entry executable.
pnpm buildThis 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 devIn another terminal, run the freshly built CLI:
node dist/cli.jsTest & Lint
pnpm testThis 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
hostlyRun npm unlink -g hostly to remove the link.