The bugster init command initializes Bugster CLI in your project, handles authentication, and configures your project settings.
The init command is the first step you must complete before using any other Bugster CLI features. It sets up authentication and creates your project configuration.

Basic Usage

bugster init
This command will guide you through:
  1. Authentication (if first time)
  2. Project configuration
  3. Credential setup (for authenticated apps)

Command Options

The init command supports several flags for automation and customization:
bugster init [OPTIONS]

Authentication Options

  • --api-key TEXT: Bugster API key (starts with ‘bugster_’)
  • --no-auth: Skip authentication if API key is already configured

Project Configuration

  • --project-name TEXT: Name for your project
  • --url TEXT: Base URL of your application (e.g., http://localhost:3000)

Credential Management

  • --user TEXT: Username/email for login credentials
  • --password TEXT: Password for login credentials
  • --credential-name TEXT: Name for the credential entry (default: admin)
  • --no-credentials: Skip credential setup entirely

Platform Protection

  • --bypass-protection TEXT: Protection bypass secret for the specified platform
  • --platform TEXT: Platform type (vercel or railway, default: vercel)

Step-by-Step Process

1

Navigate to your project

Open your terminal and navigate to your Next.js project’s root directory:
cd your-nextjs-project
2

Run the init command

Execute the initialization command:
bugster init
Or use flags for automation:
bugster init --project-name "my-app" --url "http://localhost:3000" --user "test@example.com" --password "testpass"
3

API Key Authentication (First Time Only)

If it’s your first time using Bugster CLI and no --api-key flag is provided, you’ll be prompted:
🔑 Paste your API key here: bugster_your_api_key_here

Get Your API Key

Find your API key in the Bugster Dashboard under Account Settings
Use --api-key flag to provide the key directly or --no-auth to skip if already configured
4

Configure Project Settings

You’ll be prompted to configure your project (unless flags are provided):Project Name
🏷️  Project name: my-awesome-app
Use your GitHub repository name for consistency
Base URL
🌐 Application URL: http://localhost:3000
Authentication Credentials (unless --no-credentials is used)
 Would you like to add custom login credentials? (y/n): y
👤 Credential name: admin
📧 Username/Email: test@example.com
🔒 Password: ********

What Gets Created

After running bugster init, the following structure is created in your project:
your-project/
├── .bugster/
   ├── config.yaml          # Project configuration
   └── tests/               # Generated test directory (created later)
└── .gitignore               # Updated with Bugster entries

Configuration File

The config.yaml file contains your project settings:
project_name: "My App"
project_id: "my-app-123456"
base_url: "http://localhost:3000"
credentials:
  - id: "admin"
    username: "admin@example.com"
    password: "admin123"
x-vercel-protection-bypass: ""  # or x-railway-protection-bypass

Automated Setup Examples

Complete Non-Interactive Setup

bugster init \
  --api-key "bugster_your_key_here" \
  --project-name "my-nextjs-app" \
  --url "http://localhost:3000" \
  --user "test@example.com" \
  --password "testpass123" \
  --credential-name "testuser"

Setup Without Credentials

bugster init \
  --project-name "my-app" \
  --url "http://localhost:3000" \
  --no-credentials

Setup with Platform Protection

bugster init \
  --project-name "my-app" \
  --url "https://my-app.vercel.app" \
  --platform vercel \
  --bypass-protection "your-bypass-secret"

Skip Authentication (if already configured)

bugster init \
  --no-auth \
  --project-name "my-app" \
  --url "http://localhost:3000"

Configuration Options

Advanced Configuration

For advanced use cases, you can customize additional settings in your config.yaml file:

Advanced Configuration

Learn about advanced configuration options including additional protection bypasses, always-run tests, and more

Troubleshooting

Next Steps

After successful initialization, you’re ready to: