fn-host
v0.1.0
Published
fn-host CLI
Downloads
133
Readme
fn-host
A CLI program built with Bun.
Requirements
- Bun >= 1.0
Install
This is a Bun-only package — Bun must be installed to run it.
bun add -g fn-host # installs the `fn` command globally
fn --helpFor local development:
bun installUsage
Run from source during development:
bun run dev hello
bun run dev hello fn --upperOr link it globally so the fn command is on your PATH:
bun link
fn --help
fn hello world --upperCommands
| Command | Description |
| ---------------- | -------------------------- |
| hello [name] | Print a friendly greeting |
Global flags: -h, --help, -v, --version.
Build
The published package ships only the bundled dist/index.js (the src/ source is
not published). prepublishOnly rebuilds it automatically on npm publish.
bun run build # -> dist/index.js
bun dist/index.js helloDevelopment
bun test # run tests
bun run typecheck # type-check with tscProject layout
src/
index.ts # executable entry (shebang)
cli.ts # argv parsing + command dispatch
commands/
index.ts # command registry + Command interface
hello.ts # example command
test/
cli.test.ts # end-to-end CLI testsAdd a command by creating a file in src/commands/ that exports a Command,
then register it in src/commands/index.ts.
