Kumail Nanjiani has enlivened everything from jeans commercials to Oscar clip packages, so it’s no surprise that in “Stuber,” he’s able to perk up a buddy comedy that follows the “Lethal Weapon”/“Rush Hour” template so slavishly that it could be titled “Lethal Hour” or “Weapon Rush” or “Lethal Rush.” You get the idea.

Nanjiani, who co-wrote and starred in the hilarious and moving “The Big Sick,” plays the title character, a mild-mannered, gig-economy guy named Stu whose gigs include driving an Uber. One day, it’s his bad luck to pick up a ridiculously brawny cop (Dave Bautista) who is on the trail of some murderous bad guys and who forces Stu to become his getaway driver.

How does he do that? The running joke is that Stu is so dependent on getting five-star ratings from customers that he’ll go along with just about anything they ask him to do, up to and including offing crooks.

“Stuber” is at its worst when director Michael Dowse and writer Tipper Clancy think we might care about the tedious action-adventure plot, but it’s at its best when it conveys the impression that the nimble, sardonic Nanjiani is just riffing.

When Bautista, whose shoulders appear to be wider than he is tall, barrels into Stu’s car, Stu cracks, “Let me guess. You want me to drive you to all the Sarah Connors in town?” I’m not even sure it’s an especially good joke, but Nanjiani has such an exacting approach to the material that he makes everything he says seem about twice as funny as it is. (It also would not be a surprise to learn Nanjiani, a screenwriting Oscar nominee for “Big Sick,” sweetened up Clancy’s script.)

Bautista improves on the material, too, making good on the “Guardians of the Galaxy” hint that he might be capable of being more than a one-joke musclehead. The muscles are still there, of course, and the fact that Bautista could easily bench-press the slight Nanjiani is part of the fun of “Stuber.” They look amusing together, and that works as a visual metaphor for how funny it is to have their very opposing vibes crammed in a car for 93 minutes.

Brevity is the soul of “Stuber,” which is smart enough to realize that its goals are modest (make us chuckle every minute or so) and to call it quits as soon as that’s accomplished. In the process, some things are lost that might have made it a better movie — supporting characters who have any character at all, development of the idea that the guys share an inability to express their feelings, awareness that the gig economy is no picnic for its practitioners — but there’s something to be said for a comedy that cares about producing a few big laughs and not much else.