Well ok, that's an area where I frankly have very small knowledge.
I know that there's a magic "NSFileViewer" defaults value, that may, in theory, substitute Finder in some applications.
Even more, I know that currently Files does not behave in this role as it should. One user had sent me a script to write Files as a default handler and noticing that it didn't work well:
#!/usr/bin/python2.6
from LaunchServices import LSSetDefaultRoleHandlerForContentType, kLSRolesViewer, LSSetDefaultHandlerForURLScheme
from CoreFoundation import CFPreferencesCopyApplicationList, kCFPreferencesCurrentUser, kCFPreferencesAnyHost, CFPreferencesSetAppValue, CFPreferencesAppSynchronize
applicationBundleIdentifier = "info.filesmanager.Files"
LSSetDefaultRoleHandlerForContentType("public.folder", kLSRolesViewer, applicationBundleIdentifier)
LSSetDefaultHandlerForURLScheme("file:///", applicationBundleIdentifier)
applicationIDs = CFPreferencesCopyApplicationList(kCFPreferencesCurrentUser, kCFPreferencesAnyHost)
for app_id in applicationIDs:
CFPreferencesSetAppValue("NSFileViewer", applicationBundleIdentifier, app_id);
CFPreferencesAppSynchronize(app_id);
If you guys are really interesting in this functionality - I'll do some research on the problem.
As for command-line controlling - that's a separate feature and I think it would be quite entertaining to code it