Absolutely! That is one of the goals of QIIME 2, to be interface agnostic, so every bit of bioinformatics functionality should be available in every interface (in principle anyway, our GUI is lagging a bit behind at the moment).
Our docs on that are very weak at the moment. The objects you’ll want to look at will be:
qiime2.plugins.<name of plugin>
Those should be enough to replicate anything an interface like q2cli does. The Artifact API always takes instances of one of those objects (or is something simple like a str/int). Additionally, much of the
qiime tools functionality in q2cli are really just glorified method calls on one of those objects.
Please feel free to ask any question about how you might replicate something in one interface in another, we love answering those kinds of questions!