Delete distractionsFocus on code that matters

Unused code is wasting your time and money
Periphery finds unused code in Swift projects so teams can stay focused

SVG product preview showing a Periphery scan and Swift source file

A new chapter for Periphery

— Ian Leitch, author of Periphery

For over 7 years, Periphery has been an open-source passion project of mine. I’ve spent countless evenings and weekends working to get it to where it is today. It has taken a huge amount of effort, but I did it for one simple reason: I’m passionate about building software, and I believe that keeping unused code in check is a key part of doing it well. Periphery has matured significantly over the years, and today some of the world’s most well known companies use it in their build pipelines. Periphery is now a tool primarily used by professionals, not just hobbyists.

As much as I love Swift, it is objectively a large language. It aims to support a wide range of use cases, and its broad feature set reflects that. Periphery has to account for all of these features in order to produce thorough and accurate results. That’s no easy task, and Swift is constantly evolving.

There’s a lot I’d like to improve in Periphery: new features, better integration with CI environments, improved performance and more advanced static analysis approaches. But that’s a lot of work, and on top of the current maintenance required to keep Periphery in sync with new Swift versions, it’s unlikely to happen as a side project. That’s why I’ve decided to turn Periphery into a commercial product. The income will allow me to focus on supporting and expanding Periphery’s role as an vital tool in professional Swift projects.

Small indie and hobby projects will be able to use Periphery for free, so too will open-source projects of any size. Larger projects developed by companies with the resources to purchase a license will benefit from a more capable tool. The first phase in this transition is an open beta. Everyone can obtain a free beta license with no restrictions on project size. The open beta doesn’t have an end date yet, but ample notice will be given when that date is determined.

I sympathize that not everyone will be happy with this change, but I do believe it’s the right one for Periphery to achieve its full potential. The open-source Github version of Periphery remains available under the permissive MIT license, and you are welcome to fork it and make changes as you please, though the main repository will remain archived.

If you're still onboard with this change and want to see what the future has in store, I invite you to join the open beta.

So what’s new?

An overview of the improvements so far in the Open Beta

Performance

Up to 3× reduction in scan time

Significant performance improvements open up new opportunities for running Periphery locally and in CI, even for the largest Swift projects.

ProjectLOCBeforeAfterReduction
AWS SDK for Swift3,743,69756.77s18.91s66.69%
Telegram iOS1,579,05419.28s7.24s62.45%
DuckDuckGo iOS424,7406.63s2.87s56.71%
Stripe iOS SDK186,4083.97s2.29s42.32%
AI-assisted cleanup

Turn scan results into precise code changes

The agent-prompt output format gives AI coding agents structured, result-specific guidance so they can accurately remove unused code for you.

Agent prompt guidance and a precise Swift code removal
Measurable impact

See how much unused code is weighing you down

Periphery estimates removable lines of code and their share of your project, helping you quantify the problem and the impact of cleaning it up.

Terminal output showing Periphery's removable unused code estimate
Bazel integration

Do more with Periphery in Bazel

rules_periphery improves Bazel support with additional rules so you can use Periphery consistently across development and CI.

RulePurpose
scanPrints results from bazel run
scan_autoSame as scan, with automatic top-level target identification
scan_testFails bazel test when unused code is found
scan_reportWrites a report artifact for other rules to consume
Open source

Scan with the reusable GitHub workflow

Run the official reusable GitHub workflow to build and scan your public repository—no Periphery account or access token required.

GitHub Actions workflow configured to run Periphery for a public repository
VS Code extension

Find unused code without leaving your editor

Periphery for VS Code scans your Swift package after each successful build and reports unused code directly in the Problems pane.

Light-themed VS Code extensions panel with Periphery selected

There’s more to come

Join the open beta and experience the future of Swift static analysis

Join the Open Beta