A US citizen is accused of travelling to Australia to attempt to murder his ex-wife's husband with a crossbow and an axe, with a plan to then fly back to the States days later.

Police allege 49-year-old Jeffrey Hooten, from Texas, attacked Greg Williams outside his Somersby home on the New South Wales Central Coast on Tuesday afternoon.

Police said Mr Williams was standing on his driveway holding a laptop at the time of the attack and was lucky to be alive.

Hooten allegedly fired a crossbow at Mr Williams, which narrowly missed and hit the laptop instead, before allegedly smashing an axe into the victim's head.

"I sort of put the laptop up to defend myself," Mr Williams told the ABC.

"I felt that I'm not going to die. I'm still good to go."

Greg Williams was taken to hospital and required stitches. ( 7pm TV News NSW )

A passerby then came to the rescue, bringing the attack to a halt, before the assailant was arrested by police.

Officers later said they had noted the rescuer's brave act in the hope that he would later receive an award.

Mr Williams was taken to hospital and required stitches for a head wound before later being released.

He said he struggled with the assailant but was concerned he would overpower him.

"He brings out this tomahawk and he swings over the top with his right hand and I managed to block him a bit, but he still got me on the noggin," Mr Williams said.

"I had two hands on the tomahawk, he had two hands on the tomahawk - I'm pretty strong, but so is he.

"At one point I actually thought, I don't know if I can win this and that was scary."

Hooten appeared in Gosford Local Court on Wednesday and did not apply for bail.

He is charged with wounding with intent to murder and wounding with intent to cause grievous bodily harm.

Court documents reveal Hooten arrived in Australia last week, was staying in a Gosford motel and had a pre-booked flight home this Friday.

The case has been adjourned until September.

Do you know more about this story? Email investigations@abc.net.au