Loading...
Unleash's open-source model means your team may have hundreds of self-managed toggles with no automatic archival. FlagShark integrates with the Unleash API to identify toggles that have been 100% enabled for weeks and generates TypeScript-safe removal diffs.
FlagShark generates a PR that removes the dead branch and keeps only the winning code path
import { useFlag } from '@unleash/proxy-client-react';
function NotificationBell() {
const showBadge = useFlag('notification-badge');
return (
<div className="bell-icon">
<BellIcon />
{showBadge && <Badge count={unreadCount} />}
</div>
);
}function NotificationBell() {
return (
<div className="bell-icon">
<BellIcon />
<Badge count={unreadCount} />
</div>
);
}FlagShark uses AST parsing with ts-morph for precise SDK call detection to find every call to isEnabled(), getVariant(), getAllToggles()across your React, Next.js, Node.js codebase.
Each detected flag key is matched against your Unleash project to check rollout status, last evaluation date, and whether the flag is archived or still active.
For each stale flag, FlagShark creates a pull request that removes the SDK call, eliminates the dead code branch, and preserves the winning path. Every PR includes a before/after diff you can review.
The Unleash Proxy React SDK uses `useFlag` and `useVariant` hooks that look similar to other hook libraries — FlagShark distinguishes Unleash-specific hooks from custom hooks by tracing the import source.
Grep misses flags behind abstractions. AST-level scanning catches SDK calls that regex can't.
Every cleanup goes through code review. No surprises, no broken builds.
Only flags at 100% rollout for your configured threshold are suggested for removal.
New stale flags are detected automatically. Your codebase stays clean without manual audits.
isEnabled()getVariant()getAllToggles()Plus custom patterns you define in .flagshark.yaml
FlagShark traces imports from `@unleash/proxy-client-react` and `unleash-client`, then finds every `useFlag()`, `isEnabled()`, and `getVariant()` call in your codebase. It correlates toggle names against the Unleash API.
Yes. FlagShark detects `useVariant` hooks and maps each variant payload to a code branch. When a variant has been rolled out to 100%, it inlines the winning variant's value and removes the others.
FlagShark supports both the Unleash Proxy and Unleash Edge. It reads toggle states from whichever endpoint your app is configured to use and matches them against your source code.
Connect your repo, see stale flags in minutes, and get cleanup PRs automatically.
Free tier available • No credit card required • 5-minute setup
Identify and safely remove stale Unleash toggles from Django, FastAPI, and Flask Python applications.
Systematically identify and remove stale Unleash toggles from Go services and CLI applications.
Find and remove dead Unleash toggles from Spring Boot applications and Java microservices.
Detect and safely remove stale Unleash feature toggles from Rails applications and Ruby services.
Use Rust's type system and FlagShark to find and remove dead Unleash toggles from Actix and Axum services.
A hands-on guide to finding and safely removing stale LaunchDarkly feature flags from TypeScript and React codebases.
Detect and remove abandoned Split.io treatments from your TypeScript frontend and Node.js backend.
Detect and remove abandoned PostHog feature flags from React and Next.js TypeScript applications.
Find and safely remove stale Flagsmith flags from React and Node.js TypeScript codebases.
Detect and remove stale ConfigCat feature flags from React and Node.js TypeScript projects.