<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Cli on ISciNumPy.dev</title><link>https://iscinumpy.dev/tags/cli/</link><description>Recent content in Cli on ISciNumPy.dev</description><generator>Hugo</generator><language>en-us</language><managingEditor>henryfs@princeton.edu (Henry Schreiner)</managingEditor><webMaster>henryfs@princeton.edu (Henry Schreiner)</webMaster><lastBuildDate>Fri, 22 May 2026 10:02:17 -0400</lastBuildDate><atom:link href="https://iscinumpy.dev/tags/cli/index.xml" rel="self" type="application/rss+xml"/><item><title>Announcing CLI11 2.0</title><link>https://iscinumpy.dev/post/announcing-cli11-20/</link><pubDate>Wed, 14 Jul 2021 14:34:02 -0400</pubDate><author>henryfs@princeton.edu (Henry Schreiner)</author><guid>https://iscinumpy.dev/post/announcing-cli11-20/</guid><description>&lt;p&gt;&lt;a href="https://github.com/CLIUtils/CLI11"&gt;CLI11&lt;/a&gt;, a powerful library for writing beautiful command line interfaces in
C++11, has &lt;a href="https://github.com/CLIUtils/CLI11/releases/tag/v2.0.0"&gt;been updated to 2.0&lt;/a&gt;. A lot of deprecated things have been
removed, and there was a lot of cleanup under-the-hood; making CLI11 simpler. A
few defaults have changed slightly, like better TOML support by default.&lt;/p&gt;
&lt;p&gt;CLI11 does a better job than ever understanding any sort of container you
provide - complex numbers are natively supported, along with atomic types. A
long requested feature, simple version flags, has been added. Subcommands are
more customizable. And there have been quite a few bugfixes for rare issues.&lt;/p&gt;</description></item><item><title>Announcing CLI11 1.6</title><link>https://iscinumpy.dev/post/announcing-cli11-16/</link><pubDate>Wed, 27 Jun 2018 14:44:40 +0200</pubDate><author>henryfs@princeton.edu (Henry Schreiner)</author><guid>https://iscinumpy.dev/post/announcing-cli11-16/</guid><description>&lt;p&gt;&lt;a href="https://github.com/CLIUtils/CLI11"&gt;CLI11&lt;/a&gt;, a powerful library for writing beautiful command line interfaces in
C++11, has &lt;a href="https://github.com/CLIUtils/CLI11/releases"&gt;been updated to 1.6&lt;/a&gt;, the largest update ever. CLI11
output is more customizable than ever, and has a better functionality separation
under the hood.&lt;/p&gt;
&lt;p&gt;CLI11 has had the formatting system completely redesigned, with minor or
complete customization of the output possible. Configuration files reading and
writing also can be configured; a new example with json instead of ini
formatting is included. Validators (finally) have custom help output, as well.
Many odd corner cases have been made possible, such as interleaving options.&lt;/p&gt;</description></item><item><title>Comparing CLI11 and Boost PO</title><link>https://iscinumpy.dev/post/comparing-cli11-and-boostpo/</link><pubDate>Sun, 03 Dec 2017 16:31:50 -0500</pubDate><author>henryfs@princeton.edu (Henry Schreiner)</author><guid>https://iscinumpy.dev/post/comparing-cli11-and-boostpo/</guid><description>&lt;p&gt;CLI11 started years ago as a set of tools built on Boost Program Options (PO),
and has since matured into the powerful, easy-to-use stand-alone library it is
available today. If you would like to see the original inspiration for CLI11,
look at
&lt;a href="https://github.com/CLIUtils/CLI11/blob/v0.1/include/Program.hpp"&gt;Program.hpp in CLI11 0.1&lt;/a&gt;.
The rest of the post will focus on a comparison between making a CLI app in the
two libraries. I am going to assume that you are preparing fairly basic but
non-trivial programs in the following comparison.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; CLI11 is more concise, and provides more control with better defaults
in many cases, but was inspired by Boost PO.&lt;/p&gt;</description></item><item><title>Announcing CLI11 1.3</title><link>https://iscinumpy.dev/post/announcing-cli11-13/</link><pubDate>Fri, 01 Dec 2017 09:03:50 -0500</pubDate><author>henryfs@princeton.edu (Henry Schreiner)</author><guid>https://iscinumpy.dev/post/announcing-cli11-13/</guid><description>&lt;p&gt;&lt;a href="https://github.com/CLIUtils/CLI11"&gt;CLI11&lt;/a&gt;, a powerful library for writing beautiful command line interfaces in
C++11, has &lt;a href="https://github.com/CLIUtils/CLI11/releases"&gt;been updated to 1.3&lt;/a&gt;, the largest update ever. CLI11 is
more powerful than ever, and has simpler and more consistent parsing under the
hood.&lt;/p&gt;
&lt;p&gt;This version focused on refactoring several key systems to ensure correct
behavior in the interaction of different settings. Most caveats about features
only working on the main App have been addressed, and extra arguments have been
reworked. Inheritance of defaults makes configuring CLI11 much easier without
having to subclass. Policies add new ways to handle multiple arguments to match
your favorite CLI programs. Error messages and help messages are better and more
flexible. Several bugs and odd behaviors in the parser have been fixed.&lt;/p&gt;</description></item><item><title>Announcing CLI11 Version 1.0</title><link>https://iscinumpy.dev/post/announcing-cli11-10/</link><pubDate>Thu, 01 Jun 2017 14:05:00 -0700</pubDate><author>henryfs@princeton.edu (Henry Schreiner)</author><guid>https://iscinumpy.dev/post/announcing-cli11-10/</guid><description>&lt;p&gt;CLI11, a powerful library for writing command line interfaces in C++11, has just
been released. There are no requirements beyond C++11 support (and even
&lt;code&gt;&amp;lt;regex&amp;gt;&lt;/code&gt; support not required). It works on Mac, Linux, and Windows, and has
100% test coverage on all three systems. You can simply drop in a single header
file (&lt;code&gt;CLI11.hpp&lt;/code&gt; available in &lt;a href="https://github.com/CLIUtils/CLI11/releases"&gt;releases&lt;/a&gt;) to use CLI11 in your own application.
Other ways to integrate it into a build system are listed in the &lt;a href="https://github.com/CLIUtils/CLI11/blob/master/README.md"&gt;README&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The library was inspired the Python libraries &lt;a href="http://plumbum.readthedocs.io/en/latest/"&gt;Plumbum&lt;/a&gt; and &lt;a href="http://click.pocoo.org/5/"&gt;Click&lt;/a&gt;, and
incorporates many of their user friendly features. The library is extensively
documented, with a &lt;a href="https://github.com/CLIUtils/CLI11/blob/master/README.md"&gt;friendly introduction&lt;/a&gt;, a tutorial filled (in
progress) &lt;a href="https://cliutils.gitlab.io/CLI11"&gt;GitBook&lt;/a&gt;, and more technical &lt;a href="https://cliutils.github.io/CLI11"&gt;API docs&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Lua Environment Modules</title><link>https://iscinumpy.dev/post/lua-environment-modules/</link><pubDate>Wed, 11 Jan 2017 06:08:00 -0800</pubDate><author>henryfs@princeton.edu (Henry Schreiner)</author><guid>https://iscinumpy.dev/post/lua-environment-modules/</guid><description>&lt;p&gt;This is a guide to setting up Lmod (lua environment modules) on a CentOS system.
I&amp;rsquo;ve used a similar procedure to set them up on a Mac, as well, so this is still
a useful guide to the workings of Lmod if you use a different system; mostly
paths will change. On a Mac, you&amp;rsquo;ll want to install &lt;code&gt;Lmod&lt;/code&gt; from the &lt;code&gt;science&lt;/code&gt;
tap in &lt;code&gt;brew&lt;/code&gt;. There are several good pages covering environment modules (TCL
version), but not many that use the newer Lua syntax. This document aims to fill
that roll.&lt;/p&gt;</description></item><item><title>Plumbum color</title><link>https://iscinumpy.dev/post/plumbum-color-post/</link><pubDate>Wed, 22 Jul 2015 12:25:00 -0700</pubDate><author>henryfs@princeton.edu (Henry Schreiner)</author><guid>https://iscinumpy.dev/post/plumbum-color-post/</guid><description>&lt;p&gt;I&amp;rsquo;ve been working on a color addition to Plumbum for a little while, and I&amp;rsquo;d
like to share the basics of using it with you now. This library was originally
built around a special &lt;code&gt;str&lt;/code&gt; subclass, but now is built on the new &lt;code&gt;Styles&lt;/code&gt;
representation and is far more powerful than the first implementation. It safely
does nothing if you do not have a color-compatible systems (posix + tty
currently), but can be forced if need be. It is included with Plumbum, so you
don&amp;rsquo;t have to add a requirement for your scripts that is non-essential (as color
often is). It is integrated with &lt;code&gt;plumbum.cli&lt;/code&gt;, too. Also, I&amp;rsquo;ve managed to
accelerate the color selection algorithms about 8x, allowing near game-like
speeds. (see the &lt;code&gt;fullcolor.py&lt;/code&gt; example).&lt;/p&gt;</description></item><item><title>Plumbum scripting</title><link>https://iscinumpy.dev/post/plumbum-scripting/</link><pubDate>Sun, 12 Jul 2015 14:07:00 -0700</pubDate><author>henryfs@princeton.edu (Henry Schreiner)</author><guid>https://iscinumpy.dev/post/plumbum-scripting/</guid><description>&lt;p&gt;Scripting in Bash is a pain. Bash can do almost anything, and is unbeatable for
small scripts, but it struggles when scaling up to doing anything close to a
real world scripting problem. Python is a natural choice, especially for the
scientist who already is using it for analysis. But, it&amp;rsquo;s much harder to do
basic tasks in Python. So you are left with scripts starting out as Bash
scripts, and then becoming a mess, then being (usually poorly) ported to Python,
or even worse, being run by a Python script. I&amp;rsquo;ve seen countless Python scripts
that run Bash scripts that run real programs. I&amp;rsquo;ve even written one or two. It&amp;rsquo;s
not pretty.&lt;/p&gt;
&lt;p&gt;I recently came (back) across a really powerful library for doing efficient
command line scripts in Python. It contains a set of tools that makes the four
(five with color) main tasks of command line scripts simple and powerful. I will
also go over the one main drawback of the library (and the possible
enhancement!).&lt;/p&gt;</description></item></channel></rss>