Installation
How to install and set up Better-T-Stack CLI
System Requirements
Before installing Better-T-Stack, ensure your system meets these requirements:
- Node.js: Version 18 or higher
- Package Manager: npm, pnpm, or bun
- Git: For repository initialization (optional but recommended)
Optional Dependencies
Depending on your project configuration, you may need:
- Docker: For local database development with Docker Compose
- Rust & System Dependencies: For Tauri desktop applications
- Cloudflare CLI: For Workers deployment
Quick Start (Recommended)
The fastest way to get started is using npx, which runs the latest version without installation:
npx create-better-t-stack@latest my-project
This command will:
- Download the latest version of the CLI
- Run the interactive setup wizard
- Create your project in the
my-project
directory
Package Manager Specific Commands
npm
# Run without installing
npx create-better-t-stack@latest my-project
# Or install globally
npm install -g create-better-t-stack
create-better-t-stack my-project
pnpm
# Run without installing (recommended)
pnpm create better-t-stack@latest my-project
# Or install globally
pnpm add -g create-better-t-stack
create-better-t-stack my-project
bun
# Run without installing (recommended)
bun create better-t-stack@latest my-project
# Or install globally
bun add -g create-better-t-stack
create-better-t-stack my-project
Global Installation
If you frequently create new projects, you might want to install the CLI globally:
npm install -g create-better-t-stack
pnpm add -g create-better-t-stack
bun add -g create-better-t-stack
After global installation, you can run:
create-better-t-stack my-project
Verification
Verify your installation by checking the version:
# If installed globally
create-better-t-stack --version
# Or with npx
npx create-better-t-stack@latest --version
You should see output similar to:
2.26.3
Development Installation
For contributing to Better-T-Stack or running the latest development version:
# Clone the repository
git clone https://github.com/AmanVarshney01/create-better-t-stack.git
cd create-better-t-stack
# Install dependencies
pnpm install
# Build the CLI
cd apps/cli
pnpm build
# Link for local development
pnpm link --global
Troubleshooting
Common Issues
Permission Errors (npm)
If you encounter permission errors with npm global installation:
# Use npx instead (recommended)
npx create-better-t-stack@latest my-project
# Or configure npm to use a different directory
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
Node.js Version Issues
Ensure you're using Node.js 18 or higher:
node --version
If you need to upgrade Node.js:
- Using nvm:
nvm install 18 && nvm use 18
- Using n:
n 18
- Download: Visit nodejs.org
Package Manager Not Found
If you prefer a specific package manager but it's not installed:
# Install pnpm
npm install -g pnpm
# Install bun
curl -fsSL https://bun.sh/install | bash
Network Issues
If you experience network timeouts or connection issues:
# Try with different registry
npm config set registry https://registry.npmjs.org/
# Or clear npm cache
npm cache clean --force
Next Steps
Once installed, you're ready to create your first project:
- Quick Start: Follow our Quick Start Guide
- Configuration: Learn about Configuration Options
- CLI Reference: Explore all CLI Commands
Staying Updated
To ensure you're always using the latest version with bug fixes and new features:
Using npx (Automatic)
When using npx create-better-t-stack@latest
, you automatically get the latest version.
Global Installation Updates
If you have it installed globally, update regularly:
npm update -g create-better-t-stack
pnpm update -g create-better-t-stack
bun update -g create-better-t-stack
Release Notes
Stay informed about new features and changes:
- GitHub Releases: View releases
- Changelog: Check the repository for detailed changes
- Breaking Changes: Major version updates may include breaking changes