GlobalStacks logo GlobalStacks Reference
Open app
Reference

Product Adoption

Generate a reviewable GlobalStacks product configuration from an existing repository.

Product adoption

Product adoption helps you bring an existing repository into GlobalStacks without starting from a blank product model.

The first adoption flow is configuration-only. It scans local repository metadata and writes a reviewable globalstacks.yaml file. It does not create Products, source connections, secrets, data services, object stores, sandboxes, extension installs, or other server-side resources.

Generate a config

Run adoption from the repository root:

Terminal
gstacks product adopt .

By default, the command writes:

Terminal
globalstacks.yaml

Use --output to write somewhere else:

Terminal
gstacks product adopt . --output /tmp/globalstacks.yaml

Use --force only when you intend to replace an existing file:

Terminal
gstacks product adopt . --force

Inspect before writing

Inspect detected findings and evidence without creating a config file:

Terminal
gstacks product inspect .

The output includes inferred applications, frameworks, data services, object stores, confidence, and local evidence such as manifest or example environment files.

Validate and plan

Validate the config locally:

Terminal
gstacks product validate --file globalstacks.yaml

Run the non-mutating plan command:

Terminal
gstacks product plan --file globalstacks.yaml

product plan always validates locally first. When the CLI is authenticated and the control plane supports product planning, it can also call a server-side dry run. Until that endpoint is available, the command reports that the server dry run is unavailable or skipped.

What the scanner detects

The current scanner focuses on common Node.js and Serverless Stack (SST) repositories. It can detect:

  • product name from package.json;
  • package manager from lockfiles;
  • setup, development, build, and start commands from package scripts;
  • SST configuration files;
  • Postgres usage from dependency and environment-variable signals;
  • Redis-compatible usage mapped to Valkey;
  • S3-compatible object-store usage mapped to RustFS;
  • required secret and environment variable names.

The generated config uses:

Terminal
apiVersion: product.globalstacks.dev/v1alpha1
kind: Product

Detected repo commands are recorded as text only. Adoption does not run package scripts, framework commands, Docker Compose, shell snippets, or build steps.

Security boundaries

Product adoption is designed to be safe to run against a local working tree:

  • secret values are not written to globalstacks.yaml;
  • .env.example and similar files contribute variable names, not values;
  • generated, dependency, cache, build-output, and version-control directories are skipped;
  • symlinks are not followed outside the scan root;
  • binary files are skipped;
  • source-control credentials are not inferred from local Git, shell, SSH, or package-manager configuration.

AI-assisted adoption is not enabled in this release. Passing --ai returns an error instead of uploading repository summaries.

Review before use

Treat globalstacks.yaml as a starting point. Review the generated product name, commands, services, object-store mapping, required extensions, and unresolved fields before committing it to the product repository.

Future apply flows can consume the same config after the server-side product planning and apply contracts are available.