Sorry, I misunderstood and answered, at least im my experience, a more common question.
Some have described Eagle as a command language to which a GUI was added. I doubt that accurately describes its development, but early versions (v. 3.x) felt that way. As a result, anything you can do using the GUI can probably be done with a "simple" command line. Unfortunately, I have not found a good textbook on using the command language. I do use a few commands, for example positioning an imported DXF at the 0,0 location.
There may be someone here who can help with a command line for what you want to do. If not, Jorge (Autodesk Eagle forum) can do it if anyone can.