Capped eight times by his country, Kouhyar started his career in the youth system at Coventry City before joining League One outfit Walsall and earning his first professional contract, making 33 appearances and scoring three goals.
After being released through injury, he signed for Hereford in March 2021 on non-contract terms – making an instant impact as part of the team that reached the Buildbase FA Trophy final.
Kouhyar, who found the net against York earlier this month, was the first player this season to be named in the National League North Team of the Week three times in a row.
He is currently on international duty – with Afghanistan due to play against Madagascar on Thursday.
Kouhyar said: “It's no secret that I'm hungry to get back to the Football League and to do that I feel I need to be playing full-time. "There were a few clubs interested in signing me, but when I saw York City's amazing facilities and heard how their plans to get back into the Football League matched mine, it was an easy decision. I can't wait to get playing when I return from international duty, and help York win promotion.
"I'd like to thank Hereford FC, the fans, and manager Josh Gowling for helping me rediscover my love of playing football. It's been a privilege to wear a Hereford shirt, and I wish everyone at the club the very best for the rest of the season and beyond."