Following on from a StackOverflow question that tuned out to be about sdcli, there does seem to be a small bug in sqlcli in 4.0 EA1 and EA2. The sqlcli.bat and sqlcli files both refer to the wrong version of a file:
Running the OS X version as sh ./sqlcli (since it isn't executable by default) gives:
Exception in thread "main" java.lang.NoClassDefFoundError: oracle/ide/Version at oracle.dbtools.db.DBUtil.<clinit>(DBUtil.java:1703) at oracle.dbtools.raptor.scriptrunner.utils.SqlCli.processArgs(SqlCli.java:49) at oracle.dbtools.raptor.scriptrunner.utils.SqlCli.main(SqlCli.java:118)
In both cases it should now point to oracle.javatools_12.1.2, apparently. This isn't OS X-specific, the same files are in the Windows version, not surprisingly.
The java.lang.StringIndexOutOfBoundsException that the original question was about is also unhelpful, but I don't know if it's always done that if you don't give the first argument as username/password@tns.