bun Tools

Exhaustive reference for the TypeScript tools shipped under ~/.claude/DOS/Tools/ and how to invoke them.

Bun Tools are standalone TypeScript executables living at ~/.claude/DOS/Tools/. Every file starts with #!/usr/bin/env bun and runs directly under Bun — composed from skills, hooks, other tools, or straight from the shell.

Invocation pattern
$ bun ~/.claude/DOS/Tools/<Tool>.ts [args]

Inference.ts

The most-invoked tool in the set. A unified wrapper over the Claude CLI with three preset run tiers — skills call into it whenever they need a model response without writing their own spawn glue. Billing flows through the Claude CLI subscription, not an API key.

Classify a message with Haiku
$ bun ~/.claude/DOS/Tools/Inference.ts --level fast --json "You are a classifier." "Is this spam? Buy now!"

Per-tier defaults from LEVEL_CONFIG in Inference.ts:

LevelModelTimeoutUse case
fasthaiku15,000 msQuick tasks, simple generation, classification.
standardsonnet30,000 msBalanced reasoning, typical analysis.
smartopus90,000 msDeep reasoning, strategic decisions.

The tool also exports inference(options) returning an InferenceResult so other tools can import it directly.

import { inference } from "~/.claude/DOS/Tools/Inference";

const result = await inference({
  systemPrompt: "You are a classifier.",
  userPrompt: "Is this spam? ...",
  level: "fast",
  expectJson: true,
});

doctor.ts

Comprehensive health check for ~/.claude/. Complements the faster durante doctor CLI subcommand. Validates binaries on PATH (bun, claude, git, curl), critical directories, settings.json parseability and dos.version, skill counts vs settings.counts, hook handler readability, MCP config JSON validity, identity pack presence, and voice server reachability on localhost:8888. Then it runs the dependency tier check from dos-doctor.ts. Exits 1 if critical checks or Tier 1 dependencies fail.

dos-doctor.ts

Library of dependency definitions (DEPS) plus checkAll and printResults helpers used by doctor.ts. Import it from other tools to surface pack-specific dependency status (ffmpeg, fabric, security suite). Not typically run standalone.

dos.ts

Launcher the dos command resolves to inside a DOS install. Boots the installed DOS environment and hands off to Claude Code.

Banner.ts, BannerMatrix.ts, BannerNeofetch.ts, BannerRetro.ts, BannerTokyo.ts, BannerPrototypes.ts, NeofetchBanner.ts, DOSLogo.ts. Banner.ts is the dynamic neofetch banner that picks a layout based on terminal width — wide terminals get Navy / Electric / Teal / Ice themes; narrow terminals get Minimal / Vertical / Wrapping layouts. The rest are individual styles the selector samples from. DOSLogo.ts prints the pure DOS logo without system metadata.

GetCounts.ts

Single source of truth for the system counts shown in the banner and statusline.

Three output shapes
$ bun ~/.claude/DOS/Tools/GetCounts.ts # JSONbun ~/.claude/DOS/Tools/GetCounts.ts --shell # shell-sourceable exportsbun ~/.claude/DOS/Tools/GetCounts.ts --single skills

Counts: skills (dirs with SKILL.md), workflows (.md under Workflows/), hooks (.ts under hooks/), signals (.md under MEMORY/LEARNING/), files (everything under DOS/USER/), work (dirs under MEMORY/WORK/), research (.md + .json under MEMORY/RESEARCH/).

SecretScan.ts

TruffleHog-backed secret scanner. Detects 700+ credential types via entropy plus pattern matching.

Scan a directory
$ bun ~/.claude/DOS/Tools/SecretScan.ts ./src --verify --json

BuildCLAUDE.ts, RebuildDOS.ts, IntegrityMaintenance.ts

Build-side utilities. BuildCLAUDE.ts assembles the active CLAUDE.md from its modular sources. RebuildDOS.ts regenerates derived state across ~/.claude/. IntegrityMaintenance.ts runs periodic integrity passes on the tree.

LoadSkillConfig.ts, FeatureRegistry.ts, FailureCapture.ts, OpinionTracker.ts

Runtime helpers that hooks and skills call into. LoadSkillConfig.ts resolves skill configuration from disk. FeatureRegistry.ts exposes the list of installed feature deliveries. FailureCapture.ts serializes failures into the reflections log. OpinionTracker.ts records per-session preferences.

MemoryHygiene.ts, mempalace_bridge.py

Memory subsystem support. MemoryHygiene.ts enforces the memory directory layout and cleans stale artifacts. mempalace_bridge.py is the Python bridge used by the MemPalace MCP server.

PipelineMonitor.ts, PipelineOrchestrator.ts, pipeline-monitor-ui/

Content pipeline observability. PipelineOrchestrator.ts drives multi-stage content jobs. PipelineMonitor.ts exposes their state to the bundled UI under pipeline-monitor-ui/.

Transcription toolchain

ExtractTranscript.ts, extract-transcript.py, SplitAndTranscribe.ts, GetTranscript.ts, TranscriptParser.ts, ActivityParser.ts. Used by the ContentAnalysis pack.

Common transcription calls
$ bun ~/.claude/DOS/Tools/ExtractTranscript.ts audio.m4abun ~/.claude/DOS/Tools/ExtractTranscript.ts video.mp4 --format srtbun ~/.claude/DOS/Tools/ExtractTranscript.ts ~/Podcasts/ --batch

ExtractTranscript.ts wraps the OpenAI Whisper API. SplitAndTranscribe.ts chunks long files before handing them off. GetTranscript.ts fetches a transcript from a remote source. TranscriptParser.ts and ActivityParser.ts turn raw transcripts into structured activity timelines.

Wisdom pipeline

WisdomDomainClassifier.ts, WisdomFrameUpdater.ts, WisdomCrossFrameSynthesizer.ts, LearningPatternSynthesis.ts. Classify a note by domain, update the running wisdom frame, synthesize cross-frame patterns into long-term learnings.

YouTubeApi.ts, SessionHarvester.ts, SessionProgress.ts

External data ingestion. YouTubeApi.ts is a thin wrapper around the YouTube Data API. SessionHarvester.ts extracts context from prior Claude Code sessions. SessionProgress.ts summarizes current session progress.

PreviewMarkdown.ts

Render a markdown file into a temp HTML file and open it in the browser.

Preview a markdown file
$ bun ~/.claude/DOS/Tools/PreviewMarkdown.ts path/to/file.md

RelationshipReflect.ts

Generate a relationship reflection note from a conversation snippet. Used by the Telos pack's interview workflow.

RemoveBg.ts, AddBg.ts

Media-pack image utilities — background removal and background swap. Invoked by the Media pack's Art tools.

AlgorithmPhaseReport.ts, algorithm.ts

Algorithm phase instrumentation. algorithm.ts exposes the phase state machine to hooks. AlgorithmPhaseReport.ts emits a per-phase report used by the activity dashboard.

migrate-wings.py

One-shot Python migration for the wings subsystem. Not part of runtime — only invoked during upgrades.

Tools directory is canonical

Many of these tools also live in their pack's src/Lib/. The copies under ~/.claude/DOS/Tools/ are the ones DOS runs. Treat the Tools directory as the canonical runtime location and packs as the distributable source.

Was this page helpful?