Skip to Content

Quick Start

Prerequisites

  • Node.js 20+ — check with node -v
  • VS Code (or Cursor / VSCodium)

Install from the VS Code Marketplace  or download a VSIX  for editor forks.


Option A: Scratch Mode (zero config)

Scratch mode demo

No project, no dependencies, no setup. Perfect for trying Glubean for the first time.

  1. Create any file ending in .test.js (e.g. demo.test.js).
  2. Type gb-scratch and press Tab to expand the snippet — it generates a complete test with import, HTTP request, and assertions.
  3. Click the Play button in the gutter next to test(.

The extension detects you are outside a Glubean project and runs in Scratch Mode automatically. A one-time notification confirms: “Running in scratch mode — great for trying things out!”

Why .test.js and not .test.ts? Scratch Mode skips TypeScript compilation to stay zero-config. Use .test.js for scratch files. In a full project, .test.ts works normally.


The fastest way to see the full picture — 23 real test files covering every feature.

git clone https://github.com/glubean/cookbook.git cd cookbook npm install

Open any file in explore/ or tests/, click Play, and explore. This is the best way to learn Glubean patterns before building your own project.


Option C: Project Mode

For new projects with environment variables, shared config, and CI integration.

mkdir my-project && cd my-project npx glubean init

This creates:

my-project/ ├── explore/ # API collection — pick one case, run it (replaces Postman) ├── tests/ # regression suite — CI runs all cases every time ├── data/ # shared test data (JSON/YAML/CSV) — used by both explore/ and tests/ ├── .env # environment variables ├── .env.secrets # sensitive values (gitignored) └── package.json # scripts and @glubean/sdk dependency

Open the generated *.test.ts file and click Play in the gutter. The Result Viewer opens beside your code with the full trace.

You can also run Glubean: Initialize Project from the Command Palette (Cmd+Shift+P) to scaffold into the current workspace.


What’s next?

Last updated on