Skip to content

Commit 5435dd3

Browse files
Replace log.info with note for post-install instructions and Update
readme
1 parent bcedaee commit 5435dd3

File tree

4 files changed

+52
-66
lines changed

4 files changed

+52
-66
lines changed

.changeset/red-banks-dig.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"create-better-t-stack": patch
3+
---
4+
5+
Replace log.info with note for post-install instructions

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,6 @@ bun dev:cli
5757
bun dev:web
5858
```
5959

60-
## Contributors
60+
## Want to contribute?
6161

62-
<a href="https://github.com/better-t-stack/create-better-t-stack/graphs/contributors">
63-
<img src="https://contrib.rocks/image?repo=better-t-stack/create-better-t-stack" />
64-
</a>
65-
66-
Made with [contrib.rocks](https://contrib.rocks).
62+
Just fork the repository and submit a pull request!

apps/cli/README.md

Lines changed: 30 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Follow the prompts to configure your project or use the `-y` flag for defaults.
3434
- **Desktop Apps**: Build native desktop apps with Tauri integration
3535
- **Code Quality**: Biome for linting and formatting
3636
- **Git Hooks**: Husky with lint-staged for pre-commit checks
37-
- **Examples**: Todo app with full CRUD functionality
37+
- **Examples**: Todo app with full CRUD functionality, AI Chat using AI SDK
3838
- **Developer Experience**: Git initialization, various package manager support (npm, pnpm, bun)
3939

4040
## Usage
@@ -43,39 +43,27 @@ Follow the prompts to configure your project or use the `-y` flag for defaults.
4343
Usage: create-better-t-stack [project-directory] [options]
4444

4545
Options:
46-
-V, --version Output the version number
47-
-y, --yes Use default configuration
48-
--no-database Skip database setup
49-
--sqlite Use SQLite database
50-
--postgres Use PostgreSQL database
51-
--auth Include authentication
52-
--no-auth Exclude authentication
53-
--pwa Include Progressive Web App support
54-
--tauri Include Tauri desktop app support
55-
--biome Include Biome for linting and formatting
56-
--husky Include Husky, lint-staged for Git hooks
57-
--no-addons Skip all additional addons
58-
--examples <examples> Include specified examples
59-
--no-examples Skip all examples
60-
--git Include git setup (default)
61-
--no-git Skip git initialization
62-
--npm Use npm as package manager
63-
--pnpm Use pnpm as package manager
64-
--bun Use bun as package manager
65-
--drizzle Use Drizzle ORM
66-
--prisma Use Prisma ORM
67-
--install Install dependencies (default)
68-
--no-install Skip installing dependencies
69-
--turso Set up Turso for SQLite database
70-
--no-turso Skip Turso setup for SQLite database
71-
--hono Use Hono backend framework (default)
72-
--elysia Use Elysia backend framework
73-
--runtime <runtime> Specify runtime (bun or node)
74-
--web Include web frontend (default)
75-
--native Include Expo frontend
76-
--no-web Exclude web frontend
77-
--no-native Exclude Expo frontend
78-
-h, --help Display help
46+
-V, --version Output the version number
47+
-y, --yes Use default configuration
48+
--database <type> Database type (none, sqlite, postgres)
49+
--orm <type> ORM type (none, drizzle, prisma)
50+
--auth Include authentication
51+
--no-auth Exclude authentication
52+
--frontend <types> Frontend types (web,native or both)
53+
--addons <types> Additional addons (pwa,tauri,biome,husky)
54+
--no-addons Skip all additional addons
55+
--examples <types> Examples to include (todo,ai)
56+
--no-examples Skip all examples
57+
--git Initialize git repository
58+
--no-git Skip git initialization
59+
--package-manager <pm> Package manager (npm, pnpm, bun)
60+
--install Install dependencies
61+
--no-install Skip installing dependencies
62+
--turso Set up Turso for SQLite database
63+
--no-turso Skip Turso setup
64+
--backend <framework> Backend framework (hono, elysia)
65+
--runtime <runtime> Runtime (bun, node)
66+
-h, --help Display help
7967
```
8068

8169
## Examples
@@ -87,17 +75,20 @@ npx create-better-t-stack my-app -y
8775

8876
Create a project with specific options:
8977
```bash
90-
npx create-better-t-stack my-app --postgres --drizzle --auth --pwa --biome
78+
npx create-better-t-stack my-app --database postgres --orm drizzle --auth --addons pwa,biome
9179
```
9280

9381
Create a project with Elysia and Node.js runtime:
9482
```bash
95-
npx create-better-t-stack my-app --elysia --runtime node
83+
npx create-better-t-stack my-app --backend elysia --runtime node
9684
```
9785

98-
Create a project using Hono with no addons:
86+
Create a project with specific frontend options:
9987
```bash
100-
npx create-better-t-stack my-app --hono --no-addons
88+
npx create-better-t-stack my-app --frontend web,native
10189
```
10290

