Skip to content

๐Ÿ“Ÿ A blazing fast Zig CLI framework. Build ergonomic, high-performance command-line tools with ease.

License

Notifications You must be signed in to change notification settings

mahiremirhan/zli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

32 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

zli - A Blazing Fast Zig CLI Framework ๐Ÿš€

Zig CLI Framework Version License

Welcome to the zli repository! This project provides a powerful framework for building command-line tools in Zig. With zli, you can create ergonomic and high-performance CLI applications with ease.

Table of Contents

  1. Introduction
  2. Features
  3. Installation
  4. Getting Started
  5. Usage
  6. Contributing
  7. License
  8. Links

Introduction

zli is designed to simplify the process of building command-line applications. Zig is a low-level programming language that emphasizes performance and safety. By leveraging Zig's strengths, zli allows developers to focus on functionality without worrying about the underlying complexities.

Features

  • Fast Performance: Built on Zig's efficient compilation and execution model.
  • Ergonomic Design: Intuitive API that makes it easy to create and manage commands.
  • Modular Architecture: Easily extend functionality with custom modules.
  • Rich Documentation: Comprehensive guides and examples to help you get started.
  • Cross-Platform Support: Works on Windows, macOS, and Linux.

Installation

To get started with zli, you need to install the framework. Visit the Releases section to download the latest version. Follow the instructions to install and execute the framework.

Getting Started

After installing zli, you can create a new CLI application. Hereโ€™s how:

  1. Open your terminal.

  2. Navigate to the directory where you want to create your project.

  3. Run the following command to create a new project:

    zli create my-cli-app
  4. Navigate into your new project directory:

    cd my-cli-app
  5. Open the main source file in your favorite text editor.

Usage

Creating commands in zli is straightforward. Hereโ€™s a simple example of how to define a command:

const std = @import("std");
const zli = @import("zli");

pub fn main() !void {
    const app = zli.Application.init("my-cli-app", "1.0.0");

    app.command("greet", "Greet the user", greet);

    try app.run();
}

fn greet(args: *zli.CommandArgs) !void {
    const stdout = std.io.getStdOut().writer();
    try stdout.print("Hello, {}!\n", .{args.get("name")});
}

Running Your Application

Once you have defined your commands, you can run your application from the terminal:

./my-cli-app greet --name="World"

This will output:

Hello, World!

Contributing

We welcome contributions to zli! If you have suggestions, improvements, or bug fixes, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or fix.
  3. Make your changes and commit them.
  4. Push your branch to your fork.
  5. Open a pull request.

Please ensure your code adheres to the project's coding standards and includes tests where applicable.

License

zli is licensed under the MIT License. See the LICENSE file for more details.

Links

For more information and updates, check the Releases section. You can find the latest downloads and version updates there.

Feel free to explore the repository, contribute, and enhance your command-line tool development experience with zli!

About

๐Ÿ“Ÿ A blazing fast Zig CLI framework. Build ergonomic, high-performance command-line tools with ease.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages