feat(cli): add disable analytics option (#496)

This commit is contained in:
Aman Varshney
2025-08-12 08:21:26 +05:30
committed by GitHub
parent 75b0919399
commit 3c00c5453f
7 changed files with 46 additions and 3 deletions

View File

@@ -36,6 +36,7 @@ async function createProject() {
auth: true,
packageManager: "bun",
install: false, // Don't install deps automatically
disableAnalytics: true, // Disable analytics
});
if (result.success) {
@@ -62,6 +63,23 @@ const result = await init("existing-folder", {
});
```
### Disabling Analytics
You can disable analytics:
```typescript
import { init } from "create-better-t-stack";
const result = await init("my-private-project", {
yes: true,
disableAnalytics: true, // No analytics data will be sent
frontend: ["tanstack-router"],
backend: "hono",
});
```
> **Note:** Analytics help improve Better-T Stack by providing insights into usage patterns. When disabled, no data is collected or transmitted.
## API Reference
### `init(projectName?, options?)`
@@ -130,6 +148,7 @@ interface CreateInput {
webDeploy?: WebDeploy; // Web deployment setup
directoryConflict?: DirectoryConflict; // "merge" | "overwrite" | "increment" | "error"
renderTitle?: boolean; // Show ASCII art title
disableAnalytics?: boolean; // Disable analytics and telemetry
}
```