Pearson initially threatened to harm himself before directing his anger at his girlfriend.
After discarding the knife, he claimed he would kill the woman, and first tried to snatch her phone, then tried to wrestle the 6-week-old baby from her.
Three months earlier, Pearson was the passenger in a vehicle driving through Owaka.
He had a paint-ball gun with him.
They drove past his girlfriend's mother's house and Pearson peppered it with capsules.
One hit a window, smashing it.
The victim said two of her children had just gone to bed, but had been sitting under that window shortly before the incident.
The court heard she had since bought security cameras.
"She now worries at night if she hears a noise or the dog barking," Judge Michael Turner said.
Counsel Steve Turner said Pearson was immature but had spent several months on electronically monitored bail, proving he could serve a community-based sentence.
The defendant had also looked into a Stopping Violence course and was in full-time employment, showing he had "taken some steps towards acting like a grown-up", Judge Turner said.
The judge noted Pearson had 22 convictions on his record, mostly for dishonesty and breaching court-imposed sentences.
More recently he had served a term of home detention for groping a woman in a supermarket carpark.
Pearson was ordered to pay $509 in reparation.