feat(web): improve docs and refactor cli (#476)

This commit is contained in:
Aman Varshney
2025-08-08 16:00:10 +05:30
committed by GitHub
parent defa0e9464
commit 51cfb35912
34 changed files with 1336 additions and 1154 deletions

View File

@@ -0,0 +1,35 @@
---
title: add
description: Add addons or deployment to an existing project
---
## Usage
<Tabs items={['bun', 'pnpm', 'npm']}>
<Tab value="bun">
```bash
bun create better-t-stack@latest add [options]
```
</Tab>
<Tab value="pnpm">
```bash
pnpm create better-t-stack@latest add [options]
```
</Tab>
<Tab value="npm">
```bash
npx create-better-t-stack@latest add [options]
```
</Tab>
</Tabs>
### Options
- `--addons` Multiple values
- `--web-deploy` One of: `workers`, `none`
- `--project-dir` Path
- `--install` / `--no-install`
- `--package-manager` One of: `bun`, `pnpm`, `npm`
See also: [Compatibility](/docs/compatibility)

View File

@@ -0,0 +1,25 @@
---
title: builder
description: Open the web-based stack builder
---
## Usage
<Tabs items={['bun', 'pnpm', 'npm']}>
<Tab value="bun">
```bash
bun create better-t-stack@latest builder
```
</Tab>
<Tab value="pnpm">
```bash
pnpm create better-t-stack@latest builder
```
</Tab>
<Tab value="npm">
```bash
npx create-better-t-stack@latest builder
```
</Tab>
</Tabs>

View File

@@ -0,0 +1,25 @@
---
title: docs
description: Open the documentation
---
## Usage
<Tabs items={['bun', 'pnpm', 'npm']}>
<Tab value="bun">
```bash
bun create better-t-stack@latest docs
```
</Tab>
<Tab value="pnpm">
```bash
pnpm create better-t-stack@latest docs
```
</Tab>
<Tab value="npm">
```bash
npx create-better-t-stack@latest docs
```
</Tab>
</Tabs>

View File

@@ -0,0 +1,23 @@
---
title: CLI
description: Command reference index
---
<Cards>
<Card href="/docs/cli/init" title="init">
Create a new BetterTStack project (prompts or --yes)
</Card>
<Card href="/docs/cli/add" title="add">
Add addons or deployment to an existing project
</Card>
<Card href="/docs/cli/builder" title="builder">
Open the web-based Stack Builder
</Card>
<Card href="/docs/cli/docs" title="docs">
Open documentation
</Card>
<Card href="/docs/cli/sponsors" title="sponsors">
View project sponsors
</Card>
</Cards>

View File

@@ -0,0 +1,35 @@
---
title: init
description: Create a new Better-T-Stack project
---
## Usage
<Tabs items={['bun', 'pnpm', 'npm']}>
<Tab value="bun">
```bash
bun create better-t-stack@latest [project-directory]
```
</Tab>
<Tab value="pnpm">
```bash
pnpm create better-t-stack@latest [project-directory]
```
</Tab>
<Tab value="npm">
```bash
npx create-better-t-stack@latest [project-directory]
```
</Tab>
</Tabs>
You can pass `.` to use the current directory.
### Skip prompts
```bash
bun create better-t-stack@latest my-app --yes
```
See also: [Compatibility](/docs/compatibility)

View File

@@ -0,0 +1,5 @@
{
"title": "CLI",
"defaultOpen": true,
"pages": ["index", "init", "add", "builder", "docs", "sponsors"]
}

View File

@@ -0,0 +1,25 @@
---
title: sponsors
description: View project sponsors
---
## Usage
<Tabs items={['bun', 'pnpm', 'npm']}>
<Tab value="bun">
```bash
bun create better-t-stack@latest sponsors
```
</Tab>
<Tab value="pnpm">
```bash
pnpm create better-t-stack@latest sponsors
```
</Tab>
<Tab value="npm">
```bash
npx create-better-t-stack@latest sponsors
```
</Tab>
</Tabs>