artifact-fs
v0.1.2
Published
Bun daemon and CLI for artifact-fs — FUSE-backed git artifact mounts via bun:ffi
Readme
artifact-fs
Bun wrapper for artifact-fs: a FUSE-backed git artifact daemon exposed over a unix socket API.
Requires Bun (bun:ffi). macOS or Linux only.
Install
bun add artifact-fs
# or
npm install artifact-fsOn install, the matching platform native library is linked into native/ (see artifact-fs-darwin-arm64, artifact-fs-linux-x64-gnu, etc.).
CLI
Repo commands auto-start the daemon when needed.
artifact-fs ensure-daemon
artifact-fs daemon-status
artifact-fs stop-daemon
artifact-fs add-repo --name myrepo --remote https://github.com/org/repo.git
artifact-fs list-repos
artifact-fs status --name myrepo
artifact-fs fetch --name myrepo
artifact-fs remove-repo --name myrepoRun the daemon in the foreground:
artifact-fs-daemonEnvironment
| Variable | Description |
|----------|-------------|
| ARTIFACT_FS_ROOT | State directory (default: ~/.local/share/artifact-fs) |
| ARTIFACT_FS_MOUNT_ROOT | FUSE mount parent (default: /tmp) |
| DAEMON_SOCKET | Unix socket path (default: $ARTIFACT_FS_ROOT/run/daemon.sock) |
| ARTIFACT_FS_NATIVE_LIB | Override path to the native bridge library |
| ARTIFACT_FS_SKIP_POSTINSTALL | Set to 1 to skip native install hook |
Programmatic API
import { artifactFs } from "artifact-fs";
import { daemonClient } from "artifact-fs/client";
await daemonClient.health();
artifactFs.listRepos();Build native from source
git clone <this-repo>
cd daemon
npm run build:native # current host
npm run build:platform -- darwin-arm64Cross-compilation uses Docker when the host OS/arch does not match the target.
Publish (maintainers)
npm run sync-versions
npm run build:platform -- darwin-arm64
npm run publish:platform -- darwin-arm64
# publish all built platform packages, then the main package:
npm run publish:allPlatform packages: artifact-fs-<os>-<arch>[-musl|-gnu].
Supported platforms
darwin-arm64,darwin-x64linux-x64-gnu,linux-arm64-gnulinux-x64-musl,linux-arm64-musl
