Developer tools for inspecting Awilixify module graphs, routes, traces, and provider impact.
The awilixify-devtools npm package runs alongside an observed application and
exposes a DevTools API. It does not serve or contain the UI.
pnpm add -D awilixify-devtoolsRegister DevtoolsModule as a global module in development:
import { DIContext } from "awilixify";
import { AppModule } from "./app.module.js";
const devtoolsModule =
process.env.NODE_ENV === "development"
? (await import("awilixify-devtools")).DevtoolsModule()
: undefined;
const app = DIContext.create(AppModule, {
globalModules: devtoolsModule ? [devtoolsModule] : [],
});
await app.init();The DevTools API listens on http://127.0.0.1:3221 by default. Its endpoints
are mounted under /__devtools, and its OpenAPI documentation is available at
/api-docs.
DevtoolsModule({
host: "0.0.0.0",
port: 3221,
appUrl: "http://127.0.0.1:3000",
traceHistoryFile: ".awilixify-devtools/traces.json",
});hostdefaults to127.0.0.1. Use0.0.0.0when the UI container must reach the API through the host.portdefaults to3221.appUrlproxies non-DevTools requests to the observed application.traceHistoryFiledefaults to.awilixify-devtools/traces.json. Set it tofalseto keep traces in memory.
The API exposes application structure and invocation capabilities. Keep it disabled in production and do not expose it to untrusted networks.
The web interface is distributed independently as
ghcr.io/wildstyles/awilixify-devtools-ui. See the
DevTools UI documentation
for Docker Compose and local development instructions.
Install dependencies:
pnpm installRun the checks:
pnpm lint
pnpm check-types
pnpm build