Skip to content

πŸ” Climonad aims to redefine scalability and structure in CLI development, making next-generation command-line interfaces a reality. 🎯

License

Notifications You must be signed in to change notification settings

supitsdu/climonad.js

Repository files navigation

climonad.js

Next-Gen CLI framework

NPM License


Overview

climonad.js is a feature-rich framework for building structured and maintainable command-line tools.

Warning

This library is in early development, and APIs may change.

Key Features:

  • 🌳 Hierarchical Commands: Build nested commands and subcommands effortlessly.
  • πŸ› οΈ Powerful Flag Parsing: Manage flags with defaults, requirements, and validation.
  • πŸ“‹ Custom Usage Messages: Provide clear and tailored help text for every command.
  • πŸ—‚οΈ Scoped Management: Separate global and local flags for better organization.

Installation

Install via npm:

npm install climonad

Quick Example

Here’s a simple CLI configuration:

const app = cli({
  name: "cli",
  description: "A simple CLI",

  flags: [str({ name: "config", alias: "c", description: "Config file", required: true })],

  commands: [
    cmd({
      name: "init",
      description: "Initialize a new project",
      flags: [str({ name: "name", description: "Project name", required: true })],
      action: async ({ flags }) => {
        console.log("Initializing project:", flags.get("name"))
        console.log("Using config file:", flags.get("config"))
      },
    }),
  ],
})

app.run(process.argv)

Run your CLI:

node cli init --name my-project -c config.json

Output:

Initializing project: my-project
Using config file: config.json

Learn More


License

This project is licensed under the MIT License.

About

πŸ” Climonad aims to redefine scalability and structure in CLI development, making next-generation command-line interfaces a reality. 🎯

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published