How mclucy/lucy works
Lucy is a Minecraft server package manager. Its principal workflow is to initialize a project, add package requests, resolve package dependencies, persist a lockfile, and install the locked artifacts into a server workspace. It also supports deterministic reinstall, workspace/runtime inspection, dependency-tree and orphan views, crash bisection, and multi-source search. The tree and README establish these product areas; sampled source confirms project state I/O, provider routing/execution, cache behavior, and search rendering, but not every command’s internal wiring.
Main entry points: main.go Lucy CLI · service.go Project state service · install.go Install engine · add.go Add packages
Components 24
CLI workflows
- Lucy CLI
main.go - Initialize project
internal/cli/init/init_flow.go - Add packages
internal/cli/add/add.go - Remove packages
cmd/cmd_remove.go - Search packages
internal/cli/search/search.go - Inspect workspace
internal/cli/status/status.go - Dependency views
cmd/cmd_tree.go - Unused packages
cmd/cmd_leaves.go - Crash bisection
internal/cli/bisect/bisect.go
Package discovery
- Dependency resolver
resolve/solver.go - Provider routing
upstream/routing/routing.go - Package providers
upstream/providers - GitHub source
github/gh.go
Install and runtime
- Server workspace
workspace/workspace.go - Install command
internal/cli/install/install.go - Install engine
install/install.go - Server bootstrap
bootstrap/bootstrap.go - Artifact metadata
artifact/artifact.go - Artifact cache
cache/cache.go - Runtime detection
workspace/internal/detector/detector.go
Project state
- Project state service
state/service.go - Manifest and lock
state/manifest.go
Other components
- Server operator
- Package registries
Connections 32
- Server operator → Lucy CLI: runs commands
- Lucy CLI → Initialize project: dispatches
- Lucy CLI → Add packages: dispatches
- Lucy CLI → Remove packages: dispatches
- Lucy CLI → Search packages: dispatches
- Lucy CLI → Inspect workspace: dispatches
- Lucy CLI → Dependency views: dispatches
- Lucy CLI → Unused packages: dispatches
- Lucy CLI → Crash bisection: dispatches
- Initialize project → Project state service: scaffolds state
- Add packages → Dependency resolver: resolves requests
- Dependency resolver → Provider routing: selects providers
- Provider routing → Package providers: routes requests
- Package providers → Package registries: queries metadata
- Search packages → Provider routing: selects providers
- Search packages → Package providers: searches packages
- Add packages → Project state service: updates project state
- Remove packages → Project state service: updates project state
- Project state service → Manifest and lock: reads and writes
- Add packages → Install command: installs packages
- Install command → Install engine: starts sync
- Install engine → Project state service: reads lockfile
- Install engine → Server workspace: syncs files
- Install engine → Artifact metadata: handles artifacts
- Install engine → Artifact cache: uses cache
- Install engine → Server bootstrap: installs server core
- Inspect workspace → Server workspace: probes runtime
- Server workspace → Runtime detection: detects platform
- Dependency views → Project state service: reads dependencies
- Unused packages → Project state service: reads dependencies
- Crash bisection → Server workspace: examines installation
- Package providers → GitHub source: uses source