npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@a-company/atelier

v0.29.0

Published

CLI tool — validate, preview, render, info commands

Readme


title: "@atelier/cli" scope: CLI tool — validate, info, still commands for .atelier files packages: ["@atelier/cli"] related: ["docs/getting-started.md", "packages/schema/README.md", "packages/core/README.md"]

@atelier/cli

CLI tool for working with .atelier animation files. Validates documents, displays summaries, and resolves individual frames for inspection.

| | | |---|---| | Version | 0.1.0 | | Binary | atelier (maps to ./dist/cli.js) | | Build | tsup (ESM + CJS + DTS) | | Source | packages/cli/src/ |

Dependencies

| Package | Source | |---|---| | @atelier/types | workspace | | @atelier/schema | workspace | | @atelier/core | workspace | | @atelier/canvas | workspace | | commander | ^13.0.0 |

Installation

# From monorepo root
pnpm build

# Then use directly
npx atelier validate my-animation.atelier

# Or link globally
cd packages/cli && pnpm link --global
atelier validate my-animation.atelier

Commands

atelier validate <file>

Validates an .atelier YAML file through three checks:

  1. YAML syntax -- the file must be parseable YAML.
  2. Zod schema validation -- all types and structure must conform to the @atelier/schema definitions.
  3. Delta overlap detection -- detects when two deltas target the same layer and property with overlapping frame ranges.

On success, prints Valid and exits with code 0. On failure, prints Validation errors: followed by a bulleted list and exits with code 1.

$ atelier validate animation.atelier
Valid

$ atelier validate broken.atelier
Validation errors:
  - State "intro": Overlapping deltas on layer "title", property "opacity" ...

Source: packages/cli/src/commands/validate.ts

atelier info <file>

Parses an .atelier file and displays a human-readable summary of its contents: document metadata, canvas settings, layers, states, and preset counts.

$ atelier info animation.atelier
Name: My Animation
Description: A cool animation
Canvas: 800x600 @ 60fps, background: #1a1a2e
Layers: 4
  - bg (shape)
  - title (text)
  - circle (shape)
  - box (shape)
States: 1
  - intro: 180 frames, 7 deltas
Presets: 2

Source: packages/cli/src/commands/info.ts

atelier still <file> [options]

Resolves a single frame of a document and outputs the computed layer states as JSON. This lets you inspect the exact property values at any point in an animation without rendering it.

Options:

| Flag | Description | Default | |---|---|---| | -s, --state <name> | State name to resolve | First state in the document | | -f, --frame <number> | Frame number to resolve | 0 |

$ atelier still animation.atelier --state intro --frame 30
{
  "frame": 30,
  "stateName": "intro",
  "layers": [
    {
      "id": "bg",
      "layer": { ... },
      "computedProperties": {}
    },
    {
      "id": "title",
      "layer": { ... },
      "computedProperties": {
        "opacity": 1,
        "scale.x": 0.95
      }
    }
  ]
}

Source: packages/cli/src/commands/still.ts

Programmatic API

All three commands export functions that can be imported directly, independent of the CLI entry point.

validateFile(filePath: string)

Reads and validates an .atelier file. Returns a result object without printing to stdout or calling process.exit.

import { validateFile } from "@atelier/cli";

const { valid, errors } = validateFile("animation.atelier");
if (!valid) {
  console.error(errors);
}

Returns: { valid: boolean; errors: string[] }

getInfo(doc: AtelierDocument)

Extracts a structured summary from a parsed AtelierDocument.

import { getInfo } from "@atelier/cli";
import type { DocumentInfo } from "@atelier/cli";

const info: DocumentInfo = getInfo(doc);
console.log(`${info.layers.count} layers, ${info.states.count} states`);

resolveStill(doc, stateName?, frame?)

Resolves a single frame, returning all layers with their computed property values.

import { resolveStill } from "@atelier/cli";

const resolved = resolveStill(doc, "intro", 30);
for (const layer of resolved.layers) {
  console.log(layer.id, layer.computedProperties);
}

Parameters:

| Parameter | Type | Default | |---|---|---| | doc | AtelierDocument | (required) | | stateName | string | First state in the document | | frame | number | 0 |

Returns: ResolvedFrame (from @atelier/core)

Throws if the document has no states or the specified state name does not exist.

Types

DocumentInfo

Returned by getInfo. Contains the structured summary of a document.

interface DocumentInfo {
  name: string;
  description?: string;
  canvas: {
    width: number;
    height: number;
    fps: number;
    background?: string;
  };
  layers: {
    count: number;
    items: { id: string; type: string }[];
  };
  states: {
    count: number;
    items: { name: string; duration: number; deltaCount: number }[];
  };
  presets: {
    count: number;
  };
}

ResolvedFrame / ResolvedLayer

Returned by resolveStill. Re-exported from @atelier/core.

interface ResolvedFrame {
  frame: number;
  stateName: string;
  layers: ResolvedLayer[];
}

interface ResolvedLayer {
  id: string;
  layer: Layer;
  computedProperties: Partial<Record<AnimatableProperty, unknown>>;
}

Development

# Build
pnpm --filter @atelier/cli build

# Type-check
pnpm --filter @atelier/cli typecheck

# Run tests
pnpm --filter @atelier/cli test

# Clean build artifacts
pnpm --filter @atelier/cli clean