Based on the comments, the things your manager is saying are not "jokes", let's get that straight. When he says he's "thinking of making an offensive joke", that's a different situation from this one, so I'm discounting that from my answer.
It sounds to me like this manager is not happy with your performance. Based on the examples in the comments, I can glean a few things that he (rightly or wrongly, I'll get to this in a moment) be thinking:
- His team (i.e. you and your colleagues) are not up to the task of the work being given ("PM will realize they're working with idiots")
- He thinks you are working too slowly and/or are taking too long on simple tasks ("I could do this in 10 minutes")
- He is doing a lot of work covering for you ("this person hasn't done a single OK thing without my help")
- You are wasting time by asking obvious questions ("If you ask another question again I'll think you're a troll")
These things, from the perspective of a manager, are serious problems. If you have underperforming subordinates, that's not a good thing; it means projects don't get done on time and with quality, which makes you look bad as a manager. In a startup environment this is even worse, because with a small headcount in the company each person has to pull more weight; if you have bad people, and those people have a lot of responsibilities, well, necessarily a lot of things will go to shit quickly.
To be clear, I'm giving your manager the benefit of the doubt, that he honestly believes, rightly or wrongly, that his subordinates are underperforming. I'm not saying you are underperforming, I'm simply saying that he honestly believes you are (without any sort of sub-agenda).
Now, there are really only 2 possibilities when your manager thinks you are underperforming: Either you really are underperforming, or your manager's expectations are too high. Here's how to deal with each of them:
To deal with you underperforming, you may need to find another job. This particular company has too high of a performance bar for you. They're looking for serious rockstars to bootstrap their company, and that's not you. Go to another company, get some more experience, and maybe in a few years you can try again.
To deal with your manager's expectations, you may need to have a sit-down chat with your manager and discuss their expectations of you. Are you not developing fast enough? Are your tickets taking longer than they're supposed to? Is your code messy? In what way is there a problem and how can you fix it? Note that you may begin the discussion thinking it's your manager's expectations and come out of the meeting realizing it's your own performance and the manager's expectations are reasonable, so be open to that. Another thing you can discuss is, particularly regarding the "I could do this in 10 minutes" comment, ask him how he could do it in 10 minutes. Don't be sarcastic, but actually ask him. Perhaps you missed something that you could learn from. But also perhaps he was just being a blowhard and when he actually gets challenged on it he'll shut up.
Now, as for the actual language he used, it's unprofessional to say things like that, especially as a manager who is supposed to be promoting the morale of their team, these sorts of comments shoot down morale like a bullet. The thing is, on this message board, a lot of questions get asked only when situations reach their boiling point, and nobody thinks about what it took to get there. Take a step back, and think about what happened over the time you've been at this company. How many times has your manager tried to amicably resolve these types of issues before they started going off on you? Since you say your manager started as being kind, empathetic (not "empathic", that's a different word), reasonable, and so on, I'm guessing your manager wasn't always this abrasive personality. However, it's human nature, over time, if you see a problem that just won't resolve itself no matter how much effort you put in, you eventually become upset and frustrated, and it can come out in unpleasant ways. Think about if this may be your situation. It's important to understand and acknowledge this, because if you can admit fault (and you have reason to admit fault; obviously don't admit fault if it's not your fault) then you can be part of the solution. It sounds to me like you may have a part to play in this as well.