All Projects → hedzr → cmdr

hedzr / cmdr

Licence: MIT License
POSIX-compliant command-line UI (CLI) parser and Hierarchical-configuration operations

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to cmdr

Cobra
A Commander for modern Go CLI interactions
Stars: ✭ 24,437 (+25896.81%)
Mutual labels:  commandline, posix, cli-app
CommandLineParser.Core
💻 A simple, light-weight and strongly typed Command Line Parser made in .NET Standard!
Stars: ✭ 32 (-65.96%)
Mutual labels:  commandline, command-line-parser, command-line-interface
Reactopt
A CLI React performance optimization tool that identifies potential unnecessary re-rendering
Stars: ✭ 1,975 (+2001.06%)
Mutual labels:  commandline, commandline-interface, command-line-interface
Ttyplot
a realtime plotting utility for terminal/console with data input from stdin
Stars: ✭ 532 (+465.96%)
Mutual labels:  console, commandline, cli-app
npshell
Command line music queue manager. A music player from the comfort of your own shell.
Stars: ✭ 15 (-84.04%)
Mutual labels:  daemon, command-line-interface
pendfetch
Double Pendulum visualised with fetching system information in Python.
Stars: ✭ 62 (-34.04%)
Mutual labels:  commandline, commandline-interface
declarative-parser
Modern, declarative argument parser for Python 3.6+
Stars: ✭ 31 (-67.02%)
Mutual labels:  command-line-parser, commandline-interface
ansiart2utf8
Processes legacy BBS-style ANSI art (ACiDDraw, PabloDraw, etc.) to UTF-8. Escape codes and line endings are processed for terminal friendliness.
Stars: ✭ 32 (-65.96%)
Mutual labels:  console, commandline
console-logging
Better, prettier commandline logging for Python--with colors! 👻
Stars: ✭ 111 (+18.09%)
Mutual labels:  console, commandline
option-parser
A Lightweight, header-only CLI option parser for C++
Stars: ✭ 16 (-82.98%)
Mutual labels:  command-line-parser, command-line-interface
jira-cli
🔥 [WIP] Feature-rich interactive Jira command line.
Stars: ✭ 809 (+760.64%)
Mutual labels:  console, cli-app
Blackeye-for-Windows
This is a Phishing tool. Phishing is a type of hacking also called credential harvesting. It creates fake websites for victims to login which saves their login info which includes IP, User-Agent, Username and Password to a file in the computer running Blackeye. This tool has been there for Linux and even Android via Termux. I converted it to Win…
Stars: ✭ 38 (-59.57%)
Mutual labels:  commandline, command-line-interface
Gcli
🖥 Go CLI application, tool library, running CLI commands, support console color, user interaction, progress display, data formatting display, generate bash/zsh completion add more features. Go的命令行应用,工具库,运行CLI命令,支持命令行色彩,用户交互,进度显示,数据格式化显示,生成bash/zsh命令补全脚本
Stars: ✭ 188 (+100%)
Mutual labels:  console, cli-app
Comonicon.jl
Your best CLI generator in JuliaLang
Stars: ✭ 181 (+92.55%)
Mutual labels:  command-line-parser, command-line-interface
Smenu
smenu started as a lightweight and flexible terminal menu generator, but quickly evolved into a powerful and versatile CLI selection tool for interactive or scripting use.
Stars: ✭ 1,906 (+1927.66%)
Mutual labels:  console, command-line-interface
Console Logging
Better, prettier commandline logging for Python--with colors! 👻
Stars: ✭ 111 (+18.09%)
Mutual labels:  console, commandline
Utility.CommandLine.Arguments
A C# .NET class library containing tools for parsing the command line arguments of console applications.
Stars: ✭ 105 (+11.7%)
Mutual labels:  commandline, command-line-parser
exch
a command-line tool to see currency exchange rates
Stars: ✭ 20 (-78.72%)
Mutual labels:  commandline, cli-app
cliar
Create modular Python CLIs with type annotations and inheritance
Stars: ✭ 47 (-50%)
Mutual labels:  commandline, commandline-interface
Dte
A small, configurable console text editor (moved to https://gitlab.com/craigbarnes/dte)
Stars: ✭ 98 (+4.26%)
Mutual labels:  console, posix

cmdr

Go GitHub tag (latest SemVer) GoDoc FOSSA Status go.dev Go Report Card codecov Coverage Status Mentioned in Awesome Go

cmdr is a POSIX-compliant, command-line UI (CLI) library in Golang. It is a getopt-like parser of command-line options, be compatible with the getopt_long command line UI, which is an extension of the syntax recommended by POSIX.

We made many enhancements beyond the standard library flag.

There is a fully-functional Options Store (configurations) for your hierarchical configuration dataset too.

The .netCore version Cmdr.Core is available now. And, a cxx version cmdr-cxx was pre-released just now (Happy Spring Festival 2021).

ee99d078e2f7

See the image frames at #1.

See our extras:

and Bonus of #cmdr Series:

News

  • docs (WIP):

  • v1.10.29 (WIP)

  • v1.10.27

    • upgrade to errors.v3
  • v1.10.24

    • fix: version command, help screen not work
  • v1.10.23

    • fix: unknown switch char not an error now
    • imp: refined gen zsh code, and gen shell codes
    • fea: support fish-shell completion generating now
    • fea: added root.RunAsSubCommand, treat 'app' as a synonym of 'app subcmd1 subcmd2'
    • imp/fix/fea: clarify the slice append or replace mode - SetNx & SetNxOverwrite for Option Store
    • fea: added VendorHidden field for when you wanna a never shown flag or command
    • fea: conf package - add Serial, SerialString for CI tool
    • imp: erase man1 folder after --man
    • fix/imp: prints description with color escaped, when multiline
    • fix: restore Match() but with new name MatchAndTest()
    • fix: high-order fn hold the older copy, so pass it by holding a pointer to original variable
    • imp: review most of the tests
    • NOTE: cleanup the deprecated codes [cmd.NewFlagV,cmd.NewFlag, cmd.NewSubCommand, ...]
    • fea: more completion supports
  • v1.10.19

    • temporary build for earlier testing
    • confirmed: backward compatible with go1.12
  • v1.10.13

    • fix/imp: adapt windir to *nix name to fit for generic config file loading
    • fea/imp: improved Aliases algor, support more tmpl var substitute
    • fix: fallback the unknown type as string type
    • fea: add flag to control whether write the changes back to alternative config file or not, WithAlterConfigAutoWriteBack
    • imp: name/desc fields of builtin commands and flags
    • CHANGE: use bgo build-tool now, Makefile thrown
  • v1.10.11

    • fix: setNx bug at last commit
    • fix: send 1.10.10 failure
  • v1.10.9

    • fix: setNx with slices merging
    • fix: aliases might be added to multiple groups
    • fea: secondary config file locations
  • v1.10.8

    • fix/fea/imp: make cmdr aliases subsystem better
  • v1.10.7

    • fix: generate shell may be lost buffered contents on writing to file
  • v1.10.6

    • fix: internal commands and flags has wrong group declarations since last refactored.
    • fea: -o file for generate shell command.
  • v1.10.5

    • fix: logex might crash on a nil skip field
  • v1.10.3

    • last release failed because some deps cannot committed due to weak network
  • v1.10.1

    • move to go1.17 to get a split declaration
    • fix: added the forgotten long-desc field
    • fix: transfer proper log-level to hedzr/log if in debug/trace mode
    • fix/imp: log.ForDir, ForFile
    • fix: log.LeftPad
    • fea: added InvokeCommand to run a sub-command from somewhere
  • v1.10.0

    • fix: toggle-group key not sync while set via envvar
    • imp: speed up by extracting a re compiling code
    • imp: upgrade deps with more enh-helpers from hedzr/log
    • imp: yaml indent size
    • imp: StripOrderPrefix
    • imp/fix: sync debug/trace mode back to hedzr/log
    • fix: options after tail args (positional args) might be ignored
    • fix: ResetOptions not clean up internal hierarchy-list
    • fea: added Checkpoints on Option Store
      you may save and restore multiple checkpoints for cmdr Option Store, so that some temporary changes can be made.
    • fix/imp: --man crashes if manpages not installed - the responding manpage will be generated temporarily and instantly now
    • add GitSummary field into conf package
    • imp: speed up by reduce get worker
      • centralize rxxtOptions to store()
      • flatten backtrace(Flg|Cmd)Names, added dottedPathToCommand
    • NOTE: the phrase wrapped by backtick(````) in Description field will be extracted as `DefaultValuePlaceholder` field automatically, so beware this feature.
    • fea: -vv (dup -v more than once) will print the hidden commands & flags in help screen NOW.
      To take a sight of running fluent generate --help --verbose -verbose.
    • ...
  • More details at CHANGELOG

Features

Features.md

Old README.md: README.old.md

For Developer

For Developer

Import cmdr

With go-modules enabled:

import "github.com/hedzr/cmdr"

About the Docker build

Here is a docker build for cmdr/examples/fluent so that you can run it without go building or downloading the release files:

# from Docker Hub:
$ docker run -it --rm hedzr/cmdr-fluent
$ docker run -it --rm hedzr/cmdr-fluent --help

# from Github Packages (please following the guide of GitHub Packages Site):
$ docker run -it --rm docker.pkg.github.com/hedzr/cmdr/cmdr-fluent
$ docker run -it --rm docker.pkg.github.com/hedzr/cmdr/cmdr-fluent --help

Examples

  1. short
    simple codes with structured data style.

  2. demo
    normal demo with external config files.

  3. wget-demo
    partial-covered for GNU wget.

  4. fluent
    demostrates how to define your command-ui with the fluent api style.

  5. ffdemo

    a demo to show you how to migrate from go flag smoothly.

  6. cmdr-http2
    http2 server with daemon supports, graceful shutdown

  7. awesome-tool
    awesome-tool is a cli app that fetch the repo stars and generate a markdown summary, accordingly with most of awesome-xxx list in github (such as awesome-go).

See Also the examples index: Examples.md (zh-cn TODO: Examples.zh-cn.md)

Uses

Contrib

Feel free to issue me bug reports and fixes. Many thanks to all contributors.

Thanks to JODL

Thanks to JetBrains for donating product licenses to help develop cmdr jetbrains

goland

License

MIT

FOSSA Status

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].