{"repo":"objecthub/swift-commandlinekit","free":true,"listed":false,"github":"https://github.com/objecthub/swift-commandlinekit","clone":"git clone https://github.com/objecthub/swift-commandlinekit.git","description":"Framework supporting the development of command-line tools in Swift on macOS and Linux. The framework supports managing command-line arguments, provides lightweight functions to deal with escape sequences, and defines an API for reading strings from the terminal.","language":"Swift","stars":58,"topics":["swift","command-line-tool","flags","escape-sequences","readline","command-line-arguments","cli"],"license":"BSD-3-Clause","category":"cli-tools","readme_excerpt":"Swift CommandLineKit This is a library supporting the development of command-line tools in the programming language Swift on macOS. It also compiles on iOS and Linux. The library provides the following functionality: - Management of command-line arguments, - Usage of escape sequences on terminals, e.g. for formatting output on ANSI terminals, and - Reading strings on terminals using a lineread-inspired implementation based on the library Linenoise-Swift, but supporting unicode input, multiple lines, and styled text. - Reading strings on terminals in a secure way hiding user input, e.g. for entering passwords, API keys, etc. Table of contents 1. &nbsp; Command-line arguments &nbsp;&nbsp; 1.1 &nbsp; Basics &nbsp;&nbsp; 1.2 &nbsp; Programmatic API &nbsp;&nbsp; 1.3 &nbsp; Declarative API 2. &nbsp; Styled output &nbsp;&nbsp; 2.1 &nbsp; Text style and colors &nbsp;&nbsp; 2.2 &nbsp; Styled string formatting 3. &nbsp; Reading strings &nbsp;&nbsp; 3.1 &nbsp; Readline &nbsp;&nbsp; 3.2 &nbsp; Secure readline 4. &nbsp; Requirements 5. &nbsp; Copyright &nbsp; Command-line arguments Basics CommandLineKit handles command-line arguments with the following protocol: 1. A new Flags object gets created either for the system-provided command-line arguments or for a custom sequence of arguments. 2. For every flag, a Flag object is being created and registered in the Flags object. 3. Once all flag objects are declared and registered, the command-line gets parsed. After parsing is complete, the fla","default_branch":null,"files":null,"tree":[],"storefront":"/r/objecthub","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/objecthub/swift-commandlinekit/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}