103-
Created by [Aman Varshney](https://github.com/AmanVarshney01) & [Nitish Singh](https://github.com/FgrReloaded)
91+
Create a project with examples:
92+
```bash
93+
npx create-better-t-stack my-app --examples todo,ai
94+
```

apps/cli/src/helpers/post-installation.ts

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { log } from "@clack/prompts";
1+
import { note } from "@clack/prompts";
22
import pc from "picocolors";
33
import type {
44
ProjectAddons,
@@ -42,8 +42,8 @@ export function displayPostInstallInstructions(
4242
const hasNativeFrontend = frontends?.includes("native");
4343
const hasFrontend = hasWebFrontend || hasNativeFrontend;
4444

45-
log.info(`${pc.bold("Next steps:")}
46-
${pc.cyan("1.")} ${cdCmd}
45+
note(
46+
`${pc.cyan("1.")} ${cdCmd}
4747
${!depsInstalled ? `${pc.cyan("2.")} ${packageManager} install\n` : ""}${pc.cyan(depsInstalled ? "2." : "3.")} ${runCmd} dev
4848
4949
${pc.bold("Your project will be available at:")}
@@ -52,15 +52,17 @@ ${
5252
? `${hasWebFrontend ? `${pc.cyan("•")} Frontend: http://localhost:3001\n` : ""}`
5353
: `${pc.yellow("NOTE:")} You are creating a backend-only app (no frontend selected)\n`
5454
}${pc.cyan("•")} API: http://localhost:3000
55-
${nativeInstructions ? `\n${nativeInstructions.trim()}` : ""}${databaseInstructions ? `\n${databaseInstructions.trim()}` : ""}${tauriInstructions ? `\n${tauriInstructions.trim()}` : ""}${lintingInstructions ? `\n${lintingInstructions.trim()}` : ""}`);
55+
${nativeInstructions ? `\n${nativeInstructions.trim()}` : ""}${databaseInstructions ? `\n${databaseInstructions.trim()}` : ""}${tauriInstructions ? `\n${tauriInstructions.trim()}` : ""}${lintingInstructions ? `\n${lintingInstructions.trim()}` : ""}`,
56+
"Next steps",
57+
);
5658
}
5759

5860
function getNativeInstructions(): string {
59-
return `${pc.yellow("NOTE:")} If the Expo app cannot connect to the server, update the EXPO_PUBLIC_SERVER_URL in apps/native/.env to use your local IP address instead of localhost:\n${pc.dim("EXPO_PUBLIC_SERVER_URL=http://192.168.0.103:3000")}\n`;
61+
return `${pc.yellow("NOTE:")} If the Expo app cannot connect to the server, update the EXPO_PUBLIC_SERVER_URL in apps/native/.env to use your local IP address instead of localhost:\n${"EXPO_PUBLIC_SERVER_URL=http://192.168.0.103:3000"}\n`;
6062
}
6163

6264
function getLintingInstructions(runCmd?: string): string {
63-
return `${pc.bold("Linting and formatting:")}\n${pc.cyan("•")} Format and lint fix: ${pc.dim(`${runCmd} check`)}\n\n`;
65+
return `${pc.bold("\nLinting and formatting:")}\n${pc.cyan("•")} Format and lint fix: ${`${runCmd} check`}\n\n`;
6466
}
6567

6668
function getDatabaseInstructions(
@@ -75,7 +77,7 @@ function getDatabaseInstructions(
7577
if (database === "sqlite") {
7678
instructions.push(
7779
`${pc.yellow("NOTE:")} Turso support with Prisma is in Early Access and requires additional setup.`,
78-
`${pc.dim("Learn more at: https://www.prisma.io/docs/orm/overview/databases/turso")}`,
80+
`${"Learn more at: https://www.prisma.io/docs/orm/overview/databases/turso"}`,
7981
);
8082
}
8183

@@ -85,24 +87,16 @@ function getDatabaseInstructions(
8587
);
8688
}
8789

88-
instructions.push(
89-
`${pc.cyan("•")} Apply schema: ${pc.dim(`${runCmd} db:push`)}`,
90-
);
91-
instructions.push(
92-
`${pc.cyan("•")} Database UI: ${pc.dim(`${runCmd} db:studio`)}`,
93-
);
90+
instructions.push(`${pc.cyan("•")} Apply schema: ${`${runCmd} db:push`}`);
91+
instructions.push(`${pc.cyan("•")} Database UI: ${`${runCmd} db:studio`}`);
9492
} else if (orm === "drizzle") {
9593
if (database === "sqlite") {
9694
instructions.push(
97-
`${pc.cyan("•")} Start local DB: ${pc.dim(`cd apps/server && ${runCmd} db:local`)}`,
95+
`${pc.cyan("•")} Start local DB: ${`cd apps/server && ${runCmd} db:local`}`,
9896
);
9997
}
100-
instructions.push(
101-
`${pc.cyan("•")} Apply schema: ${pc.dim(`${runCmd} db:push`)}`,
102-
);
103-
instructions.push(
104-
`${pc.cyan("•")} Database UI: ${pc.dim(`${runCmd} db:studio`)}`,
105-
);
98+
instructions.push(`${pc.cyan("•")} Apply schema: ${`${runCmd} db:push`}`);
99+
instructions.push(`${pc.cyan("•")} Database UI: ${`${runCmd} db:studio`}`);
106100
}
107101

108102
return instructions.length
@@ -111,5 +105,5 @@ function getDatabaseInstructions(
111105
}
112106

113107
function getTauriInstructions(runCmd?: string): string {
114-
return `${pc.bold("Desktop app with Tauri:")}\n${pc.cyan("•")} Start desktop app: ${pc.dim(`cd apps/web && ${runCmd} desktop:dev`)}\n${pc.cyan("•")} Build desktop app: ${pc.dim(`cd apps/web && ${runCmd} desktop:build`)}\n${pc.yellow("NOTE:")} Tauri requires Rust and platform-specific dependencies. See: ${pc.dim("https://v2.tauri.app/start/prerequisites/")}\n\n`;
108+
return `${pc.bold("Desktop app with Tauri:")}\n${pc.cyan("•")} Start desktop app: ${`cd apps/web && ${runCmd} desktop:dev`}\n${pc.cyan("•")} Build desktop app: ${`cd apps/web && ${runCmd} desktop:build`}\n${pc.yellow("NOTE:")} Tauri requires Rust and platform-specific dependencies. See: ${"https://v2.tauri.app/start/prerequisites/"}\n\n`;
115109
}

0 commit comments

Comments
 (0)