ORNL / ORNL/GridKit

Improvements to `CliArgs`

Open
#344 0 comments 0 reactions 1 assignee View on GitHub

@PhilipFackler is already working on this.

Since May 6, 2026.

enhancement
Dominant language
C++
Stars
27
Forks
11
Avg merge
3d 8h
Merged PRs (30d)
23

Description

Summary

My initial implementation of CliArgs was enough to used in the example application, but there are some improvements that should ideally be made (see #341). Here I list my ideas that I did not yet implement.

Description
  • Use std::any instead of string for ArgValue representation. Check against specified type when setting the value. Might be better to use std::variant and limit possible input types.
  • Allow for positional arguments (.name = {"pos"})
  • Handle equal sign: --opt=arg (currently flag and value must be space-separated)

Other ideas

  • Introduce an operator T function in ArgValue and ArgVector to allow implicit conversion

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.