Write the music, lyrics, and book, and also star--who has done this?

Lin-Manuel Miranda wrote the music, lyrics, and book for Hamilton, and also played the starring role. I cannot think of anyone else who has done this and achieved any significant notoriety.

I cannot think of any other examples of this. The most famous theatrical musical composers were music/lyrics duos like Rodgers & Hammerstein, Leonard Bernstein & Stephen Sondheim, Rodgers & Hart. I guess you’ve got Cole Porter but he didn’t appear in his own musicals.

Any other examples?

Richard O’Brian with The Rocky Horror show is close - he wrote both the original musical and film screenplay, and has a significant though not starring role

It’s not a musical, but Tommy Wiseau was pretty much single-handedly responsible for the movie “The Room.”

There are plenty of people who have written, directed and starred in their own films or shows (right now Michaela Coel is getting noticed for creating, writing, executive producing, co-directing, and starring in “I May Destroy You”) but musicals? That’s gonna be a very small list indeed. Paul Williams scored and appeared in Phantom of the Paradise but it was written and directed by Brian de Palma (and Williams wasn’t the star). Miranda may well be unique, at least at his level (there have probably been many local productions of second-rate musicals penned by aspiring artistes that never got further than their initial run).

Charlie Chaplin. He wrote, directed, and starred in City Lights and also composed the musical score. He continued to do so for all his sound films and won an Oscar for his score for Limelight.

I’m also curious whether we’re talking only about musical theatre here, or if musical films count. If the latter, then the Beatles count, having written, scored, directed, and starred in Magical Mystery Tour.

Anthony Newley wrote, directed, starred, and composed the music for Stop the World, I want to Get Off and The Roar of the Greasepaint, the Smell of the Crowd.

George M. Cohan regularly did it all, too.

Yeah, I thought of him. Can anyone name specific shows where he did it all in the same show?

If that counts, perhaps McCartney’s 1984 film “Give My Regards To Broad Street” does too.

Are there “rock operas” that count? Ray Davies’ telepay “Starmaker,” the basis for the Kinks album Soap Opera, comes to mind.

Does This is Spinal Tap count as a musical? Everything is otherwise checked according to the OP: the script and music were written by McKean, Guest, Shearer and Reiner, who also starred in the film. Reiner directed.

Oh, wait… there wasn’t a book.

I would call Spinal Tap a parody of a documentary. Yes, it had music, but only because it was a documentary of a band. They were not part of the story. To qualify as a musical, the songs must move the story forward.

In musicals, “book” means the story/script.

The late, great Vivian Stanshall wrote, wrote the music for, performed the songs for, narrated and appeared in a major role in Sir Henry At Rawlinson End.

Not just a film, more a series of alternate universes of weird. Here’s Aunt Florrie’s Waltz - tangentially related to the film.

j

Prince with, “Under the Cherry Moon”?

Bruce Kimmel, who wrote the music and screenplays for The First Nudie Musical and The Creature that Wasn’t Nice. He acted and directed both. He got Cindy Williams to be in both, and Creature (sort of a musical comedy version of Alien) also had Patrick MacNee and Leslie Nielsen. He’s also acted in numerous TV shows and is a Grammy-nominated CD producer. I am awed.

This is a film and is not a musical: the 2004 film Primer was written, directed, produced, filmed, edited, scored by and starred Shane Carruth. He was also the production designer, sound designer and casting director AND he performed and recorded the score by himself. Really, except for the 5 or 6 roles in the film that weren’t his character, he did everything himself on a budget of just $7,000.

And it’s the best time travel movie ever made.

Forty-Five Minutes from Broadway (1906)
George Washington, Jr. (1907)
The Honeymooners (1907) (opened after the previous entry closed)
Little Johnny Jones (1908) (the one with “Yankee Doodle Dandy.”
Little Nellie Kelly (1922)

Many of his productions did not list a director. Some listed him as him as “Staged by,” which is the same thing. He probably directed most of his musicals.