Sean Sweeney opened the door to the refurbished 1839 barn behind his home in Wayne, Pa., outside of Philadelphia. Inside, one bicycle after another hung from hooks screwed into a beefy ceiling beam: Mr. Sweeney’s triathlon bike, road bike and two mountain bikes dangled alongside four bikes belonging to his wife and one of his three daughters. Mr. Sweeney races often, and the whole family competes in triathlons.

The 59-year-old Mr. Sweeney, a strategic adviser for the Tokio Marine insurance companies, always hated hauling the bikes to a local shop to be tuned up and repaired. “I have to carry that big thing right there,” he said, gesturing toward a bicycle rack for his car. “I have to load it; it smacks my legs. My wife and kids, they all hate doing it, and we all put it off.”

On this day, however, Mr. Sweeney only had to point to the bike he wanted repaired — a Trek hardtail mountain bike with a few mysterious squeaks after a recent race — and the work was underway. Seth Samson, a bicycle mechanic for a company called Velofix, rolled the bike into a large red van parked in Mr. Sweeney’s driveway, clipped it to a stand and started taking it apart.

As Mr. Samson worked, Mr. Sweeney asked him about a bike he wanted to buy, a light and fast off-road bike he thought would give him an advantage in a race. The bike would be bought through this Velofix franchise, part of a Canadian mobile bike shop company, and Mr. Samson would deliver it to his door, assembled and ready to ride.

“The fact that these guys come here to me is a home run,” Mr. Sweeney said.

Velofix has over 80 franchises in Canada and the United States. The one Mr. Samson works for is owned by Justin Brundage, 46, an avid cyclist who also has a job at a financial services firm. Mr. Brundage leased two territories in the Philadelphia area.

Working with Velofix, Mr. Brundage purchased the oversize Mercedes diesel van, which was wrapped in the red, white and black Velofix logo and outfitted with a bike stand, tools and tool cases, trays of parts as well as accessories like glasses, gloves and water bottles. Velofix also contracts with about a dozen bike manufacturers to assemble and deliver bikes purchased online through the manufacturers’ websites.

It isn’t the only company taking this approach: Beeline Bikes in California also offers mobile bike-repair franchises.

This is just one of several changes coming to an industry that has resisted many of the innovations that have altered others over the last 15 years. Some smaller bike companies have sold their bikes online for some time, but now the industry’s largest manufacturers are offering bikes directly to consumers via their web pages.

All of this presents the possibility of better service and perhaps even lower prices for consumers. But it has also raised concerns for the future of the neighborhood bike shop. The bicycle industry has hardly been a bastion of health. Since 2000, about 40 percent of bike shops have closed or have been consolidated by larger chains. Bike sales have remained essentially flat over the same time.

Some of the problem lies with the big bike manufacturers, said Todd Grant, the executive director of the National Bicycle Dealers Association, which represents independent bike shops. The biggest companies provide incentives for shops to carry their brands; generally, if 60 percent or more of a shop’s inventory is from a single top-selling brand, the store will get better terms on its credit. (Bikes are usually supplied upfront and paid off later.)

These shops can have a hard time making room for small, innovative companies that may interest more cyclists. “It squashes innovation,” Mr. Grant said. “They can’t get their brands in the door. No one rides it or learns about it.”

Eric Bjorling, a spokesman for the Trek Bicycle Corporation, said that his company offers such incentives but that shops determine what brands to carry. The incentives help Trek better manage its inventory and supply chain, he said, adding, “The biggest thing is to help retailers run a great business and create a great brand.”

Many smaller companies have been relegated to the margins. Brad Accettella, the director of Eddy Merckx Cycles USA, said that to appeal to retailers, his company offers competitive credit terms even if shops order only a small number of bikes.

Even Raleigh bicycles, the fifth-best-selling brand in the United States, was shut out of many stores, said Chris Speyer, the managing director for Accell North America, which owns the Raleigh and Diamondback brands. Raleigh used to encourage shops to carry its bikes and accessories, but it recently dropped those incentives. “It was not healthy for anyone anymore,” Mr. Speyer said. “It was more like the mortgage crisis than a proper retail relationship.”

Many smaller manufacturers work with major online retailers like Competitive Cyclist, which was acquired by the online outdoor gear retailer Backcountry in 2011. Jonathan Nielsen, Backcountry’s C.E.O., said the big bicycle manufacturers were resistant to both companies’ online sales models as late as 2008 and 2009, when Backcountry first entered the cycling market. So it began carrying bikes from smaller manufacturers like Santa Cruz Bicycles and Yeti Cycles. That helped those companies reach new customers and increase sales outside of bike shops. As the brands became more successful, shops began to pick them up, too.

“We can showcase really innovative stuff,” Mr. Nielsen said. “Our customers have come to expect that.”

Buying a bicycle online is not as simple as buying a T-shirt. High-end bikes, which can cost well over $5,000, come in as many as 10 sizes. Buyers choose from frames made of carbon fiber, certain types of steel or other metals. There are single-speed, fixed-gear, road, time-trial, cyclocross, hybrid, commuter and many types of mountain bikes. Bike shops have long helped cyclists find the right fit.

Charles McCorkell, who owns Bicycle Habitat, which has two stores in Brooklyn and two in Manhattan, is part of Trek’s direct-to-consumer sales program. Customers choose a bike on Trek’s website, pay for it and pick a shop to receive it. (Trek, like most major manufacturers, will not send the bike directly to consumers). Trek sends the bike to the store, where it is assembled for the customer, who must pick it up in person.

Of the 15 Trek orders Mr. McCorkell has received this way, about five turned out to be the wrong size or bike for the customer, he said. That presents a problem because the bike is not part of the shop’s inventory, and the store earns much less on these sales. Mr. McCorkell said that so far he has been able to return the bike and get the customer another Trek bike. Mr. Bjorling said Trek was improving the consumer education portion of its website to help its customers make better choices.

In an industry looking for ways to reach out to consumers who are accustomed to buying online, this model is only growing. Beeline Bikes assembles and delivers bikes bought on Raleigh’s and Diamondback’s websites as well as those bought through Backcountry and Competitive Cyclist. (Accell and Backcountry are investors in Beeline.) Velofix, which has similar arrangements with about a dozen small brands, including Eddy Merckx, will also help fit customers to a bike before they order one. Beeline and Velofix also provide services for bikes bought on Amazon.

Manufacturers like that customers have a point of contact with a certified mechanic for repairs and adjustments. The convenience of receiving that service at home is an added bonus. But in an effort to avoid undercutting local shops, most companies do not discount bikes when they sell them directly; in fact, buyers may find better prices in their local shop.

Many bike shops are already reacting to these changes. Richardson Bike Mart, a three-store chain in the Dallas area, started its own mobile repair service. Though many shop owners worry that such a service could cannibalize their business, that has not been the case, said the store’s owner, Woody Smith. So far, 65 percent of his mobile repair customers are new.

Even in traffic-clogged New York City, Mr. McCorkell of Bicycle Habitat has looked into getting his own repair van because, he said, he knows he cannot be complacent.

“The change in the outside world is profound,” he said. “We haven’t been as affected by the internet as bookstores and record stores, but it is coming.”