I guess you would need to have your own method in your controller to fire up the indexing tool. From what it looks like, you need a few things to get going:
The classname of the tool i.e AssetIndex
An array of asset sources or * for them all
An indexing session id
An array of parameters to send to the tool
So I managed to get something working with the ...
Updating Asset indexes is pretty coupled to the tool in the Settings portion of the control panel.
But if you wanted to try and duplicate that functionality in a plugin, you could have it listen for the onLogin event to do your business.
If the Update Asset Indexes fails on a MAMP install, double check to make sure ALL assets source paths are correct and exist on the file system.
I had defined a asset source to a folder which I had planned on using but had not yet created on the file system, and this caused the Update Asset Indexes to fail w/o any warning messages, save for a JS error in ...