chile-kit
The toolkit for building software in Chile: RUT, pesos, IVA, regions and communes, banks, UF/UTM and Santiago dates. Typed, zero dependencies, with an MCP server for AI agents.
Get started Explore 346 communes MCP for agents Buy me a coffee on Ko-fi
- Agent-readyAn MCP server with 13 tools and an llms.txt, so Claude, Cursor and friends get Chile right.
- Zero dependenciesAbout 270 bytes for
formatRut. Tree-shakeable subpaths,sideEffects: false. - Same bytes everywhereServer, browser and Edge print identical strings: no hydration mismatch.
Install
npm install chile-kit
pnpm add chile-kit
yarn add chile-kit
bun add chile-kit
For AI agents
Give Claude, Cursor or any MCP client Chilean superpowers with one command. See MCP server.
claude mcp add chile-kit -- npx -y chile-kit-mcp
Agents reading docs can start at llms.txt.
Quick start
import { isValidRut, formatRut } from "chile-kit/rut";
import { formatCLP } from "chile-kit/clp";
import { splitGross } from "chile-kit/iva";
import { findCommune } from "chile-kit/regions";
import { formatChileDateTime } from "chile-kit/date";
isValidRut("12.345.678-5"); // true
formatRut("123456785"); // "12.345.678-5"
formatCLP(1234567); // "$1.234.567"
splitGross(9990); // { net: 8395, iva: 1595, gross: 9990 }
findCommune("nunoa")?.code; // "13120"
formatChileDateTime(new Date()); // "04-12-2026 14:05" (Santiago time, on any server)
Modules
- /rutValidate, normalize and format RUTs.
- /clpChilean pesos, hydration-safe.
- /iva19% IVA, invoice totals, SII rounding.
- /phoneMobiles to E.164 and back.
- /waWhatsApp wa.me links.
- /nameTitle-case person names.
- /dateAmerica/Santiago formatting.
- /regions16 regions, 346 communes, CUT codes.
- /banksBank codes for transfers.
- /indicatorsUF, UTM, dólar, euro.
Design principles
- Zero runtime dependencies. Nothing to audit, nothing to update.
- Runs everywhere. No Node-only APIs: Node, browsers, Next.js Server and Client Components, Edge.
- Tree-shakeable. One subpath per module and
sideEffects: false; importingformatRutcosts about 270 bytes. - Same output on server and client. Formatting never depends on the runtime's ICU data or time zone.
- Official data. CUT codes from Decreto 1115 (2018), bank codes from the CMF.
En español
Utilidades chilenas para TypeScript y agentes de IA: validar RUT y dígito verificador, formatear pesos chilenos, calcular IVA, lista de regiones y comunas de Chile con código CUT, valor UF, UTM y dólar hoy, códigos de bancos y fechas en hora de Santiago.