https://github.com/adamperkowski/cliq
The Jule CLI Library [WIP]
https://github.com/adamperkowski/cliq
cli jule julelang library
Last synced: 8 months ago
JSON representation
The Jule CLI Library [WIP]
- Host: GitHub
- URL: https://github.com/adamperkowski/cliq
- Owner: adamperkowski
- License: bsd-3-clause
- Created: 2024-12-22T07:31:11.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-10T21:03:26.000Z (over 1 year ago)
- Last Synced: 2025-02-17T01:44:48.681Z (over 1 year ago)
- Topics: cli, jule, julelang, library
- Language: Makefile
- Homepage:
- Size: 62.5 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# 
The Jule CLI Library
A Jule library for creating command-line interfaces.
[Usage](#usage) |
[Examples](/examples) |
[Donate](https://github.com/sponsors/adamperkowski)
## Usage
To install the library, follow the steps below:
1. Download the library package from the [releases page](https://github.com/adamperkowski/cliq/releases)
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:
```jule
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](/examples) directory for more examples.
## License
The extension is distributed under the terms of the BSD 3-Clause license.
[See License Details](/LICENSE)