arkynChangelogGuides
docs / templates / introduction

Introduction to templates

The @arkyn/templates package is a companion library that provides a set of ready-to-use data structures and constants designed to streamline the development of features that rely on standardized information, such as country lists or currency settings.
Instead of recreating these structures in each project, @arkyn/templates offers a centralized and well-organized source, saving time and ensuring consistency.

Installation

To start using the package in your project, install it using your preferred package manager:

bash

bun add @arkyn/templates

Overview

The package consists of modules that export useful data for various purposes:
  • countries: Provides a complete list of countries, including name, dialing code, ISO code, flag URL, and formatting mask for phone numbers. Ideal for country selectors and contact forms.
  • countryCurrencies: Provides a mapping of currency codes to locale settings, making it easier to format monetary values ​​according to each country's conventions.
  • brazilianStates: Provides a complete list of Brazil's 26 states plus the Federal District, each with a label and value. See Brazilian States.
  • maximumFractionDigits: A numeric constant meant to pair with countryCurrencies when formatting values with Intl.NumberFormat, ensuring a consistent number of decimal places. See Currencies by Country.
Browse the side menu to explore detailed documentation for each template and see examples of how to integrate them into your application.

Using with AI coding assistants

@arkyn/templates ships its own AGENTS.md file inside the published package (available at node_modules/@arkyn/templates/AGENTS.md after install), a reference written specifically for AI coding assistants like Claude Code, Cursor, or Copilot. It documents the shape of each exported data structure, so your assistant doesn't need to read the source to use it correctly.
Run @arkyn/cli once in your project to link it in:

bash

npx @arkyn/cli init --agents
This writes a marked block into your project's AGENTS.md pointing at @arkyn/templates' bundled docs (and those of any other installed @arkyn/* package). Rerun it whenever you add or remove Arkyn packages. See the @arkyn/cli introduction for details.
On this page
    arkyn