Skip to content
This repository has been archived by the owner on Feb 21, 2025. It is now read-only.

Latest commit

 

History

History
51 lines (37 loc) · 1.1 KB

README.md

File metadata and controls

51 lines (37 loc) · 1.1 KB


The Jule CLI Library

A Jule library for creating command-line interfaces.

Usage | Examples | Donate

Usage

To install the library, follow the steps below:

  1. Download the library package from the releases page
  2. Extract the package
  3. Include the extracted directory in your project's source (don't forget to run julec mod init)

Example usage of the library:

use "cliq"

fn main() {
	mut cliq := cliq::Builder{
		Args: {
			// flag: default value (type)
			"ping": false,
			"message": "",
		},
	}.Help().Build()

	cliq.GetCLI()
	cliq.Parse()

	ping := cliq.Get("ping")       // bool due to the default value
	message := cliq.Get("message") // str due to the default value

	if ping == true {
		print("pong! ")
		println(message)
	}
}

See the examples directory for more examples.

License

The extension is distributed under the terms of the BSD 3-Clause license.
See License Details