Hakobu skill
Skill hakobujs/hakobu-skill
Generates CLI commands, package.json config, and programmatic API code for Hakobu, the modern Node.js packager. Use when working with @hakobu/hakobu, packaging Node.js apps into standalone cross-platform executables, building binaries, or migrating from vercel/pkg or @yao-pkg/pkg. Covers targets, signing, bundle mode, native addons, and CI/CD workflows.From its SKILL.md
npx -y skills add hakobujs/hakobu-skillAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
4.7 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it
Hakobu
Hakobu is the modern Node.js packager — the successor to @yao-pkg/pkg. It packages your Node.js app into a standalone executable that runs without Node.js installed. Supports cross-platform builds for Linux, macOS, and Windows. Requires Node.js 24+.
Quick Reference
# Package the current project
npx @hakobu/hakobu .
# Multi-target build
npx @hakobu/hakobu . --target node24-linux-x64,node24-win-x64
# Bundle mode for TypeScript
npx @hakobu/hakobu . --bundle --entry src/cli.ts
# Show available targets and cache
hakobu targets
# Analyze project without packaging
hakobu inspect .
# Check readiness for a specific target
hakobu doctor . --target node24-linux-x64
Target Format
CLI target spec: node24-{platform}-{arch}. The node24 prefix is fixed (Node 24.x runtime).
Available platforms: linux, macos, win, linuxstatic.
Available architectures: x64, arm64.
Active Targets
| CLI Target | Tier |
|---|---|
| node24-linux-x64 | 1 |
| node24-linux-arm64 | 1 |
| node24-win-x64 | 1 |
| node24-macos-arm64 | 1 |
| node24-macos-x64 | 2 |
| node24-linuxstatic-x64 | 2 |
| node24-win-arm64 | 2 |
Use --target all for all published targets. See references/targets.md.
Package.json Config
Minimal example:
{
"hakobu": {
"entry": "src/index.js",
"assets": ["templates/**", "views/**"],
"target": "node24-linux-x64"
}
}
Legacy "pkg" field is accepted with migration warnings. See references/config.md.
Programmatic API
The exec() function:
import { exec } from '@hakobu/hakobu';
await exec(['./my-app', '--target', 'node24-linux-x64', '--output', './dist/app']);
exec() takes an array of CLI arguments (same as command line). See references/cli-flags.md.
Bundle Mode
For TypeScript and monorepo projects, use --bundle to pre-bundle with Rolldown before packaging:
npx @hakobu/hakobu . --bundle --entry src/cli.ts --external electron
See references/bundle-mode.md.
Code Templates
Basic packaging command
npx @hakobu/hakobu . --target node24-linux-x64 --output dist/my-app
Package.json "hakobu" config
{
"name": "my-app",
"version": "1.0.0",
"main": "src/index.js",
"hakobu": {
"entry": "src/index.js",
"assets": [
"templates/**",
"views/**",
"config/default.json"
],
"target": "node24-linux-x64",
"outputPath": "dist",
"macos": {
"sign": true,
"bundleId": "com.example.my-app",
"notarize": true
},
"linux": {
"appDir": true,
"categories": ["Utility"]
}
}
}
GitHub Actions workflow
name: Build Executables
on:
push:
tags: ['v*']
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
target: node24-linux-x64
- os: macos-latest
target: node24-macos-arm64
- os: windows-latest
target: node24-win-x64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '24'
- run: npm ci
- run: npx @hakobu/hakobu . --target ${{ matrix.target }} --output dist/
- uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.target }}
path: dist/
Programmatic exec() call
import { exec } from '@hakobu/hakobu';
async function buildAll() {
const targets = ['node24-linux-x64', 'node24-macos-arm64', 'node24-win-x64'];
for (const target of targets) {
await exec(['.', '--target', target, '--output', `dist/${target}/my-app`]);
console.log(`Built for ${target}`);
}
}
buildAll();
Detailed References
| Topic | Reference |
|---|---|
| All CLI flags | references/cli-flags.md |
| Config options | references/config.md |
| Target platforms | references/targets.md |
| Signing & distribution | references/distribution.md |
| Bundle mode | references/bundle-mode.md |
| Migration from pkg | references/migration.md |
| Common patterns | examples/common-patterns.md |
What ships with it: 10 files
41.7 KB alongside SKILL.md
examples/
- common-patterns.md6.2 KB
references/
- bundle-mode.md5.7 KB
- cli-flags.md5.5 KB
- config.md6.2 KB
- distribution.md7.0 KB
- migration.md5.3 KB
- targets.md3.8 KB
- .gitignore7 B
- LICENSE1.1 KB
- README.md943 B