# Changelog Source: https://docs.bugster.dev/changelog All notable changes to Bugster CLI ### Added * **`bugster generate --prompt`** - Generate tests directly from natural language prompts without needing existing spec files ### Added * **Optional `credential_id` field** to the Test model to enhance test configuration capabilities ### Changed * **Default maximum concurrent tests** changed from 5 to 3 for better resource management * **Added `--quick` option** to the prompt parameter in the `run` command ### Fixed * **Simplified log visibility condition** in `should_show_detailed_logs` function for improved debugging experience ### Added * **`bugster destructive --output` option** to save results to a JSON file, enabling easier integration with other tools and workflows * **`bugster run --prompt` option** for creating quick, on-the-fly tests without pre-existing spec files * **PowerShell installer script** for Bugster CLI on Windows * **Windows installation instructions** to the documentation ### Changed * **Enhanced PowerShell installer** to automatically check for and install Node.js and npm if missing ### Removed * **Legacy CI workflow configuration file** ### Changed * **`bugster config` command flags** now uses separate flags: `--bypass-protection-interactive` for guided setup and `--bypass-protection-secret` for direct secret input ### Added * **Credentials validation** in `bugster init` - prevents empty username/password entries * **Localhost reminder** in `bugster run` - warns users to ensure app is running before tests * **CI/CD integration warning** in `bugster init` - clear instructions on which files to commit * **Enhanced messaging system** with proper console message methods ### Changed * **Improved URL prompt** in `bugster init` - clarifies localhost usage and CI/CD auto-changes * **Better credentials explanation** - explains when authentication gateway credentials are needed * **Config.yaml now includes commit reminder comment** for CI/CD integration ### Added * **`bugster config` command** - Access and manipulate the data inside config.yaml to avoid human error * `--bypass-protection` flag: Guides users on how to get the x-vercel-bypass-secret by redirecting them with the Deeplink * **`bugster install` command** - Handle outside integrations with your Bugster account for users who don't want to switch context during setup * `--github` flag: Redirects users to the Github App Installation Link ### Changed * **Destructive Agent Limits** - Up to 4 as default, with future parametrization based on subscription tiers * **Prioritization of UI crashers** instead of Form Destroyers (FD will run when all UI Crashers are ok) ### Added * **`bugster auth` command** for setting up or cleaning existing API key * **`--parallel` flag** for `bugster run` command (accepts both `--parallel` and `--max-concurrent`) ### Changed * **Max test limit increased to 10** ### Changed * **Added platform flags** to `bugster init` for faster setup ### Changed * **Added flags** to `bugster init` for executing automatically ### Fixed * **Patch update command** ### Changed * **New architecture** for `bugster destructive` unblocking longer executions ### Added * **Initial monorepo support** * Works with most monorepo setups including basic Turborepo configurations * Detects changes in individual apps within the monorepo * Note: Currently does not track changes in shared packages (e.g., common components installed via pnpm in each app's node\_modules) ### Changed * **`bugster generate` default settings** - Can be executed multiple times without adding `--force` explicitly * **Improved test generation intelligence** - Both `bugster generate` and `bugster update` now analyze existing test specs context to avoid creating duplicate or similar tests ### Changed * **Force chromium installation** on install script * **Remove the question loop** on credentials during `bugster init` ### Changed * **Enhanced `--page` flag** in `bugster generate` now accepts relative or absolute file paths instead of page folder names * **Added validation** for the `--page` flag to ensure provided paths exist, are files, and have valid JavaScript/TypeScript extensions (`.js`, `.jsx`, `.ts`, `.tsx`) ### Added * **`--stream-results`** as the default behaviour for `bugster run` * **`--max-concurrent = 5`** as the default behaviour for `bugster run` * **`--page` flag** for `bugster generate` for spec generation of specific pages * **`--count` option** for `bugster generate` to control the number of test specs generated per page (min: 1, max: 30) ### Added * **Vercel protection bypass** to `bugster destructive` ### Added * **`run_id`** to `bugster destructive` for test run association ### Added * **`bugster destructive`** - Our new agent for raising bugs ### Added * **`preferences` section** to the configuration file * **`always_run` option** to select up to 3 specs that will always run ### Changed * **Improved `bugster generate` architecture** resulting in a 30% speed increase ### Added * **Vercel-bypass-automation support** - You can now use the secret within Bugster config while keeping your branch protected ### Added * **Enhanced `bugster generate`** specs generation capacity up to 20 specs for comprehensive coverage ### Changed * **Improved specs generation algorithm** for better coverage and more realistic test scenarios ### Added * **`bugster issues` command** to get failed runs with debugging context from recent executions * **`bugster upgrade` command** to update CLI to the latest version directly from the command line ### Changed * **Improved specs generation algorithm** for better coverage and more realistic test scenarios ### Fixed * **Small bug** in the console message during `bugster init` ### Added * **`--only-affected` flag** for `bugster run` to execute only specs affected by code changes * **`--max-concurrent` flag** for `bugster run` supporting up to 5 parallel test executions * **Component-level tracking** for `bugster update` command * **GitHub integration** for running specs on Vercel preview deployments * **Cross-platform installer scripts** for Windows, macOS, and Linux with automatic dependency management ### Changed * **Enhanced `bugster update` command** now works at component granularity instead of file level * **Improved parallel test execution** with better resource management * **Optimized change detection algorithm** for more accurate affected test identification * **Rich console output** with color-coded messages and progress indicators * **Enhanced error handling** with detailed debugging information ### Fixed * **Performance improvements** for large codebases with many components * **Better handling** of component dependency tracking * **Reduced false positives** in change detection ### Added * **`bugster sync` command** to retrieve and manage test specs across different branches * **`bugster auth` command** for secure API key management with GUI integration * **`bugster update` command** to automatically update test specs when codebase changes * **Project creation integration** with Bugster GUI dashboard for execution tracking * **Branch-based specs synchronization** ### Changed * **Enhanced `bugster init` command** now creates projects in the GUI dashboard ### Fixed * **Authentication improvements** * **Project initialization reliability** * **Cross-branch synchronization edge cases** ### Added * **Initial CLI commands**: `bugster init`, `bugster generate`, and `bugster run` * **Next.js application support** with automatic framework detection * **Test specs generation** (up to 5 test specs per application) * **Basic test execution engine** with browser automation * **Project configuration system** with YAML-based config files * **Core specs format and parsing capabilities** [Unreleased]: https://github.com/Bugsterapp/bugster-cli/compare/v0.5.0...HEAD [0.5.0]: https://github.com/Bugsterapp/bugster-cli/compare/v0.4.13...v0.5.0 [0.4.13]: https://github.com/Bugsterapp/bugster-cli/compare/v0.4.12...v0.4.13 [0.4.12]: https://github.com/Bugsterapp/bugster-cli/compare/v0.4.2...v0.4.12 [0.4.2]: https://github.com/Bugsterapp/bugster-cli/compare/v0.4.1...v0.4.2 [0.4.1]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.30...v0.4.1 [0.3.30]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.26...v0.3.30 [0.3.26]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.25...v0.3.26 [0.3.25]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.24...v0.3.25 [0.3.24]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.23...v0.3.24 [0.3.23]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.22...v0.3.23 [0.3.22]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.21...v0.3.22 [0.3.21]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.20...v0.3.21 [0.3.20]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.19...v0.3.20 [0.3.19]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.15...v0.3.19 [0.3.15]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.14...v0.3.15 [0.3.14]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.13...v0.3.14 [0.3.13]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.12...v0.3.13 [0.3.12]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.11...v0.3.12 [0.3.11]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.10...v0.3.11 [0.3.10]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.9...v0.3.10 [0.3.9]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.7...v0.3.9 [0.3.7]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.6...v0.3.7 [0.3.6]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.0...v0.3.6 [0.3.0]: https://github.com/Bugsterapp/bugster-cli/compare/v0.2.0...v0.3.0 [0.2.0]: https://github.com/Bugsterapp/bugster-cli/compare/v0.1.0...v0.2.0 [0.1.0]: https://github.com/Bugsterapp/bugster-cli/releases/tag/v0.1.0 # Auth Source: https://docs.bugster.dev/commands/auth Configure and manage your Bugster API key for CLI authentication The `bugster auth` command allows you to configure and manage your Bugster API key for CLI authentication. ## Basic Usage ```bash theme={null} bugster auth ``` ## Command Overview Configure or update your Bugster API key for authentication with the Bugster platform. ### When to Use * When setting up Bugster for the first time * When switching between organizations or teams * If your API key expires or gets rotated * When API key authentication fails ### Key Features * Interactive API key setup * Secure storage in `~/.bugsterrc` * Environment variable support via `BUGSTER_CLI_API_KEY` * API key validation and verification API keys start with the `bugster_` prefix and are required for all Bugster operations. ## Command Syntax ```bash theme={null} bugster auth [options] ``` ### Options Set the Bugster API key directly without interactive prompts. The key must start with 'bugster\_'. Remove the existing API key from local storage. ## Examples ### Interactive Setup ```bash theme={null} bugster auth ``` This opens an interactive prompt to enter your API key. ### Direct API Key Setup ```bash theme={null} bugster auth --api-key bugster_org_abc123def456... ``` ### Clear Existing Authentication ```bash theme={null} bugster auth --clear ``` ## Authentication Storage Your API key is stored securely in: * **Local file**: `~/.bugsterrc` * **Environment variable**: `BUGSTER_CLI_API_KEY` (optional) Keep your API key secure and never commit it to version control. The environment variable takes precedence over the local file. # Destructive Source: https://docs.bugster.dev/commands/destructive-agent Run AI-powered destructive agents to find potential bugs in your changed pages The `bugster destructive` command runs AI-powered destructive agents to find potential bugs by simulating edge cases, unexpected user behavior, and malicious inputs that could break your application. ## Basic Usage ```bash theme={null} bugster destructive ``` ## Command Overview Executes specialized AI agents designed to stress-test your application by attempting to break it through aggressive interactions, malicious inputs, and edge case scenarios. ### When to Use * **Before major releases** to catch edge case bugs * On staging environments to stress-test changes * After significant code modifications * When you want to find vulnerabilities proactively ### Key Features * AI agents simulate malicious and edge case user behavior * Only targets pages with recent code changes (git diff) * Records videos of destructive attempts for debugging * Multiple specialized agent types with different attack vectors * More aggressive than regular testing approaches **NEVER run against production environments.** Destructive agents can cause data corruption, submit forms, delete data, or trigger irreversible actions. Use only on test/staging environments. ## Command Syntax ```bash theme={null} bugster destructive [options] ``` ## How It Works The destructive command: 1. **Change Detection**: Identifies pages with recent code changes using git diff 2. **Agent Selection**: Deploys specialized destructive agents based on page types 3. **Aggressive Testing**: Agents attempt to break functionality through various methods 4. **Result Recording**: Captures videos and logs of all destructive attempts 5. **Bug Analysis**: Reports potential vulnerabilities and edge case failures ## Agent Types **Priority**: Highest Attempts to crash UI components through: * Rapid clicking and interaction spam * Invalid input combinations * Boundary value testing * Component state corruption **Priority**: High Targets forms with malicious inputs: * SQL injection attempts * XSS payload testing * Buffer overflow attempts * Invalid data type submissions ## Execution Options Run agents in headless mode without visible browser UI. Recommended for CI/CD environments. Maximum number of concurrent agents to run simultaneously. Higher values increase testing speed but use more resources. Alias for `--parallel`. Specifies the maximum number of agents to run concurrently. Maximum number of destructive agents to execute. Range: 1-30. Higher values increase bug discovery chances. Browser engine to use for destructive testing. Supports chromium, firefox, and webkit. ## Output Options Stream real-time results to the Bugster dashboard as agents complete their destruction attempts. Disable streaming to dashboard. Results will only be available locally. Override the base URL from configuration. Essential for testing staging environments. Enable detailed logging of agent execution and attack patterns. Run agents silently with minimal output. Reduces noise in automated environments. ## Examples ### Complete Destructive Testing ```bash theme={null} bugster destructive ``` Runs all available destructive agents on pages with recent changes. ### Pre-release Validation ```bash theme={null} bugster destructive --limit 15 --parallel 5 ``` Comprehensive destructive testing with maximum coverage before major releases. ### Quick Vulnerability Scan ```bash theme={null} bugster destructive --limit 3 --headless ``` Fast security and stability check with minimal resource usage. ### Staging Environment Testing ```bash theme={null} bugster destructive --base-url https://staging.myapp.com --limit 10 ``` Test staging environment with comprehensive destructive scenarios. ### CI/CD Integration ```bash theme={null} bugster destructive --headless --stream-results --silent ``` Automated destructive testing optimized for continuous integration pipelines. ## Usage Patterns ```bash theme={null} bugster destructive --limit 15 ``` Comprehensive destructive testing before major releases. ```bash theme={null} bugster destructive --limit 3 --headless ``` Fast vulnerability and stability validation. ```bash theme={null} bugster destructive --headless --stream-results ``` Automated testing in continuous integration pipelines. ```bash theme={null} bugster destructive --parallel 8 ``` Maximum concurrent destruction for stress testing. ## Safety Guidelines * **Never run against production environments** * Use dedicated test databases and isolated environments * Ensure all data is disposable or properly backed up * Test on staging environments that mirror production * Agents may submit forms with test data * Potential for data deletion or corruption * May trigger irreversible actions * Always use test credentials and mock data * All destructive attempts are automatically recorded * Videos help understand what caused detected issues * Review recordings to learn about attack patterns * Use videos for security team analysis ## Result Analysis After execution, you'll receive: * **Vulnerability Reports**: Detailed analysis of potential security issues * **Edge Case Failures**: Documentation of unexpected behavior patterns * **Video Recordings**: Visual evidence of successful attacks or crashes * **Agent Logs**: Detailed execution traces for debugging * **Severity Ratings**: Prioritized list of discovered issues ## Best Practices Run destructive agents after `bugster update` to test newly modified pages. Higher `--limit` values increase the chance of finding edge case bugs, and videos are automatically saved for any issues found. Destructive testing is most effective as a final validation step before releases. Combine with regular testing for comprehensive coverage, and always review video recordings to understand root causes. # Generate Source: https://docs.bugster.dev/commands/generate Generate AI-powered tests from your codebase with bugster generate The `bugster generate` command analyzes your codebase with AI and generates intelligent test specifications automatically. This powerful automation tool significantly reduces the manual work required to set up comprehensive test coverage. ## Basic Usage ```bash theme={null} bugster generate ``` ## Command Overview Analyzes your codebase structure, user flows, and components to create intelligent test specifications that cover critical functionality and edge cases. ### When to Use * After adding new features or pages to your application * When you want comprehensive test coverage for specific components * To create initial test suite for existing projects * Before major releases to ensure thorough testing ### Key Features * AI-powered analysis of your app structure and user flows * Generates test specs in `.bugster/tests/` directory * Supports filtering by specific pages/components * Custom prompts to guide test generation * Safe to run multiple times - won't duplicate existing tests Can take several minutes for large codebases during the initial analysis phase. Full codebase analysis and AI-powered generation is currently available for Next.js and React applications. For other frameworks, you can still generate tests using [coding agents](/guides/coding-agents/cursor) (Cursor or Claude Code) with the plugin rules. ## Command Syntax ```bash theme={null} bugster generate [options] ``` ## How It Works The generate command: 1. **Codebase Analysis**: Scans your application structure and identifies key components 2. **AI Processing**: Uses AI to understand user flows and critical functionality 3. **Test Generation**: Creates intelligent test scenarios based on the analysis 4. **File Output**: Saves test specifications as YAML files with human-readable steps 5. **Caching**: Stores analysis results for faster subsequent runs ## Options Number of test specs to generate per page. Range: 1-30. Higher values create more comprehensive test scenarios. Generate specs only for specific page files. Provide comma-separated relative paths to target specific components. Custom prompt to guide AI test generation with specific instructions and focus areas. Must be used together with `--page`. Show detailed logs during analysis. (Deprecated - use --debug instead) ## Examples ### Complete Codebase Analysis ```bash theme={null} bugster generate ``` Analyzes the entire codebase and generates comprehensive test coverage. ### Generate Specific Number of Tests ```bash theme={null} bugster generate --count 10 ``` Creates exactly 10 test scenarios per page for thorough coverage. ### Target Specific Pages ```bash theme={null} bugster generate --page "pages/auth.tsx,pages/settings.tsx" ``` Generates tests only for the specified page files. ### Custom Test Focus with Page Filtering ```bash theme={null} bugster generate --page "pages/product.tsx" --prompt "Focus on edge cases and error handling" ``` Uses AI to emphasize specific testing scenarios for targeted pages. The `--prompt` flag requires `--page` to be specified. ## Page Filtering Strategies ```bash theme={null} bugster generate --page "pages/dashboard.tsx" ``` Focus on one specific page for detailed testing. ```bash theme={null} bugster generate --page "pages/auth.tsx,pages/settings.tsx" ``` Target multiple specific pages simultaneously. ```bash theme={null} bugster generate --page "components/forms/login.tsx" ``` Generate tests for specific reusable components. ```bash theme={null} bugster generate --page "pages/admin/" ``` Target all pages within a specific directory. ## Output Structure Generated tests are organized in the `.bugster/tests/` directory: ``` .bugster/tests/ ├── pages/ │ ├── auth.yaml # Authentication page tests │ └── dashboard.yaml # Dashboard functionality tests └── components/ └── forms/ └── login.yaml # Login component tests ``` ## Example Generated Test Here's an example of what a generated test specification looks like: ```yaml theme={null} name: "User Login Flow" description: "Test successful user authentication" steps: - action: navigate url: "/login" - action: fill selector: '[data-testid="email"]' value: "user@example.com" - action: fill selector: '[data-testid="password"]' value: "password123" - action: click selector: '[data-testid="login-button"]' - action: assert selector: '[data-testid="dashboard"]' condition: "visible" ``` ## Best Practices Use `--page` to focus on recently modified files for efficient test creation. Combine `--page` and `--prompt` for targeted, customized test generation. Run regularly as your codebase evolves - tests won't be duplicated. Higher `--count` values generate more comprehensive test scenarios. The first run analyzes your entire app structure and caches results for faster subsequent runs. Remember that custom prompts require the `--page` flag to specify which components to target. # Init Source: https://docs.bugster.dev/commands/init Set up Bugster CLI in your project and authenticate with your account The `bugster init` command guides you through setting up a new Bugster project. It creates configuration files, helps you configure your application, and sets up test credentials for automated testing. ## Basic Usage ```bash theme={null} bugster init ``` ## Command Overview Sets up Bugster configuration in your repository for the first time, creating the necessary project structure and configuration files. ### When to Use * Once per repository - typically done by one team member * When starting a new project with Bugster * If you need to reconfigure project settings ### Key Features * Interactive project setup * Creates `.bugster/` directory with project configuration * Configures application URL and credentials * Safe to re-run (will ask before overwriting existing config) The configuration must be committed to git for CI/CD integration and requires an API key for authentication. ## Command Syntax ```bash theme={null} bugster init [options] ``` ## Configuration Process When you run `bugster init`, the following steps occur: 1. **Authentication Check**: Verifies you're authenticated with the Bugster API (run `bugster auth` first if not) 2. **Project Setup**: Creates `.bugster/` directory and configuration files 3. **Application Configuration**: Collects your application URL and settings 4. **Credential Setup**: Configures login credentials for testing 5. **Verification**: Tests the configuration to ensure it works ## Options Bugster API key for authentication. Must start with 'bugster\_'. If not provided, will prompt for authentication. Custom name for your project. Used for identification in the Bugster dashboard. Base URL of your application where tests will be executed. Username for login credentials used in automated tests. Password for login credentials used in automated tests. Name for the credential entry in your configuration. Skip credential setup entirely. You can configure credentials later. Protection bypass secret for deployment platforms like Vercel or Netlify. ## Examples ### Interactive Setup ```bash theme={null} bugster init ``` Guides you through the complete setup process with interactive prompts. ### Quick Setup with Parameters ```bash theme={null} bugster init --project-name "My E-commerce App" --url http://localhost:3000 ``` ### Setup with Credentials ```bash theme={null} bugster init --user admin@example.com --password secret123 --credential-name staging ``` ### Skip Credential Configuration ```bash theme={null} bugster init --no-credentials ``` Sets up the project without configuring any login credentials. ## Project Structure After running the command, the following structure is created: ``` .bugster/ ├── config.yaml # Main project configuration └── credentials/ # Encrypted credential storage └── admin.yaml # Default credential file ``` Always commit the `.bugster/` directory to version control. The configuration is required for CI/CD integration and team collaboration. ## Example Configuration After initialization, your `config.yaml` might look like: ```yaml theme={null} project_id: "proj_abc123" project_name: "My E-commerce App" base_url: "https://staging.myapp.com" default_credentials: "admin" ``` # Shell Source: https://docs.bugster.dev/commands/interactive-mode Interactive CLI session with smart autocomplete and instant testing The `bugster` shell provides a persistent, interactive environment for running tests and commands. Type natural language to test instantly, browse commands with `/`, and navigate files with `@`. ## Quick Start ```bash theme={null} bugster ``` ## Core Concepts **Command Browser** Type `/` to browse and autocomplete all Bugster commands **File Navigator** Type `@` to interactively select test or source files **Inline Tests** Type 5+ words to instantly run a test ## Usage Examples ```bash theme={null} # Start shell bugster # Browse and run command /generate --page @ # Quick inline test (5+ words required) test login form with invalid email addresses # Run specific test file /run @ # Exit /exit ``` ## Key Features * **No `bugster` prefix needed** - Direct command execution * **Command history** - Use ↑/↓ arrows to navigate previous commands * **Smart file filtering** - `/run @` shows only tests, `/generate --page @` excludes tests * **Persistent session** - Stay in context across multiple operations * **Instant execution** - Natural language (5+ words) runs tests immediately ## Keyboard Shortcuts | Key | Action | | ------------ | ---------------------- | | `/` | Command browser | | `@` | File browser | | `↑` `↓` | Navigate history/items | | `Enter` | Execute/Select | | `Ctrl+C` × 2 | Exit shell | ## Common Commands ```bash theme={null} /generate # Generate tests /run # Run all tests /run --fast # Run tests in fast mode /update # Update test specs /validate # Validate config ``` Use the shell for active development sessions. It's faster than one-off commands and maintains your workflow context. Inline tests require **at least 5 words**. Shorter phrases won't execute as tests. # Overview Source: https://docs.bugster.dev/commands/overview Complete overview of Bugster CLI commands and capabilities # Bugster CLI Overview The Bugster CLI is a powerful AI-powered command-line tool designed to generate, execute, and maintain end-to-end tests for web applications. It provides an intuitive interface to interact with the Bugster platform directly from your development environment. ## Installation Before using the Bugster CLI, you'll need to install it. See the [installation guide](/installation) for detailed instructions for your operating system. ## Available Commands The CLI includes the following commands: | Command | Description | | -------------------------------------------- | --------------------------------------------------------------------- | | [`auth`](/commands/auth) | Configure and manage your Bugster API key for CLI authentication | | [`init`](/commands/init) | Set up Bugster CLI in your project and authenticate with your account | | [`generate`](/commands/generate) | Generate AI-powered tests from your codebase | | [`run`](/commands/run) | Execute your test specifications with browser automation | | [`update`](/commands/update) | Keep your tests synchronized with code changes | | [`destructive`](/commands/destructive-agent) | Run AI-powered destructive agents to find potential bugs | ## Getting Help For help with any command, use the `--help` flag: ```bash theme={null} bugster --help # General CLI help bugster init --help # Help for the init command bugster generate --help # Help for the generate command ``` ## Command Syntax The Bugster CLI follows a consistent command structure: ``` bugster [options] ``` Most commands accept various options that modify their behavior. These options are typically provided using the `--option-name value` format or boolean flags like `--headless`. ## Workflow Example A typical workflow with the Bugster CLI might look like: 1. **Authenticate**: `bugster auth` 2. **Initialize project**: `bugster init` 3. **Generate tests**: `bugster generate` 4. **Run tests**: `bugster run` 5. **Update tests**: `bugster update` (after code changes) 6. **Advanced testing**: `bugster destructive` (before releases) ## Command Categories ### Setup Commands Essential commands for initial project configuration: Configure your API key and authenticate with Bugster Initialize Bugster in your repository with configuration ### Core Testing Workflow Commands you'll use regularly in your development process: AI-powered test generation from your codebase Run tests with automated browser instances Keep tests synchronized with code changes ### Advanced Testing Specialized testing capabilities for comprehensive validation: AI agents that find bugs through edge cases and unexpected behavior ## Best Practices Start with `bugster auth` and `bugster init` to set up your project. Then use `bugster generate` to create your initial test suite. For the best experience, run `bugster update` after making code changes and `bugster run --only-affected` to validate your modifications. # Plugin Source: https://docs.bugster.dev/commands/plugin Install Bugster rules for AI coding agents to generate tests in your editor The `bugster plugin` command installs test generation rules for AI coding agents like Cursor or Claude Code, enabling them to create and update Bugster test specifications without leaving your editor. ## Basic Usage ```bash theme={null} bugster plugin ``` ## Command Overview Installs rule files that teach your AI coding agent how to generate and maintain Bugster test specifications directly in your development environment. ### When to Use * After setting up Bugster in your project for the first time * When switching to a new AI coding agent * To update rules when new versions are released * When setting up a new team member's development environment ### Key Features * Interactive agent selection (Cursor or Claude Code) * Installs both generation and update rules * Safe installation with overwrite protection * Downloads official rules from Bugster repository * Works seamlessly with your existing workflow Requires internet connection to download the latest rule files from the official Bugster GitHub repository. ## Command Syntax ```bash theme={null} bugster plugin [options] ``` ## Options Specify the coding agent to install rules for. Accepts `cursor` or `claude`. Skips the interactive selection prompt. Overwrite existing rule files without confirmation. Useful for updating to the latest rule versions. ## What Gets Installed The command installs two rule files specific to your coding agent: 1. **Generate Rule**: Creates new test specifications from your codebase 2. **Update Rule**: Updates existing test specs based on code changes **Installation Location**: `.cursor/rules/` Files installed: * `bugster-generate.mdc` - Test generation rule * `bugster-update.mdc` - Test update rule **Source**: [Cursor Plugin Rules](https://github.com/Bugsterapp/bugster-cli/tree/main/plugins/cursor) **Installation Location**: `.claude/rules/` Files installed: * `BUGSTER_GENERATE.md` - Test generation rule * `BUGSTER_UPDATE.md` - Test update rule **Source**: [Claude Code Plugin Rules](https://github.com/Bugsterapp/bugster-cli/tree/main/plugins/claude) ## Examples ### Interactive Installation ```bash theme={null} bugster plugin ``` Prompts you to select your coding agent and installs the appropriate rules. ### Install for Cursor ```bash theme={null} bugster plugin --agent cursor ``` Directly installs Bugster rules for Cursor without prompting. ### Install for Claude Code ```bash theme={null} bugster plugin --agent claude ``` Installs Bugster rules for Claude Code with no interactive prompt. ### Force Update Existing Rules ```bash theme={null} bugster plugin --agent cursor --force ``` Overwrites existing rule files to update to the latest versions. ## Using the Rules in Your Editor Launch Cursor or Claude Code in your project directory where Bugster is configured. In your AI chat, mention `@bugster-generate` or `@bugster-update` to activate the corresponding rule. Your coding agent will now understand how to create and update Bugster test specifications. Ask your AI agent to create tests for specific files, components, or user flows. ## Example Prompts ``` @bugster-generate Create tests for src/components/LoginForm.tsx ``` Generates comprehensive test coverage for a specific component. ``` @bugster-update Update tests for the authentication flow based on recent changes ``` Updates existing test specs to reflect code modifications. ``` @bugster-generate Generate comprehensive test coverage for the checkout process ``` Creates multiple test scenarios for complex user flows. ``` @bugster-generate Create edge case tests for the payment form validation ``` Focuses on specific testing scenarios with detailed instructions. ## Rule Capabilities AI understands your code structure and creates relevant test scenarios automatically. Generates properly formatted test specs that work with `bugster run`. Updates existing tests when your code changes without duplicating specs. Follows Bugster conventions for selectors, assertions, and test structure. ## Workflow Integration After installation, your typical workflow becomes: 1. Write or modify application code 2. Reference `@bugster-generate` in your AI chat 3. Ask your coding agent to create tests for the changes 4. Review and commit the generated test specs 5. Run tests with `bugster run` Run `bugster plugin --force` periodically to ensure you have the latest rule versions with improved test generation capabilities. The rules require your coding agent to have access to your project files. Ensure your editor has proper permissions to read the `.bugster/` directory. ## Best Practices * **Version Control**: Commit the rule files to your repository so the entire team benefits * **Regular Updates**: Use `--force` to update rules when Bugster releases new versions * **Consistent Usage**: Reference the rules consistently across your team for uniform test quality * **Combine with Generate**: Use plugin rules for targeted test creation and `bugster generate` for comprehensive coverage # Run Source: https://docs.bugster.dev/commands/run Execute your test specifications with browser automation The `bugster run` command executes your test specifications using an AI agent in automated browser instances. It provides comprehensive test execution with real browser automation and intelligent result analysis. ## Basic Usage ```bash theme={null} bugster run ``` ## Command Overview Executes test specifications using AI-powered browser automation to validate your application's functionality across different scenarios and user flows. ### When to Use * **Before deploying** to validate functionality * In CI/CD pipelines for automated testing * During development to catch regressions * To verify fixes after bug reports ### Key Features * AI agent executes tests in real browser instances * Supports parallel execution for faster results * Automatic video recording for failed tests * Real-time streaming to dashboard * Quick ad-hoc testing with text prompts Requires your application to be running and accessible on the configured URL before executing tests. ## Command Syntax ```bash theme={null} bugster run [path] [options] ``` ## How It Works The run command: 1. **Test Discovery**: Scans for test specifications in `.bugster/tests/` directory 2. **Browser Initialization**: Launches browser instances (visible or headless) 3. **AI Execution**: AI agent interprets and executes test steps 4. **Result Analysis**: Captures screenshots, videos, and detailed logs 5. **Reporting**: Streams results to dashboard and generates reports ## Execution Options Run tests in headless mode without visible browser UI. Ideal for CI/CD environments. Maximum number of concurrent tests to run simultaneously. Higher values speed up execution but use more resources. Alias for `--parallel`. Specifies the maximum number of tests to run concurrently. Maximum number of tests to execute. Useful for quick validation or debugging specific test counts. Browser engine to use for test execution. Supports chromium, firefox, and webkit. Set the browser viewport size in WIDTHxHEIGHT format (e.g., 1920x1080, 1280x720, 375x667 for mobile). Run an instant test from a text description (max 1000 characters). Creates and executes a test without needing YAML files. Alias for `--prompt`. Run a quick test from natural language description. ## Filtering Options Run only tests for files/directories that have been modified. Perfect for PR workflows and focused testing. Override the base URL from configuration. Useful for testing against different environments. ## Output Options Save detailed test results to a JSON file. Essential for CI/CD integration and test reporting. Stream real-time results to the Bugster dashboard for live monitoring. Disable streaming to dashboard. Results will only be available locally. Enable detailed logging output for debugging test execution issues. Run in silent mode with minimal output. Reduces noise in CI/CD logs. ## Examples ### Complete Test Suite ```bash theme={null} bugster run ``` Runs all available tests with default settings and visible browser. ### Headless CI/CD Execution ```bash theme={null} bugster run --headless --stream-results ``` Perfect for automated testing in continuous integration pipelines. ### Parallel Execution ```bash theme={null} bugster run --parallel 8 --headless ``` Runs up to 8 tests concurrently for maximum speed. ### Target Specific Directory ```bash theme={null} bugster run auth/ --verbose ``` Runs only authentication tests with detailed debugging output. ### Quick Ad-hoc Testing ```bash theme={null} bugster run --prompt "Test user login with valid credentials and verify dashboard loads" ``` Creates and runs an instant test from natural language description. ### Environment Testing ```bash theme={null} bugster run --base-url https://staging.myapp.com --limit 5 ``` Tests against staging environment with a limited number of tests. ### Custom Viewport Size ```bash theme={null} bugster run --viewport-size 1920x1080 ``` Run tests with a specific browser viewport size. Useful for testing responsive designs or specific screen resolutions. ## Quick Test Prompts ```bash theme={null} bugster run --prompt "Test user login with valid credentials and verify dashboard loads" ``` Complete login flow validation. ```bash theme={null} bugster run --prompt "Add product to cart, proceed to checkout, and verify total calculation" ``` Shopping workflow testing. ```bash theme={null} bugster run --prompt "Test contact form with invalid email and verify error messages" ``` Form error handling validation. ```bash theme={null} bugster run --prompt "Test navigation menu on mobile device and verify all links work" ``` Mobile-specific functionality testing. ## Common Usage Patterns ```bash theme={null} bugster run ``` Run all tests with visible browser for development. ```bash theme={null} bugster run --headless --output results.json ``` Automated testing with result export. ```bash theme={null} bugster run --limit 5 --parallel 3 ``` Fast subset testing for quick feedback. ```bash theme={null} bugster run auth/ --verbose ``` Detailed logging for specific test categories. ## Test Results After execution, you'll receive: * **Pass/Fail Status**: Clear indication of test outcomes * **Screenshots**: Visual evidence of test execution * **Video Recordings**: Automatic recording for failed tests * **Detailed Logs**: Step-by-step execution information * **Performance Metrics**: Timing and resource usage data ## Best Practices Use `--only-affected` in PR workflows to test only changed functionality. Combine `--parallel` with `--headless` for maximum execution speed in CI/CD environments. Quick prompt tests are limited to 1000 characters and run with maximum concurrency of 1. They're perfect for exploratory testing and quick validation scenarios. # Update Source: https://docs.bugster.dev/commands/update Keep your tests synchronized with code changes using bugster update The `bugster update` command automatically maintains your test specifications by analyzing code changes and updating, creating, or deleting tests accordingly to keep them synchronized with your evolving codebase. ## Basic Usage ```bash theme={null} bugster update ``` ## Command Overview Analyzes git changes in your codebase and intelligently updates your test suite to reflect modifications, additions, and deletions in your application code. ### When to Use * **After modifying existing features** to keep tests in sync * **In Pull Request workflows** to automate test maintenance * When you've added new pages or components * After deleting or refactoring code sections ### Key Features * Compares against git changes to determine updates needed * Creates new tests, modifies existing ones, or deletes obsolete tests * Saves current state for future incremental comparisons * Works with both staged and unstaged changes * Intelligent selective updating of relevant test sections The update command requires a git repository with committed changes for comparison and automatically saves update state after successful runs. Automatic test synchronization is currently available for Next.js and React applications. For other frameworks, you can still update tests using [coding agents](/guides/coding-agents/cursor) (Cursor or Claude Code) with the plugin rules. ## Command Syntax ```bash theme={null} bugster update [options] ``` ## How It Works The update command: 1. **Change Analysis**: Compares current code against git history or saved state 2. **Impact Assessment**: Identifies which tests are affected by code changes 3. **Test Maintenance**: Updates, creates, or deletes test specifications as needed 4. **State Saving**: Records current state for future incremental updates 5. **Validation**: Ensures test specifications remain valid and executable ## Update Types Updates existing test specs when code changes: * Function signature changes → updated test steps * UI modifications → adjusted interaction flows * Logic updates → revised assertion patterns Suggests new test specs for added code: * New components → generates component test files * New pages → creates page-specific test scenarios * New features → develops feature test coverage Removes obsolete test specs: * Removed pages → deletes corresponding tests * Deleted components → removes component tests * Refactored code → cleans up outdated specs ## Scope Options Only update existing test specifications. No new test suggestions or deletions will be performed. Only suggest new test specifications for added files. No updates to existing tests or deletions. Only delete obsolete test specifications for removed files. No updates or new suggestions. ## Comparison Options Compare against the default branch (main/master) instead of HEAD. Perfect for Pull Request workflows. Compare against the commit from the last update run. Enables incremental updates for active development. Show detailed logs during analysis. (Deprecated - use --debug instead) ## Examples ### Complete Test Maintenance ```bash theme={null} bugster update ``` Handles all types of changes: updates, additions, and deletions. ### Safe Updates Only ```bash theme={null} bugster update --update-only ``` Only modifies existing tests without creating new ones or deleting any. ### New Feature Testing ```bash theme={null} bugster update --suggest-only ``` Generates tests only for newly added code and features. ### Post-refactor Cleanup ```bash theme={null} bugster update --delete-only ``` Removes obsolete tests after code refactoring or deletion. ### Branch Comparison ```bash theme={null} bugster update --against-default ``` Compares against main/master branch to catch all changes in feature branch. ### Incremental Updates ```bash theme={null} bugster update --against-last-update ``` Only processes changes since the last update run for efficient maintenance. ## Workflow Integration ```bash theme={null} bugster update --update-only ``` Ensure tests stay current before committing changes. ```bash theme={null} bugster update --against-default ``` Automate test maintenance in GitHub Actions/CI. ```bash theme={null} bugster update ``` Complete maintenance after feature development. ```bash theme={null} bugster update --against-last-update ``` Regular incremental test maintenance. ## Update Scenarios ```bash theme={null} # After completing feature development bugster update # For PR review bugster update --against-default ``` Maintains tests throughout feature development lifecycle. ```bash theme={null} # In GitHub Actions bugster update --against-default --update-only ``` Automated test maintenance in CI/CD pipelines. ```bash theme={null} # After major refactoring bugster update --delete-only # Then update remaining tests bugster update --update-only ``` Systematic test cleanup after code restructuring. ## Validation Workflow After running update, follow this validation process: 1. **Review Changes**: Examine generated test modifications 2. **Run Tests**: Execute updated tests with `bugster run --only-affected` 3. **Validate Coverage**: Ensure new features have adequate test coverage 4. **Commit Updates**: Add updated test specifications to version control ## Limitations Cannot use both `--against-default` and `--against-last-update` simultaneously. Choose one comparison method per execution. ## Best Practices Use `--against-last-update` for incremental updates during active development. Combine with `bugster run --only-affected` for complete change validation workflow. Always review generated changes before committing to your repository. The `--against-default` flag is perfect for PR workflows to catch all branch changes comprehensively. # Framework Compatibility Source: https://docs.bugster.dev/framework-compatibility Detailed framework and routing support information for Bugster CLI Bugster supports all major JavaScript frameworks and generates automated tests for your web applications. This page provides detailed information about supported frameworks and routing patterns. **Framework Differences**: Next.js and React have enhanced routing analysis features for the `generate` and `update` commands. Angular, Svelte, Vue, and other frameworks use AI agent-assisted test generation with Cursor or Claude Code. ## Supported Frameworks }> Enhanced routing analysis support Enhanced routing analysis support AI agent-assisted test generation ## Framework Implementation Differences **Enhanced Routing Analysis** Next.js and React applications benefit from advanced routing analysis in the `generate` and `update` commands. Bugster automatically: * Detects and analyzes your application's routing structure * Generates tests for all discovered routes * Updates test suites when routes change * Handles dynamic routes and nested layouts This routing-aware approach ensures comprehensive test coverage across your application. **AI Agent-Assisted Test Generation** For Angular, Svelte, Vue, and other JavaScript frameworks, the `generate` and `update` commands work through AI coding assistants like Cursor or Claude Code: * Tests are created and updated with AI assistance using Agent rules * Leverages your coding assistant's understanding of your application * Flexible approach that works with any framework or routing pattern This approach provides maximum flexibility and works across all JavaScript frameworks and configurations. Learn how to set up Bugster with Cursor for AI-assisted test generation ## Next.js Support Bugster provides enhanced routing analysis for Next.js applications across different routing patterns. ### Supported Routing Patterns **Pages Router** (`/pages` directory - Next.js 12 and legacy versions) ```javascript pages/index.js theme={null} // pages/index.js export default function Home() { return
Welcome to the homepage
} ``` ```javascript pages/about.js theme={null} // pages/about.js export default function About() { return
About page
} ``` ```javascript pages/blog/[slug].js theme={null} // pages/blog/[slug].js export default function BlogPost({ params }) { return
Blog post: {params.slug}
} ```
Bugster automatically detects all pages in your `/pages` directory and generates tests for static and dynamic routes.
**App Router** (`/app` directory - Next.js 13+) with file-based routing ```javascript app/page.js theme={null} // app/page.js export default function HomePage() { return
Welcome to the homepage
} ``` ```javascript app/about/page.js theme={null} // app/about/page.js export default function AboutPage() { return
About page
} ``` ```javascript app/blog/[slug]/page.js theme={null} // app/blog/[slug]/page.js export default function BlogPost({ params }) { return
Blog post: {params.slug}
} ```
Bugster understands the new App Router structure and generates tests for all route segments, including nested layouts and dynamic routes.
## React.js Support Bugster provides enhanced routing analysis for React 18+ applications using React Router DOM. ### Supported Routing Patterns **Code-based routing** - Routes defined programmatically in your code ```javascript Create React App - JavaScript theme={null} // src/App.js import { BrowserRouter, Routes, Route } from 'react-router-dom'; import Home from './components/Home'; import About from './components/About'; import Contact from './components/Contact'; function App() { return ( } /> } /> } /> } /> ); } export default App; ``` ```typescript Vite - TypeScript theme={null} // src/App.tsx import { BrowserRouter, Routes, Route } from 'react-router-dom'; import Home from './components/Home'; import About from './components/About'; import Contact from './components/Contact'; function App(): JSX.Element { return ( } /> } /> } /> } /> ); } export default App; ``` Bugster analyzes your route definitions and generates tests for all declared routes, including dynamic parameters. **File-based routing** - React Router v7 with file-based route definitions ```typescript React Router v7 theme={null} // app/routes.ts import type { RouteConfig } from "@react-router/dev/routes"; export default [ { path: "/", file: "routes/home.tsx", }, { path: "/about", file: "routes/about.tsx", }, { path: "/blog/:slug", file: "routes/blog.$slug.tsx", }, ] satisfies RouteConfig; ``` ```typescript Home Route theme={null} // app/routes/home.tsx export default function Home() { return
Welcome to the homepage
; } ``` ```typescript Dynamic Route theme={null} // app/routes/blog.$slug.tsx import { useParams } from "@react-router/react"; export default function BlogPost() { const { slug } = useParams(); return
Blog post: {slug}
; } ```
Bugster supports React Router v7's file-based routing system and automatically discovers routes from your configuration.
### React Router Versions **Fully Supported** - Standard routing patterns with `` and `` components. ```javascript theme={null} import { BrowserRouter, Routes, Route } from 'react-router-dom'; ``` **Fully Supported** - Both code-based and file-based routing patterns. ```typescript theme={null} import type { RouteConfig } from "@react-router/dev/routes"; ``` ### React Router Limitations For enhanced routing analysis, the following patterns are not supported: * Custom routers or dynamic routing systems with routes scattered across multiple files * Alternative routing libraries (TanStack Router, Wouter, Reach Router) * Complex routing factories that generate routes programmatically at runtime If your React application uses unsupported routing patterns, you can use AI agent-assisted test generation with Cursor or Claude Code instead, which works with any navigation structure. ## Other Frameworks Angular, Svelte, Vue, and other JavaScript frameworks are supported with AI agent-assisted test generation: **Fully Supported** - All Angular configurations work with Bugster's AI agent-assisted test generation. * Angular 12+ applications * Angular Router or any routing solution * Angular CLI or custom build configurations * Standalone components and NgModules Use Cursor or Claude Code with Bugster Agent rules to generate and update tests for your Angular application. **Fully Supported** - All Svelte configurations work with Bugster's AI agent-assisted test generation. * Svelte applications * Any routing solution * Vite or custom build configurations * SPA modes Use Cursor or Claude Code with Bugster Agent rules to generate and update tests for your Svelte application. **Fully Supported** - All Vue configurations work with Bugster's AI agent-assisted test generation. * Vue 2 and Vue 3 applications * Vue Router or any routing solution * Vite, Vue CLI, or custom build configurations * Options API and Composition API Use Cursor or Claude Code with Bugster Agent rules to generate and update tests for your Vue application. **Fully Supported** - Bugster works with any JavaScript framework through AI agent assistance. Supported frameworks include but are not limited to: * Nuxt * SvelteKit * Preact * Remix * Vanilla JavaScript applications * And any other JavaScript framework or library Use Cursor or Claude Code with Bugster Agent rules to generate and update tests for any framework. ## Getting Started with Your Framework Check that your project uses one of the supported frameworks and routing patterns listed above. Follow the [installation guide](/installation) to set up Bugster CLI on your system. Run the quickstart command in your project directory: ```bash theme={null} bugster quickstart --api-key=YOUR_API_KEY ``` Execute the generated tests: ```bash theme={null} bugster run ``` ## Need Help? Follow our quickstart guide to set up Bugster with your framework Get help from the community and Bugster team ## Command Behavior Summary **Next.js & React**: Enhanced routing analysis automatically discovers and generates tests for all routes. **Angular, Svelte, Vue & Others**: AI agent-assisted generation using Cursor or Claude Code with Bugster Agent rules. **All Frameworks**: Test execution works identically across all frameworks. No differences in how tests run. # CI/CD Integration Source: https://docs.bugster.dev/guides/cicd/cicd-integration Integrate Bugster into your CI/CD pipeline to automatically run tests on pull requests