A surgical instrument includes a body, a shaft, and an end effector. The shaft extends distally from the body. The end effector is located at a distal end of the shaft. The end effector includes an active feature configured to operate on tissue. The body includes a drive feature operable to drive the active feature of the end effector. The body is operable to selectively couple with a variety of power sources such that the drive feature may receive electrical power form a battery or from a corded power source, based on a user's preference. The body may include a handpiece that has a socket configured to receive a battery or cable adapter. The body may removably receive various kinds of shaft assemblies to provide various operating modalities. The shaft assemblies may include user interface features.