A children's court magistrate found the risk was too high as he refused bail to the 15-year-old on Wednesday, after the boy pleaded guilty over the January 12 incident.
He admitted taking the 39-year-old man's phone in St Kilda and then slashing him to the back of the head with a machete as he tried to run away.
The boy also pleaded guilty to assaulting other victims, stealing cars and driving at more than 180km/h between May and October 2024.
He applied to be released on bail before his March sentencing hearing but the magistrate refused, saying he was concerned the boy would hurt someone else if released.
"Someone was clearly scared but also hurt - they were hurt badly," the magistrate told the boy.
"That is so dangerous and you should never be in possession of weapons."
The boy brought a hunting knife to his regional Victorian school in May 2024 and he posted photos online of him holding a machete in October, the court was told.
He also punched a bus passenger in the face in June and stole a car from a Melbourne home in October, before stealing petrol and repeatedly driving the stolen vehicle at high speeds.
The boy assaulted another victim as he and two female co-accused carjacked a vehicle in September, before attempting another carjacking days later.
His lawyer told the court the boy had diagnosed autism, ADHD and an IQ of 62 so his time in custody has been more difficult.
Youth Justice needed five weeks to prepare a pre-sentence report for the court so the boy should be released on bail in the interim, she said.
He had already served 45 days in custody and his ultimate sentence would not necessarily involve more time in youth detention, the lawyer said.
But the magistrate found the sentence could be longer than the boy's pre-sentence detention and he determined there was a risk the boy would endanger the community if released on bail.
He noted the teen had been on intensive bail conditions at the time of the January 12 incident and he still chose to travel from the regions to the city while armed with a weapon.
The magistrate accepted the boy was more vulnerable in custody, but he was also satisfied the teen was being appropriately supported.