A Manhattan crook who called himself “the general’’ employed a military-styled theft ring that for decades ripped off stores like Best Buy and Staples, netting at least $20 million selling stolen electronics on Amazon and eBay, authorities said Wednesday.

Richard Rimbaugh, 64, the mastermind behind the electronics-swiping gang, employed 11 cohorts in what officials dubbed “Operation Sticky Fingers.”

Those included ground troops with nicknames that would have made a Mafioso proud, including “Nipplehead,” “Princess” and “Baby Arm Johnson.” They helped target stores in 28 states, including Best Buy, Staples and Office Depot, Attorney General Eric Schneiderman said.

The gang would launch stealth raids on the stores, then resell the hot goods, most recently on the Internet.

“Since 2009, [Rimbaugh] has resold more than $20 million in stolen goods,” Assistant Attorney General Shanon LaCorte said in court.

Authorities believe Rimbaugh has operated the illicit business since the 1980s.

“It was run with almost a military-like precision,” Schneiderman said.

“This is not shoplifting. This is organized crime. They kept very detailed records of how well crews had done on a mission.”

Rimbaugh’s second-in-command, “Field Marshall” George Athanasatos, advised the crew on which stores to target, the AG said.

He would tell members where they were headed for the day, handing out maps showing which specific stores to hit, authorities said. The crew would be reimbursed by Rimbaugh for expenses such as airfare and car rentals just like any other “business,’’ officials said.

“Captains” then managed crew members on site.

“Sergeants” donned special customized vests with hidden pockets to stash HP and Epson ink cartridges, Bose Quiet Comfort 35 headphones, Coolpix digital cameras and FitBit bracelets.

To sneak out without triggering any security alarms, the gang used security-disarming devices they referred to as “kryptonite,” authorities said.

Meanwhile, “lieutenants” served as lookouts.

“They would only target one store per area. They understood that they had to keep moving, that they would not stick in one area for too long,” Schneiderman said.

The stolen goods were eventually shipped to Rimbaugh, who sold them at retail prices, including on Amazon and eBay through his online reseller “American Media Soft,” officials said.

Authorities busted the ring after a 10-month probe.

They seized $7.7 million from Rimbaugh’s accounts and more than $1 million worth of stolen goods at his apartment in Morningside Heights, which was stacked floor-to-ceiling with boxes, Schneiderman said.

As he was arrested Monday, a UPS driver was in the process of delivering five boxes filled with looted merchandise to his apartment, the AG said.

Rimbaugh and Athanasatos were held on $500,000 bail after pleading not guilty Wednesday in Manhattan Supreme Court.

“Since 2009, [Rimbaugh] has resold more than $20 million in stolen goods,” Assistant Attorney General Shanon LaCorte said in court.

The “captains” were identified as George Rapatsouleas, aka “Skipper” and “Nipplehead,” 62, of Brooklyn; Roger “Captain Rog” Ringhiser, 53, of Long Beach; Gregory “Captain Frank” Anastasiou, 38, of East Stroudsburg, Pa.; and Robert “Reno” Scarano, 56, of Las Vegas.

“Lieutenants” are Krissylee “Princess” Harris, 35, of Brooklyn; Frank Albergo, 59, of Oviedo, Florida; and Giovanna Bonello, 28, of Staten Island.

Joseph “Baby Arm Johnson” Pooler, 41, of Stroudsburg, Pa.; Nusret “Monte” Srdanovic, 23, of Brooklyn; and Kevin Cerrato, 22, of Elmont, New York served as “sergeants.”

The dozen defendants are charged in 41-count indictment with money laundering, enterprise corruption, conspiracy and criminal possession of stolen property and face up 25 years behind bars.