wirebox-di

Automate dependency injection configuration for CFML and BoxLang applications.

1|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/ColdBox/skills --skill wirebox-di
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wirebox-di
Source: https://github.com/ColdBox/skills/tree/main/wirebox
Command: npx skills add https://github.com/ColdBox/skills --skill wirebox-di

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

WireBox DI simplifies and centralizes the creation, wiring, and lifecycle management of application components so developers avoid manual object construction, brittle coupling, and scope-widening errors.

Core Features & Use Cases

  • Binder configuration and mapping DSL to register aliases, paths, directories, and factory methods for consistent object resolution.
  • Scope and lifecycle management including singletons, request/session/application scopes, CacheBox persistence, and Provider patterns to prevent scope-widening.
  • Advanced patterns: child injectors for isolation, virtual inheritance, lazy properties, property observers, object delegation, and an object populator for hydrating components from structs, JSON, XML, or queries.

Quick Start

Generate a binder configuration that maps your service classes, demonstrates provider-based injection to avoid scope-widening, and resolves an instance using getInstance.

Frequently Asked Questions about wirebox-di

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure dependency injection mappings for CFML or BoxLang applications?

Configure dependency injection mappings using a binder configuration and mapping DSL to register aliases, component paths, directories, and factory methods for consistent object resolution. This centralizes object wiring and lifecycle management across your application.

How do I prevent scope-widening issues when injecting transient objects into singletons?

Prevent scope-widening issues using the Provider pattern to resolve dependencies lazily at runtime instead of direct injection. Providers retrieve fresh instances on demand, avoiding stale references and maintaining proper lifecycle boundaries.

Can I hydrate components from structs, JSON, or XML data structures?

Yes, hydrate components from structs, JSON, XML, or queries using the object populator feature. It automatically populates structured data into target objects, simplifying data binding and reducing manual property assignment code.

Does WireBox dependency injection work outside of a ColdBox application?

Yes, WireBox functions as a standalone dependency injection framework for CFML and BoxLang applications. You can bootstrap an injector, define binders, and manage persistence scopes independently without requiring the full ColdBox MVC framework.

What is the best way to isolate dependency injection configurations for different application modules?

Isolate dependency injection configurations using child injectors, which provide separate mapping contexts within a parent injector hierarchy. This enables modular architecture by allowing independent binder configurations while maintaining controlled access to shared mappings.

How do I resolve instances and autowire dependencies at runtime?

Resolve instances and autowire dependencies at runtime using the getInstance and autowire runtime methods. These methods retrieve configured objects from the injector and automatically inject required dependencies without manual object construction.