I saw a post or two on zf-general about this issue, and since I had (and managed to solve) it myself, I thought I'd explain what I believe is causing it.
From looking through the code, it appears that Zend_Tool recursively scans through all files and directories in your include_path in order to try and try and find classes which implement either ZendL_Tool_Rpc_Manifest_Interface or ZendL_Tool_Rpc_Provider_Interface. I'm guessing the idea is you can have non-ZF code installed to a directory in your include path that will automatically add functionality to your ZF CLI tool without requiring any setup or configuration by you. E.g. I could go and install a PEAR library which would then magically give me access to some new zf CLI commands.
The issue occurs if you have a copy of zend framework itself within your default include_path, but you've setup Zend_Tool to use a _different_ copy of ZF (using either the ZF_PATH env variable or the zf.php file). Zend_Tool adds the ZF path you've given it to the include path, and then scans through looking for files that end with '(Tool|Manifest|Provider).php'. The Zend_OpenId_Provider class matches this, so Zend_Tool includes it and then ignores it since it doesn't implement either of the interfaces. But then when it finds the same file in your other copy of zend framework, the script dies with a fatal error since it's including a file which defines a class that already exists.
This might sound like a fairly rare combination of events. The reason I had this particular problem is that I'd checked out a copy of ZF from SVN in order to play with Zend_Tool, but I also already had the Ubuntu zend-framework package installed, and this sits by default in /usr/share/php/libzend-framework-php. I guess this problem will eventually solve itself when Zend_Tool is out of the incubator, since users who've installed ZF to their include_path will have no reason to grab a more recent copy of it in order to use Zend_Tool.
However, while it's a cool idea, I'm not completely convinced that scanning through the include_path and including files based on name alone is a good long term approach. Although quite unlikely, it's theoretically possible that two different libraries might declare a class with the same name in files that matched the regexp pattern, which would cause the same fatal error.
Anyway, for me the solution was simple - I uninstalled the Ubuntu zend framework package, since I don't really need it there. So if anyone else has this issue check the directories in your include path for copies of ZF, or files matching the naming scheme above.
--
Tim Fountain
http://www.tfountain.co.uk/