AtomForge developer tooling illustration

AtomForge utilities · Everyday development

Small tools. Clear responsibilities.

Not every problem needs a framework. These focused packages cover configuration, date presentation, component typing, release preparation and server output—the recurring tasks that benefit from a consistent approach without taking over your application.

env-reader date-format svelte-helpers ship expose TypeScript

What it is

Five packages, five deliberately narrow jobs.

@atom-forge/env-reader reads, parses and validates environment variables into application configuration. @atom-forge/date-format formats dates with tokens backed by Intl.DateTimeFormat. @atom-forge/svelte-helpers supplies shared types and utilities for Svelte 5 components. @atom-forge/ship prepares versioned Git releases for CI-driven npm publishing. @atom-forge/expose lets server data reach the client only through views that name each field.

Use the package that solves your immediate problem. These helpers complement the larger architecture and UI tools; adopting them does not mean adopting the rest of the ecosystem.

Why choose Utilities?

Discover configuration problems early

Env-reader supplies string, integer, boolean, enum-like and URL parsers. Reading required values during startup lets missing or invalid configuration fail before the application accepts work.

Let Intl handle date presentation

Date-format combines a small token interface with the runtime’s native locale and timezone support. It is for presenting dates, not building a date arithmetic engine.

Give component props a shared vocabulary

Svelte-helpers includes types such as ClassProp, ChildrenProp, XOR and AtLeastOne for reusable component contracts and intentional prop combinations.

Prepare predictable releases

Ship updates the package version and changelog, creates a release commit and tag, and pushes both atomically. CI owns verification and registry publishing.

Send only what you name

Expose turns server output into an allow-list: a field reaches the client only when a view names it, and the output type matches exactly.

How it works

  1. Read configuration at the boundary

    Define required values and defaults explicitly when the application starts. Do not ship server secrets into browser-visible configuration.

  2. Format where you present data

    Choose the output tokens, locale and timezone deliberately. Keep storage and calculations separate from display formatting.

  3. Describe component contracts

    Use helper types alongside Svelte and HTML types to express supported props. Check examples against the package version you install.

  4. Review the release before pushing

    Use Ship’s dry-run plan before preparing the release. Check CI and the exact published npm version after the tag is pushed.

An honest fit check

Trade-offs, not fine print

Environment definitions are manual

Env-reader does not infer an entire typed configuration from a .env file. You maintain the configuration object, parsing choices and defaults.

Formatting is not date mathematics

Date-format is not intended for adding days, comparing intervals or modelling complex calendar rules. Intl output can also vary with locale and runtime data.

Svelte helpers target Svelte 5

Snippet and rune-oriented component helpers are not a drop-in solution for older Svelte projects. Type-level constraints do not validate runtime input.

In practice

Parse configuration once

Adapted from the env-reader text. Supply your application’s environment-file directory; the default pool size is a policy choice, not a universal recommendation.

Explore Env Reader
TypeScript · Illustrative · adapted from the source texts; package API not verified here
import { EnvReader, asReadonly } from '@atom-forge/env-reader';

export function readConfig(envDirectory: string) {
  const env = new EnvReader(envDirectory);
  return asReadonly({
    environment: env.oneOf('APP_ENV', ['dev', 'prod', 'test'], 'prod'),
    database: {
      connectionString: env.string('DATABASE_URL'),
      maxPool: env.int('DB_POOL_MAX', 20),
    },
  });
}

Make locale and timezone explicit

The date-format source uses % tokens, not Moment-style YYYY tokens. This example fixes the input date and timezone rather than depending on the reader’s local clock.

Explore Date Format
TypeScript · Illustrative · adapted from the source texts; package API not verified here
import { dateFormat } from '@atom-forge/date-format';

const instant = new Date('2026-04-07T06:05:00Z');
dateFormat('%Y-%M-%D', instant, 'en-GB', 'Europe/Budapest');
dateFormat('%H:%I', instant, 'en-GB', 'Europe/Budapest');

Require at least one field

An illustrative type contract using AtLeastOne, one of the utility types named in the source. Verify the generic signature against your installed version.

Explore Svelte Helpers
TypeScript · Illustrative · adapted from the source texts; package API not verified here
import type { AtLeastOne } from '@atom-forge/svelte-helpers';

type Contact = AtLeastOne<{
  email: string;
  phone: string;
}>;

Preview a release

After installing and configuring Ship, inspect the release plan without changing release files, committing, tagging or pushing. Dry runs can still read Git and registry metadata.

Explore Ship
Shell · Illustrative · adapted from the source texts; package API not verified here
npm exec -- ship-it patch --dry-run

Keep new columns on the server

From the Expose documentation. Only the fields a view names go out; passwordHash is neither in the result nor on its type.

Explore Expose
TypeScript · Illustrative · adapted from the source texts; package API not verified here
import { expose, fieldsOf } from '@atom-forge/expose';

const fields = fieldsOf<{ id: string; name: string; email: string }>();
const row = { id: 'u1', name: 'Ada', email: 'ada@example.com', passwordHash: 'secret' };

expose(row, fields('id', 'name'));
// { id: 'u1', name: 'Ada' }