{"id":13463065,"url":"https://github.com/davetron5000/gli","last_synced_at":"2025-05-12T13:08:50.278Z","repository":{"id":495437,"uuid":"122075","full_name":"davetron5000/gli","owner":"davetron5000","description":"Make awesome command-line applications the easy way","archived":false,"fork":false,"pushed_at":"2025-03-09T15:54:45.000Z","size":2141,"stargazers_count":1266,"open_issues_count":10,"forks_count":105,"subscribers_count":26,"default_branch":"main","last_synced_at":"2025-05-01T08:09:59.922Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://davetron5000.github.io/gli","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davetron5000.png","metadata":{"files":{"readme":"README.rdoc","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2009-02-05T03:49:25.000Z","updated_at":"2025-04-29T19:16:28.000Z","dependencies_parsed_at":"2024-01-08T17:12:00.875Z","dependency_job_id":"b3391504-f4f5-4314-9687-c7904f79b012","html_url":"https://github.com/davetron5000/gli","commit_stats":{"total_commits":611,"total_committers":48,"mean_commits":"12.729166666666666","dds":"0.24058919803600654","last_synced_commit":"4f3a4a5361040650bd48b72a522824b19c134df0"},"previous_names":[],"tags_count":94,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davetron5000%2Fgli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davetron5000%2Fgli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davetron5000%2Fgli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davetron5000%2Fgli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davetron5000","download_url":"https://codeload.github.com/davetron5000/gli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252009017,"owners_count":21679685,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T13:00:45.365Z","updated_at":"2025-05-12T13:08:50.235Z","avatar_url":"https://github.com/davetron5000.png","language":"Ruby","funding_links":[],"categories":["Developer Tools","Ruby","CLI Builder","[Ruby](https://www.ruby-lang.org/)","Additional Languages"],"sub_categories":["CLI Option Parsers","Useful awesome list for Go cli","Ruby 💎"],"readme":"= GLI, the Git-Like Interface Command Line Parser\n\nGLI allows you to create command-line app in Ruby that behaves like \u003ctt\u003egit\u003c/tt\u003e in that it takes subcommands to perform a series of complex action, e.g. \u003ctt\u003egit remote add\u003c/tt\u003e.\n\n* {Overview}[http://davetron5000.github.io/gli]\n* {Source on Github}[http://github.com/davetron5000/gli]\n* RDoc[http://davetron5000.github.io/gli/rdoc/index.html]\n\n{\u003cimg src=\"https://secure.travis-ci.org/davetron5000/gli.svg?branch=gli-2\" alt=\"Build Status\" /\u003e}[https://travis-ci.org/davetron5000/gli]\n\n== What Problem does GLI Solve?\n\nCreating a command-line app that uses subcommands, each of which might accept different command-line options, is somewhat difficult with Ruby's built-in \u003ctt\u003eOptionParser\u003c/tt\u003e.  GLI provides an API that wraps \u003ctt\u003eOptionParser\u003c/tt\u003e so that you can create a subcommand-based command-line app with minimal boilerplate. This API also produces complete documentation for your command-line app.\n\n== Why is GLI's solution different from others?\n\nThere are other RubyGems that allow you to create a command-line app that takes subcommands.  These solutions are often quite limited (e.g. they don't allow deeply nested subcommand structures or sophisticated command-line options per subcommand), or require more code that we think is needed. Some solutions make it difficult or impossible to properly document your command-line  app.\n\n== What you need to know to use GLI\n\nYou should know Ruby, and have a basic understanding of how the UNIX command line works: standard input, standard output, standard error, and exit codes.\n\n== Use\n\nInstall if you need to:\n\n    gem install gli\n\nYou can validate you have installed it correctly by running \u003ctt\u003egli help\u003c/tt\u003e. You should see formatted help output.\n\nIf you are using GLI in another application, add it to your \u003ctt\u003eGemfile\u003c/tt\u003e:\n\n    gem \"gli\"\n\nYou can test your install via Bundler by running \u003ctt\u003ebundle exec gli help\u003c/tt\u003e. This should produce formatted help output from GLI.\n\n== Getting Started\n\nThe simplest way to get started is to create a scaffold project\n\n    gli init todo list add complete\n\n(note if you installed via Bundler you will need to execute \u003ctt\u003ebundle exec gli init todo list add complete\u003c/tt\u003e)\n\nThis will create a basic scaffold project in \u003ctt\u003e./todo\u003c/tt\u003e with:\n\n* executable in \u003ctt\u003e./todo/bin/todo\u003c/tt\u003e.  This file demonstrates most of what you need to describe your command line interface.\n* an empty test in \u003ctt\u003e./todo/test/default_test.rb\u003c/tt\u003e that can bootstrap your tests\n* a gemspec shell\n* a README shell\n* Rakefile that can generate RDoc, package your Gem and run tests\n* A \u003ctt\u003eGemfile\u003c/tt\u003e suitable for use with Bundler to manage development-time dependencies\n\nNow, you are ready to go:\n\n    \u003e cd todo\n    \u003e bundle exec bin/todo help\n    NAME\n        todo - Describe your application here\n\n    SYNOPSIS\n        todo [global options] command [command options] [arguments...]\n\n    VERSION\n        0.0.1\n\n    GLOBAL OPTIONS\n        -f, --flagname=The name of the argument - Describe some flag here (default: the default)\n        --help                                  - Show this message\n        -s, --[no-]switch                       - Describe some switch here\n\n    COMMANDS\n        add      - Describe add here\n        complete - Describe complete here\n        help     - Shows a list of commands or help for one command\n        list     - Describe list here\n\n    \u003e bundle exec bin/todo help list\n    NAME\n        list - Describe list here\n\n    SYNOPSIS\n        todo [global options] list [command options] Describe arguments to list here\n\n    COMMAND OPTIONS\n        -f arg - Describe a flag to list (default: default)\n        -s     - Describe a switch to list\n\nAll you need to do is fill in the documentation and your code; the help system, command-line parsing and many other awesome features are all handled for you.\n\nGet a more detailed walkthrough on the {main site}[http://davetron5000.github.io/gli]\n\n== Supported Platforms\n\nSee `dx/docker-compose.env` and the variable `RUBY_VERSIONS` for the versions that are supported.  This should generally track with the supported version of Ruby from Ruby's maintainers.\n\nThat said, GLI should generally work on other Rubies as it doesn't have any runtime dependencies and there are no plans to use more modern features of Ruby in the codebase.\n\n== Documentation\n\nExtensive documentation is {available at the wiki}[https://github.com/davetron5000/gli/wiki].\n\nAPI Documentation is available {here}[http://davetron5000.github.io/gli/rdoc/index.html].  Recommend starting with GLI::DSL or GLI::App.\n\n== Developing\n\nSee `CONTRIBUTING.md`\n\n== Credits\n\nAuthor::  Dave Copeland (mailto:davetron5000 at g mail dot com)\nCopyright:: Copyright (c) 2010 by Dave Copeland\nLicense:: Distributes under the Apache License, see LICENSE.txt in the source distro\n\n== Links\n\n* [http://davetron5000.github.io/gli] - RubyDoc\n* [http://www.github.com/davetron5000/gli] - Source on GitHub\n* [http://www.github.com/davetron5000/gli/wiki] - Documentation Wiki\n* [http://www.github.com/davetron5000/gli/wiki/Changelog] - Changelog\n\n= \u003ccode\u003egli\u003c/code\u003e CLI documentation\n\n:include:gli.rdoc\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavetron5000%2Fgli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavetron5000%2Fgli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavetron5000%2Fgli/lists"}