# axiomwtf/honeybun architecture

> Architecture diagram of the GitHub repository axiomwtf/honeybun, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/axiomwtf/honeybun
- Repository: https://github.com/axiomwtf/honeybun

## Overview

honey is a single-binary JavaScript/TypeScript toolchain. A developer invokes `honey` or `hxney` to run scripts, build bundles, manage packages, test, or migrate code; the CLI routes work through the daemon when available, which reuses a warm V8 runtime. Separate branches cover package resolution and installation, bundling, test/watch workflows, and configuration hooks. The README documents the overall flow and capabilities; some subsystem links rely on that documentation because the sampled source excerpts are partial.

Main entry points: [`src/bin/honey.rs`](https://github.com/axiomwtf/honeybun/blob/main/src/bin/honey.rs) (honey CLI), [`src/daemon.rs`](https://github.com/axiomwtf/honeybun/blob/main/src/daemon.rs) (Persistent daemon), [`src/lib.rs`](https://github.com/axiomwtf/honeybun/blob/main/src/lib.rs) (Package manager), [`src/runtime.rs`](https://github.com/axiomwtf/honeybun/blob/main/src/runtime.rs) (JS runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["CLI and Daemon"]
  node_honey_cli["honey CLI<br/>[honey.rs]"]
  node_hxney_cli["hxney CLI<br/>[hxney.rs]"]
  node_daemon["Persistent daemon<br/>[daemon.rs]"]
  node_service["Daemon service<br/>[service.rs]"]
end

subgraph group_engine["Execution and Engine"]
  node_runtime["JS runtime<br/>[runtime.rs]"]
  node_v8["V8 engine"]
  node_config["Config hooks<br/>[config.rs]"]
  node_bundler["Cinnamon bundler<br/>[build.rs]"]
end

subgraph group_packages["Package Management"]
  node_package_manager["Package manager<br/>[lib.rs]"]
  node_package_models["Package metadata<br/>[package.rs]"]
  node_registry["Registry resolver<br/>[registry.rs]"]
  node_cinm[("Package store<br/>[cinm.rs]")]
end

subgraph group_workflows["Project Workflows"]
  node_test_runner["Test runner<br/>[daemon.rs]"]
  node_watcher["File watcher<br/>[watch.rs]"]
  node_migrator["JS migration<br/>[migrate.rs]"]
end

node_developer(("Developer"))
node_npm_registry["npm registry"]
node_project_files["Project files"]

node_developer -->|"invokes"| node_honey_cli
node_developer -->|"invokes"| node_hxney_cli
node_honey_cli -->|"requests commands"| node_daemon
node_honey_cli -->|"falls back"| node_runtime
node_daemon -->|"executes scripts"| node_runtime
node_runtime -->|"executes on"| node_v8
node_honey_cli -->|"builds with"| node_bundler
node_honey_cli -->|"manages packages"| node_package_manager
node_hxney_cli -->|"runs npm commands"| node_package_manager
node_package_manager -->|"resolves packages"| node_registry
node_registry -->|"fetches metadata"| node_npm_registry
node_registry -->|"returns package data"| node_package_models
node_package_manager -->|"installs packages"| node_cinm
node_cinm -->|"downloads tarballs"| node_npm_registry
node_package_manager -->|"updates manifests"| node_project_files
node_honey_cli -->|"runs tests"| node_test_runner
node_test_runner -->|"executes test files"| node_runtime
node_honey_cli -->|"migrates code"| node_migrator
node_honey_cli -->|"watches changes"| node_watcher
node_daemon -->|"watches rebuild inputs"| node_watcher
node_daemon -->|"rebuilds bundles"| node_bundler
node_honey_cli -->|"runs hooks"| node_config
node_config -->|"evaluates hooks"| node_runtime
node_honey_cli -->|"controls service"| node_service
node_daemon -->|"loads modules"| node_project_files

click node_honey_cli "https://github.com/axiomwtf/honeybun/blob/main/src/bin/honey.rs"
click node_hxney_cli "https://github.com/axiomwtf/honeybun/blob/main/src/bin/hxney.rs"
click node_daemon "https://github.com/axiomwtf/honeybun/blob/main/src/daemon.rs"
click node_service "https://github.com/axiomwtf/honeybun/blob/main/src/service.rs"
click node_runtime "https://github.com/axiomwtf/honeybun/blob/main/src/runtime.rs"
click node_config "https://github.com/axiomwtf/honeybun/blob/main/src/config.rs"
click node_bundler "https://github.com/axiomwtf/honeybun/blob/main/src/build.rs"
click node_test_runner "https://github.com/axiomwtf/honeybun/blob/main/src/daemon.rs"
click node_watcher "https://github.com/axiomwtf/honeybun/blob/main/src/watch.rs"
click node_migrator "https://github.com/axiomwtf/honeybun/blob/main/src/migrate.rs"
click node_package_manager "https://github.com/axiomwtf/honeybun/blob/main/src/lib.rs"
click node_package_models "https://github.com/axiomwtf/honeybun/blob/main/src/package.rs"
click node_registry "https://github.com/axiomwtf/honeybun/blob/main/src/registry.rs"
click node_cinm "https://github.com/axiomwtf/honeybun/blob/main/src/cinm.rs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_honey_cli,node_hxney_cli,node_daemon,node_service toneBlue
class node_runtime,node_v8,node_config,node_bundler toneAmber
class node_package_manager,node_package_models,node_registry,node_cinm toneMint
class node_test_runner,node_watcher,node_migrator toneRose
class node_developer,node_npm_registry,node_project_files toneIndigo
```

## Components

### CLI and Daemon

- [honey CLI](https://github.com/axiomwtf/honeybun/blob/main/src/bin/honey.rs): `src/bin/honey.rs`
- [hxney CLI](https://github.com/axiomwtf/honeybun/blob/main/src/bin/hxney.rs): `src/bin/hxney.rs`
- [Persistent daemon](https://github.com/axiomwtf/honeybun/blob/main/src/daemon.rs): `src/daemon.rs`
- [Daemon service](https://github.com/axiomwtf/honeybun/blob/main/src/service.rs): `src/service.rs`

### Execution and Engine

- [JS runtime](https://github.com/axiomwtf/honeybun/blob/main/src/runtime.rs): `src/runtime.rs`
- **V8 engine**
- [Config hooks](https://github.com/axiomwtf/honeybun/blob/main/src/config.rs): `src/config.rs`
- [Cinnamon bundler](https://github.com/axiomwtf/honeybun/blob/main/src/build.rs): `src/build.rs`

### Package Management

- [Package manager](https://github.com/axiomwtf/honeybun/blob/main/src/lib.rs): `src/lib.rs`
- [Package metadata](https://github.com/axiomwtf/honeybun/blob/main/src/package.rs): `src/package.rs`
- [Registry resolver](https://github.com/axiomwtf/honeybun/blob/main/src/registry.rs): `src/registry.rs`
- [Package store](https://github.com/axiomwtf/honeybun/blob/main/src/cinm.rs): `src/cinm.rs`

### Project Workflows

- [Test runner](https://github.com/axiomwtf/honeybun/blob/main/src/daemon.rs): `src/daemon.rs`
- [File watcher](https://github.com/axiomwtf/honeybun/blob/main/src/watch.rs): `src/watch.rs`
- [JS migration](https://github.com/axiomwtf/honeybun/blob/main/src/migrate.rs): `src/migrate.rs`

### Other components

- **Developer**
- **npm registry**
- **Project files**

## Connections

- Developer → honey CLI: invokes (evidence: `README.md`)
- Developer → hxney CLI: invokes (evidence: `README.md`)
- honey CLI → Persistent daemon: requests commands (evidence: `README.md`)
- honey CLI → JS runtime: falls back (evidence: `README.md`)
- Persistent daemon → JS runtime: executes scripts (evidence: `src/daemon.rs`)
- JS runtime → V8 engine: executes on (evidence: `README.md`)
- honey CLI → Cinnamon bundler: builds with (evidence: `README.md`)
- honey CLI → Package manager: manages packages (evidence: `README.md`)
- hxney CLI → Package manager: runs npm commands (evidence: `README.md`)
- Package manager → Registry resolver: resolves packages (evidence: `src/lib.rs`)
- Registry resolver → npm registry: fetches metadata (evidence: `src/registry.rs`)
- Registry resolver → Package metadata: returns package data (evidence: `src/registry.rs`)
- Package manager → Package store: installs packages (evidence: `src/lib.rs`)
- Package store → npm registry: downloads tarballs (evidence: `src/cinm.rs`)
- Package manager → Project files: updates manifests (evidence: `src/lib.rs`)
- honey CLI → Test runner: runs tests (evidence: `README.md`)
- Test runner → JS runtime: executes test files (evidence: `README.md`)
- honey CLI → JS migration: migrates code (evidence: `README.md`)
- honey CLI → File watcher: watches changes (evidence: `README.md`)
- Persistent daemon → File watcher: watches rebuild inputs (evidence: `src/daemon.rs`)
- Persistent daemon → Cinnamon bundler: rebuilds bundles (evidence: `README.md`)
- honey CLI → Config hooks: runs hooks (evidence: `README.md`)
- Config hooks → JS runtime: evaluates hooks (evidence: `src/config.rs`)
- honey CLI → Daemon service: controls service (evidence: `src/service.rs`)
- Persistent daemon → Project files: loads modules (evidence: `README.md`)
