Does Jewish tradition hold that Moses wrote the first five books of the Tanach?
G-d dictated the five books of the Torah to Moses. There is just a difference of opinion in the Talmud regarding the last eight verses referring to the death of Moses. One opinion is that Moses also wrote them down (from G-d’s dictation) while prophetically crying about his immediate fate, while the other opinion holds that G-d dictated them to Joshua. The first opinion is more accepted.