There are three ways to use a module — pick the one that fits your project.
Use a package manager to install typescript-bits and import modules from node_modules. Best for projects that already use npm/yarn/pnpm/bun.
Then import the module by name:
import { atom, type Atom } from "typescript-bits/atom";Copy a module into your project as an editable source file via the CLI. Dependencies are resolved and bundled automatically. Best when you want to own and modify the code.
Files are written to src/lib/bits/ by default. Use --path to customize. Run without arguments for an interactive picker. Press A to toggle all modules.
Then import from the local path:
import { atom, type Atom } from "../lib/bits/atom";To set a persistent custom path, add a components.json to your project:
{ "aliases": { "bits": "src/lib/bits" } }The CLI reads the aliases.bits value and uses it as the default output path.
Navigate to any module page, switch to Copy Source view, and copy the highlighted code directly. No install or CLI needed — best for quick experiments or one-off use.
Usage is shown inline without any import — the code is yours:
const ok = Result.ok(10);
console.log(ok.value); // 10Agent skills extend AI coding agents (OpenCode, Codex, Claude Code, and 50+ others) with project-specific knowledge. Install via the skills CLI:
npx skills add m10rten/typescript-bitsThis installs all available skills. To install a single skill, append --skill <skill-name>. See all skills on the Skills overview page.
Skills are auto-discovered from the skills/ directory — no configuration needed. Each skill is a SKILL.md file with YAML frontmatter.
"type": "module")..d.ts declarations.