Implement C-like command line arguments in Julia

There is a way to reproduce C command line arguments behavior in Julia?

int main(int argc, char **argv) { /* ... */ }
1 Like

I used DocOpt.jl in the past and liked it. But I remember a newer approach as well. If I remember the link I will share here.

1 Like

Here it is:


At the lowest level, the equivalent of the C argc/argv variables is the ARGS global constant, which is a list of strings giving the command-line arguments passed by the user.

On top of that, there are various higher-level packages to help you parse command-line arguments. For example, an analogue of the C getopt API in Julia is provided by the ArgParse package, and then there are also the abovementioned DocOpt and Comonicon packages.