parsearger-core_skill

This skill helps generate or modify bash argument parsers using parseArger to define positional arguments, flags, and options efficiently.
  • TypeScript

5

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill dimitrigilbert/parsearger --skill parsearger-core

  • SKILL.md6.3 KB

Overview

This skill provides the core functionality for parseArger: generating new bash argument parsers and parsing or modifying existing parseArger-managed scripts. It handles definitions for positional arguments, options, flags, nested options and subcommands, and emits safe, regenerable parsing code. Use it to produce consistent CLI parsing logic and to update existing scripts in-place.

How this skill works

When generating, the skill emits a bash script with a dedicated generated section between markers # @parseArger-parsing and # @parseArger-parsing-end; that block must never be edited by hand. When parsing/modifying, it inspects the target file to ensure it was created by parseArger, then injects or regenerates parsing logic based on top-of-file declarations. The tool always checks for a parseArger executable in PATH and falls back to ./parseArger in the project root if not found.

When to use it

  • Create a new CLI script with structured argument parsing (use generate with --output).
  • Add new flags, options, or positional arguments to a script already managed by parseArger (use parse --inplace).
  • Update the parsing logic after changing top-of-file --pos/--opt/--flag declarations.
  • Define subcommands backed by a directory of scripts and pass leftovers to subcommands.
  • Enforce argument validation (regex, one-of lists, repeat counts, completion hooks).

Best practices

  • Always run which parseArger first; fallback to ./parseArger if not found.
  • Never edit the code between # @parseArger-parsing and # @parseArger-parsing-end manually.
  • For new scripts always provide --output; otherwise output goes to stdout only.
  • Use --inplace when modifying existing scripts to regenerate parsing logic safely.
  • Name options and flags consistently; generated variables follow the _arg_<name> pattern (hyphens -> underscores).

Example use cases

  • Add a verbose flag to an existing parseArger script in-place: parseArger parse my-script.sh --inplace --flag 'verbose "Enable verbose" --short v'.
  • Define a subcommand entry and run matching subcommand scripts from a directory: use --pos with --subcommand and --subcommand-directory.
  • Create validated positional arguments with --match or restrict values with --one-of for safer CLI inputs.
  • Use nested options to model namespaced config like --config-db and access values via associative arrays in the generated script.

FAQ

Use generate with --output to create a new script; parse is only for existing parseArger-managed files.

How do I update parsing after changing declarations?

Edit the top-of-file --pos/--opt/--flag declarations and run parseArger parse FILE --inplace to regenerate the parsing block.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational