For the enterprise plan only :/
npm i figma-library-analytics
Create a .env
FIGMA_ACCESS_TOKEN=your_figma_access_token
FILE_KEY=your_figma_file_key
START_DATE=YYYY-MM-DD
END_DATE=YYYY-MM-DD
As a module
import { libraryAnalytics } from 'figma-library-analytics';
async function runAnalytics() {
try {
await libraryAnalytics();
console.log('Reports generated successfully!');
} catch (error) {
console.error('Error generating reports:', error);
}
}
runAnalytics();
As a CLI tool
figma-library-analytics
Generated in the output
directory
-
actions_by_component.csv
— Actions (detachments and insertions) grouped by component. -
actions_by_team.csv
— Actions grouped by team. -
usages_by_component.csv
— Component usage statistics. -
usages_by_file.csv
— Component usage grouped by file.