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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@yantrix/cli

v0.0.2

Published

Yantrix framework command line tools

Downloads

152

Readme

@yantrix/cli

Yantrix is a (mostly) TypeScript framework and a DSL, that make up a full instrumental chain to implement robust and self-documented functional applications by code generation in multiple programming languages.

Command-line interface for Yantrix framework. This package is a console wrapper for certain Yantrix tooling, most notably code generation

📖 Usage

Install both @yantrix/cli and @yantrix/codegen using your prefered package manager. All the secondary dependencies will be installed automatically.

# Via NPM
$ npm install @yantrix/codegen @yantrix/cli

# Via Yarn
$ yarn add @yantrix/codegen @yantrix/cli

# Via PNPM
$ pnpm install @yantrix/codegen @yantrix/cli

# ✨ Auto-detection
$ npx nypm install @yantrix/codegen @yantrix/cli

We suggest using pnpm

To get help on the codegen command, run:

yantrix codegen -h

It will print the following:

yantrix codegen [diagramFile]

Generates Automata from given mermaid state diagram

Positionals:
  diagramFile  Diagram file to be parsed. It should have .mermaid extension
                                                                        [string]

Options:
  -l, --language      Output file language. Currently supported: javascript, typ
                      escript, python, java                             [string]
  -o, --outfile       Output Automata file path                         [string]
  -c, --className     Name of the generated Automata class              [string]
  -j, --constants     Stringified JSON with constants to be used in generated Au
                      tomata                                            [string]
  -J, --constantFile  Path to JSON file with constants to be used in generated A
                      utomata                                           [string]
  -e, --eval          Evaluate the given state diagram                  [string]
      --verbose       Verbose mode                                     [boolean]
  -i, --interactive   Enter interactive mode                           [boolean]
  -h, --help          Show help                                        [boolean]
  -v, --version       Show version number                              [boolean]

For quick start, let's generate a simple Automata from a diagram saved in a file diagram.mermaid:

stateDiagram-v2
    [*] --> First: reset
    First --> Second: event1
    Second --> Third: event2

Just run:

$ yantrix codegen ./diagram.mermaid -o ./automata.ts -c MyAutomata -l typescript'

This will generate a file automata.ts. But that's not all - since we generated in Typescript, we should also install a couple of dependencies, that Automata depends on:

# Via NPM
$ npm install @yantrix/automata @yantrix/functions

# Via Yarn
$ yarn add @yantrix/automata @yantrix/functions

# Via PNPM
$ pnpm install @yantrix/automata @yantrix/functions

# ✨ Auto-detection
$ npx nypm install @yantrix/automata @yantrix/functions

In any case, this will be reported during the generation process, like this:

Since you have chosen the *-script language, you need to install additional packages to work with the generated Automata:
	- @yantrix/automata
	- @yantrix/functions

For more information, see also:

🌱 Contributing

📜 License

Made with 💜. Published under MIT License.