Loading...
Piranha removes flag code. FlagShark manages the entire lifecycle—with higher quality removal, continuous monitoring, and a full dashboard.
Open-source CLI tool you run manually. Requires CI/CD integration, rule tuning, and knowing which flags to remove.
Automated platform with pre-tuned rules, stale flag detection, lifecycle tracking, and a dashboard. Install once, forget about it.
Piranha is Uber's open-source AST-based refactoring tool for removing stale feature flags. Originally built for Java, it now supports multiple languages via Polyglot Piranha.
Piranha is great for one-off cleanups when you know exactly which flags to remove. But it's just a CLI tool—you need to build everything else yourself.
| Feature | FlagShark | Piranha |
|---|---|---|
| Setup | 2-click GitHub App install | Manual CI/CD integration |
| Flag discovery | Automatic on every PR | Manual identification |
| Removal quality | Custom rules + post-processing | Default AST rules only |
| Stale flag detection | Configurable thresholds | None |
| Removal PRs | On-demand OR auto-generated | Create yourself |
| Conflict handling | Auto-regeneration | Manual rebase |
| Dashboard | ||
| Lifecycle tracking | Event-sourced history | None |
| Team collaboration | Workspaces, permissions | None |
| Languages supported | 11 (unified config) | 7+ (separate configs) |
| Notifications | Slack, email, WebSocket | None |
| Provider integrations | LaunchDarkly, Unleash, Split.io | Configure yourself |
FlagShark produces cleaner, more readable removal PRs than raw Piranha output
Pre-tuned for LaunchDarkly, Unleash, Split.io patterns
Removes unused imports, dead branches, dangling comments
Result matches your codebase's style conventions
Works out of the box—no rule tuning required
Not optimized for specific providers
May leave unused imports, odd formatting
You write and maintain custom rules
PRs often need manual cleanup before merging
FlagShark gives you Piranha's on-demand cleanup plus continuous automation
Trigger removal PRs on-demand for specific flags—just like running Piranha manually.
Scheduled cleanup runs automatically detect and remove stale flags. No cron jobs needed.
Full visibility into flag health, age, and removal status across all repositories.
Get alerted via Slack or email when flags become stale. Never forget a cleanup.
“CLI simplicity + platform power”
Run cleanups on-demand when you need them, but also get continuous monitoring, lifecycle tracking, team collaboration, and analytics for free.
Piranha removes code. FlagShark tracks the entire flag journey.
Every flag change is recorded immutably—when it was added, modified, or removed. Full audit trail for compliance.
Know exactly when each flag was introduced and how long it's been in the codebase. No more guessing.
SOC2-friendly audit trails. Demonstrate when flags were cleaned up and by whom for compliance reviews.
Piranha is a CLI. FlagShark gives you a full analytics dashboard.
GitHub-style heatmaps showing flag activity across your organization.
Risk assessment for each repository based on flag age and count.
Time-to-merge charts for removal PRs. Track cleanup velocity.
Monitor technical debt per repository. See trends over time.
See which teams are keeping codebases clean and who needs help.
WebSocket-powered live updates. See changes as they happen.
Piranha is free. But is it really?
FlagShark pays for itself after removing just 2 flags per month when you factor in engineer time.
Yes. If you already have Piranha integrated, you can use FlagShark for detection, lifecycle tracking, and analytics while keeping Piranha for the actual removal. However, most teams find FlagShark's integrated removal to be simpler.
FlagShark uses tree-sitter for flag detection and includes custom rules on top of standard AST transformation techniques. We've invested heavily in post-processing to produce cleaner output than raw Piranha.
You can migrate gradually. Start using FlagShark for new repositories and benefit from the dashboard immediately. Over time, you can deprecate your Piranha setup as FlagShark handles more of your cleanup.
The software is free (Apache 2.0). But setup takes 8-16 hours, maintenance takes 4+ hours/month, and manually identifying flags to remove takes 2+ hours/week. At $150/hour engineer time, that's $10,000+ in year one.