AtomForge utilities · Everyday development
Not every problem needs a framework. These focused packages cover configuration, date presentation, component typing and release preparation—the recurring tasks that benefit from a consistent approach without taking over your application.
What it is
@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.
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.
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.
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.
Svelte-helpers includes types such as ClassProp, ChildrenProp, XOR and AtLeastOne for reusable component contracts and intentional prop combinations.
Ship updates the package version and changelog, creates a release commit and tag, and pushes both atomically. CI owns verification and registry publishing.
Define required values and defaults explicitly when the application starts. Do not ship server secrets into browser-visible configuration.
Choose the output tokens, locale and timezone deliberately. Keep storage and calculations separate from display formatting.
Use helper types alongside Svelte and HTML types to express supported props. Check examples against the package version you install.
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
Env-reader does not infer an entire typed configuration from a .env file. You maintain the configuration object, parsing choices and defaults.
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.
Snippet and rune-oriented component helpers are not a drop-in solution for older Svelte projects. Type-level constraints do not validate runtime input.
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.
Read the Env Reader documentationimport { 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),
},
});
}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.
Read the Date Format documentationimport { 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');An illustrative type contract using AtLeastOne, one of the utility types named in the source. Verify the generic signature against your installed version.
Read the Svelte Helpers documentationimport type { AtLeastOne } from '@atom-forge/svelte-helpers';
type Contact = AtLeastOne<{
email: string;
phone: string;
}>;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.
Read the Ship documentationnpm exec -- ship-it patch --dry-run