How to use CLI to fetch an item with file link into the current library

How should I use the command line to fetch an item to my current library?
I read the documentation but is somewhat confused. If I understand it correctly, I should do

/Applications/JabRef.app/Contents/MacOS/JabRef -n -f <FETCHER:QUERY> -asfl somefile.pdf mylibrary.bib

However, nothing happens after this. There is nothing added to my bib file. I’m sure the fetcher worked because if I only run

/Applications/JabRef.app/Contents/MacOS/JabRef -f <FETCHER:QUERY>

I see an untitled library being created with the corrected item.

Even if I do

/Applications/JabRef.app/Contents/MacOS/JabRef -f <FETCHER:QUERY> mylibrary.bib

The item is added to the untitled library instead of mylibrary.
Please advise. Thank you very much in advance!

I have never tried command line operations with Jabref, but maybe this part of the documentation might help?

Maybe this command?

  • /Applications/JabRef.app/Contents/MacOS/JabRef -f=FETCHER:QUERY true mylibrary.bib

Thanks for the reply. Sorry for the late response.
If you are referring to the true part in the command. It was meant to be an input value for the “-n” option so that the CLI won’t treat the bib filename as the input value for “-n”. So it doesn’t seem to address the problem.
Maybe you mean something else?

Hmm ok. What happens, if you import the entries from this untitled file, after fetching the entries from the web?

/Applications/JabRef.app/Contents/MacOS/JabRef -n -f=FETCHER:QUERY --import untitledlibrary.bib -asfl`