Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose cli args parsing ? parse to data structure ? #9

Open
ieugen opened this issue Sep 5, 2024 · 0 comments
Open

Expose cli args parsing ? parse to data structure ? #9

ieugen opened this issue Sep 5, 2024 · 0 comments

Comments

@ieugen
Copy link

ieugen commented Sep 5, 2024

Hello,

I wanted to use the library for parsing cli args and get the data as a map instead of running it.
This can be used inside an inline bb task where the dispatch function does not work ?! (did not try).

bb.edn

fetch-config
  {:task (let [opts (cli/parse-opts *command-line-args* cli-spec)]
    ;; use opts to run a simple command
    )
)}

I am looking into using babashka.cli instead for this use case which is perfectly ok.
I created this issue to record the use case.
Even if it's not possible, it should be documented IMO.

Thanks,
Eugen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant