Skip to main content
This page covers: CLI binary usage, subpath export map, TypeScript compiler options, Bun preload and test config, and npm scripts.

Binary

Use bunx smthrs <command> for CLI commands. The repository root keeps a private development bin that points at apps/cli/src/index.js; application code should import from the package exports below.

Subpath Exports

Use the subpath form to import only the surface you need. Entry files in this table are relative to the published smthrs package; in the repository they live under packages/smithers/. The PI plugin is published as the separate @smthrs/pi-plugin package. The old smthrs/pi-plugin and smthrs/pi-extension subpaths are no longer exported.

Workspace Packages

Most applications should import from smthrs. The workspace packages below are listed for advanced integrations, custom clients, framework development, and monorepo orientation. This table is a repository map, not the core feature inventory. Private apps and examples are implementation consumers and are not published Smithers features. See Feature inventory for the core product boundary.

Usage

TypeScript Configuration

JSX Import Source

This tells TypeScript to resolve JSX transforms from smthrs/jsx-runtime instead of react/jsx-runtime. The Smithers JSX runtime re-exports React’s runtime, so component behavior is identical. This setting enables proper type resolution for Smithers workflow components. See JSX Installation for the complete TypeScript setup.

Path Aliases

When developing inside the smthrs monorepo, the root tsconfig.json defines path aliases so source imports resolve without a build step:
The root package is a private smithers-monorepo; smthrs resolves to packages/smithers. End users do not need path aliases, only framework developers do. Installing smthrs as a dependency lets Node/Bun module resolution handle import paths automatically.

Local Type Root Shims

The ./packages/smithers/src/types directory contains ambient type declarations that fill gaps in third-party packages. One shim ships today:
  • react-dom-server.d.ts — Declares the react-dom/server module so TypeScript doesn’t error when server-side rendering types are referenced.
End users should add @types/react-dom to devDependencies instead of relying on this shim.

Bun Configuration

Runtime Preload

The preload script registers the MDX esbuild plugin with Bun’s bundler so .mdx files can be imported as JSX components at runtime. See MDX Prompts for details.

Test Configuration

The test preload is separate from the runtime preload. Both point to the same file, but Bun’s [test] section only applies when running bun test. Without it, tests that import .mdx files fail with a module resolution error.

npm Scripts

Defined in the root package.json for development:

For end-user projects

When scaffolding your own project (with bunx smthrs init or manually), add a typecheck script:
See Production Project Structure for a complete user-project package.json example.