thanks-to
v1.1.5
Published
Generate beautiful acknowledgments for your project's dependencies
Maintainers
Readme
thanks-to
Generate beautiful acknowledgments for your project's dependencies.
Perfect for open source credits, docs, audit reports, or legal compliance.
Features
- ✅ Auto-detect
dependenciesanddevDependencies - ✅ Separate
directandtransitivedependencies - ✅ Export to Markdown, JSON, CSV, and HTML
- ✅ Filter by license name or package
- ✅ Optional: Include full license content per package
- ✅ Monorepo support – auto-scan
packages/*,apps/*with--mono-repo - ✅ Works via CLI or programmatic API
Installation
npm install --save-dev thanks-toOr run directly without install:
npx thanks-toCLI Usage
npx thanks-to [options]Options
| Option | Description | Default |
| -------------------------- | ------------------------------------------------------------- |----------------- |
| --help | Show usage instructions and available options | - |
| --mono-repo | Scan all package.json in packages/** and apps/** | false |
| --dir <path> | Manually specify project folder to scan | . |
| --transitive | Include transitive (indirect) dependencies | false |
| --report <types> | Export formats: json,md,csv,html (comma-separated) | json,md,csv,html |
| --output <dir> | Custom output folder | ./thanks-to |
| --silent | Suppress logs | false |
| --only <group> | deps, devDeps, or all – choose which group to include | all |
| --only-license <list> | Only include licenses in list (e.g. mit,apache) | - |
| --exclude-license <list> | Exclude licenses (e.g. gpl,agpl) | - |
| --include-package <list> | Only include package names in list (e.g. express,vue) | - |
| --exclude-package <list> | Exclude package names (e.g. left-pad,lodash) | - |
| --with-license-text | Include full license text from packages if available | false |
Examples
# Export default deps into all formats
npx thanks-to
# Export only markdown
npx thanks-to --report md
# Include devDependencies and transitive packages
npx thanks-to --only all --transitive
# Only include MIT or Apache licensed packages
npx thanks-to --only-license mit,apache
# Exclude GPL or AGPL licensed packages
npx thanks-to --exclude-license gpl,agpl
# Only include express and chalk
npx thanks-to --include-package express,chalk
# Export only devDependencies to JSON
npx thanks-to --only devDeps --report json
# Include license text and export as HTML
npx thanks-to --with-license-text --report html
# Export into docs folder
npx thanks-to --output ./docs/credits
# Scan all packages in monorepo (packages/* and apps/*)
npx thanks-to --mono-repo
# Manually scan a single project
npx thanks-to --dir ./packages/docs --report mdAPI Usage
You can use thanks-to in both ESM and CommonJS environments.
ESM
import { generateThanksData, exportReports } from 'thanks-to';
const data = await generateThanksData({ transitive: true });
await exportReports(data, ['md'], './output');CommonJS
const { generateThanksData, exportReports } = require('thanks-to');
(async () => {
const data = await generateThanksData({ transitive: true });
await exportReports(data, ['md'], './output');
})();If you're using TypeScript, the library automatically infers types from exported definitions.
API Options
Options {
dir: string;
monoRepo: boolean;
transitive: boolean;
withLicenseText: boolean;
only: 'all' | 'deps' | 'devDeps';
onlyLicense?: string[] | null;
excludeLicense?: string[] | null;
includePackage?: string[] | null;
excludePackage?: string[] | null;
}Output Formats
JSON
Structured data grouped by type (direct, transitive):
{
"dependencies": {
"direct": [
{
"name": "express",
"version": "4.18.2",
"license": "MIT",
"author": "...",
"description": "..."
"repository": {
"url": "https://www.npmjs.com/package/express",
"git": "https://github.com/express/express"
}
"licenseContent": "..." // if --with-license-text used
}
]
}
}Use case
- Add credit to the open-source community
- Show dependencies in published research or products
- Required for compliance in some orgs
- Just be a good human
Changelog
See full release notes in CHANGELOG.md
License
MIT © Yuki
