Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/Aquaticat/Monochromatic. TypeScript and Rust monorepo: Claude Code and Pi coding-agent plugins, a m
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536/** Token counting for Claude models using the Anthropic API. Wraps the Anthropic `messages.countTokens` endpoint into a minimal library with file-reading conveniences and an optique-based CLI. @example ```ts import { countTokens } from '@monochromatic-dev/module-token-count'; const result = await countTokens({ content: 'Hello, world!' }); console.log(result.inputTokens); ``` @example ```ts import { countFileTokens } from '@monochromatic-dev/module-token-count'; const result = await countFileTokens({ filePath: './CLAUDE.md' }); console.log(`${result.filePath}: ${result.inputTokens} tokens`); ``` @packageDocumentation */
export { countFileTokens, countTokens, DEFAULT_MODEL,} from './client.ts';export type { CountTokensConfig, FileTokenCountResult, TokenCountResult,} from './types.ts';