Guaka
is the smartest and most beautiful (POSIX compliant) Command line framework for Swift. Inspired by cobra.
(Also its a WIP)
Guaka
promises the following:
- It can be statically linked: That means it does not use libFoundation, and does no rely on many thirdparty libs.
- Posix complient flags: It handles both short and long flag names. Flag names can appear anywhere (ala posix)
- Familiar with widely used cli apps: Have you used Docker, Kubernetes, OpenShift and Hugo.
- Safe and crash free: Extensively covered with tests and with use cases.
Features:
- Easy to use interface (WIP)
- POSIX-Complient flags
- Inheritable and non inheritable flags
- Generator cli to easy generate a cli app (WIP)
- Levenshtein distance for subcommand names (WIP)
- Ability to have commands and subcommands (like git remote show has 3 subcommands)
- Generate a good help message (WIP)
- Man pages and bash completion (WIP)
- Manage settings from configuration files (WIP)
- Provides a way to generate custom help messages (WIP)
- Type safe flags (WIP)
- Ability to define your own structures as flag parameters (WIP)
- Generate command line apps from a configuration file (WIP)
- WIP
WIP....
You can install Guaka using Swift package manager (SPM) and carthage
Add swiftline as dependency in your Package.swift
import PackageDescription
let package = Package(name: "YourPackage",
dependencies: [
.Package(url: "https://github.com/oarrabi/Guaka.git", majorVersion: 0),
]
)
github 'oarrabi/Guaka'
Tests can be found here.
Run them with
swift test
For a list of task planned, head to the Guaka GitHub project