You can, or you can use the currently convoluted command line. It's subject to change and rather complicated, so caveat emptor this time.
If your application is in .NET, you can write an Eraser plugin and import the types from Eraser.Manager. I've not tested that though.