Skip to content
Simple argument parsing library for V.
Branch: master
Clone or download
Latest commit 5343376 Aug 25, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE Initial commit Jun 29, 2019 Update module name Aug 25, 2019
vargs.v Update module name Aug 25, 2019
vargs_test.v Update module name Aug 25, 2019

vargs 0.3

A simple argument parsing library for V. Ported from this file which was originally written on Typescript.

The version of this module will remain in 0.x.x unless the language API's are finalized and implemented.

// dummy.v
import vargs
import os

fn main() {
    // Second argument removes the first argument which contains the path of the executable.
    _args := vargs.parse(os.args, 1)

    println('with? ' + _args.options['with'])
./dummy cook chicken --with love
# { command: "cook", options: {"with" => "love"}, unknown: ["chicken"] }
# cook
# chicken
# with? love


Via vpm:

v install nedpals.args

Via vpkg:

vpkg get vargs

# or

vpkg get

Breaking Changes in 0.3

  1. Module name renamed from args to vargs to avoid conflicts.
  2. 0.3 now requires V 0.1.18 and above because of the revised initialization of maps.
  3. Renaming of internal functions and better formatting when converting Args struct to string.
  4. Final stable release? Hmmm


  1. Fork it (
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request




You can’t perform that action at this time.