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

@aml-jsx/cli

v0.3.3

Published

Execute trusted Agent Markup Language TypeScript, TSX, and JavaScript workflows directly.

Readme

@aml-jsx/cli

aml executes trusted Agent Markup Language TypeScript, TSX, and JavaScript workflow files without application glue. The package is experimental: its command and module-export contracts may change before they are declared stable.

Install

Install the CLI beside the SDK used by your workflow:

npm install @aml-jsx/sdk
npm install --save-dev @aml-jsx/cli

Configure AML as the JSX runtime in tsconfig.json:

{
  "compilerOptions": {
    "jsx": "react-jsx",
    "jsxImportSource": "@aml-jsx/sdk"
  }
}

Node.js 26 and npm 11 are the supported minimums.

Run a workflow

npx aml run ./workflow.tsx
import { Agent } from "@aml-jsx/sdk"
import { DeterministicAgentProvider } from "@aml-jsx/sdk/testing"

const provider = new DeterministicAgentProvider({
  name: "cli-example",
  respond: request => ({ text: `Reviewed: ${request.prompt}` }),
})

export default <Agent provider={provider}>README.md</Agent>

This credential-free workflow prints Reviewed: README.md. Replace the deterministic provider with a supported live Agent provider when the workflow is ready to call a model.

The workflow owns providers, models, credentials, Sandboxes, and Workspaces. The CLI stays provider-neutral and owns source loading, environment loading, runtime execution, diagnostics, and output formatting.

Export the AML tree itself. Creating and evaluating another AmlRuntime inside the exported function starts a nested run outside the CLI's tracing, cancellation, and runtime ownership.

Export contract

aml run resolves one exported AML value:

  1. the export selected by --entry;
  2. otherwise the default export;
  3. otherwise an exported main() function.

The selected value may be an AML renderable or a zero-argument function or promise resolving to one.

Command reference

aml run <workflowFile> [options]

-e, --entry <name>          Select a named export
--runtime-env-file <file>   Apply an explicit env file last
--trace                     Write metadata-only trace events to stderr
--capture-content           Include sensitive content in trace output; implies --trace
--json                      Write a JSON success envelope to stdout
-h, --help                  Show command help
-v, --version               Show CLI, platform, and Node versions

Workflow results are the only content written to stdout. Lifecycle logs, traces, and errors go to stderr, so ordinary output remains safe to pipe.

Environment loading

Before importing the workflow, the CLI loads these files from its directory using NODE_ENV, or development when it is absent:

.env
.env.local
.env.<mode>
.env.<mode>.local

Existing process variables win. --runtime-env-file is parsed last and explicitly overrides both process and Vite env values. Relative override paths are resolved from the current working directory first, then from the workflow directory.

Source execution

The CLI has one source-execution path: Vite and vite-node. It starts a one-shot Vite transform environment, runs the trusted module, and closes the environment before evaluating the selected AML value. There is intentionally no compiler-selection flag.

Workflow modules execute as trusted code in the CLI process. An unsandboxed <Script /> runs as a trusted host process from the CLI working directory, and its optional relative cwd resolves from that directory. An AML <Sandbox /> constrains its descendants; it does not sandbox top-level JavaScript in the workflow module.

Read the complete CLI guide for named exports, environment precedence, JSON output, tracing, and the runtime ownership boundary.