This is definitely not the same as Osirak, but as far as US involvement in an attack on Iran is concerned, it really depends. The US would definitely be very reluctant to putting troops in Iran due to their overly stretched military, tight fiscal situation, and their desire to not jeopardize their relationship with Russia. It is very unlikely that the UN or NATO would participate either. Some of the scenarios looking at this situation don't have the US attacking with Israel right away, or even at all.
The Brookings Institute prepared a simulation of the possible effects of an Israeli strike on Iran's nuclear facilities that was summarized by the New York times.
David Sanger gave his personal view of the results of the Brookings simulation which simulates Israel unilaterally attacking Iran (although in a real life situation the US would definitely know of an attack, they just would not approve it).
The US might join in on an Israeli attack on Iran, or it might not. The end results would not be in either Country's interests, and so the most advantageous move for the US might be to just let Israel go in alone and work to clean up the situation afterwards.
If the US chose to not join in on the attack, than it would be able to assert a lot more influence in other parts of the Middle East, it's bases might not be targeted by Iranian missile strikes (which Iran might do anyways to maintain a strategic reserve of missiles), it would be able to clean up the situation more to its liking, it would not be the focus of major condemnation and scorn by those at the UN and around the world, it would still be able to have some ability to maintain sanctions against Iran, and it would better serve its interests in Iraq, Afghanistan, Bahrain, Yemen, and Pakistan.
Whether the US would join in on an attack on Iran or not, the action would still result in a net loss for both Countries.
- Even in the best scenario, Iran's nuclear program would only be delayed by a few years. As Sanger pointed out, "you can bomb facilities, but you can't bomb knowledge." Iran has been preparing for just this type of strike, and would start rebuilding right away.
- Iran has been waiting, and indeed almost deliberately goading Israel into attacking so they can use it for their own purposes. If Israel did attack, many barriers in Iran towards pursuing their wider ambitions would be removed.
- Most of the barriers that Iran previously had to building a nuclear bomb would be eroded or removed by the attack. Iran would use the event to show that the development of nuclear weapons would be required for their protection due to the "aggressive attacks" from Israel.
- Sanctions on Iran would be harder to carry out, and the attack instead could prompt a move in the UN for sanctions on Israel (and unilateral sanctions on Israel/the US if the US vetoed it).
- Iran would have more freedom to crack down on pro-democracy and other groups that would pose a threat to the Theocratic government structure.
- Iran might use the event to attack Israeli supported Kurdish bases in Iraq.