Skip to main content
Pulls dashboard-managed web tests and their referenced modules into the current directory. You can import individual tests by their dashboard path, the tests in a cloud folder and its nested subfolders, or omit arguments to import the workspace, including environments. Imports with explicit paths do not import environments. When the imported entities live inside dashboard folders, the folder hierarchy is recreated on disk so your local layout mirrors the dashboard.
Run from the directory where imported files should live, usually the web project root. --config selects configuration; it does not change the working directory or the destination of new files. Requires an existing project config and authentication with login or MOMENTIC_API_KEY. The importer uses the project’s fileFormat setting when writing YAML. Existing files can be overwritten after confirmation; a full workspace import can also overwrite the base URL and variables in environments with matching names. Imported environment variables can contain plaintext secrets: move them to runtime secrets before committing. For a validated cloud-to-repository migration, follow Cloud deprecation. Unused standalone modules are not included. Check them separately before retiring the cloud project. This command does not import mobile tests.

Arguments

string
One or more dashboard paths to import. A path can be either a test path (e.g. tests/checkout/happy-path) or a folder path using the slash-separated cloud folder hierarchy (e.g. auth/onboarding). When omitted, the command imports the workspace’s web tests, their referenced modules, and environments.

Options

string
Path to the Momentic configuration file. When omitted, Momentic searches the current directory and its parents for momentic.config.yaml or a workspace configuration. Use this flag to select a project when discovery finds more than one.
string
Momentic API key. Defaults to MOMENTIC_API_KEY, then the key saved by login in ~/.momentic/auth.json.
boolean
Skip confirmation prompts, including file and environment overwrite prompts. Keep prompts enabled for the first import into an existing project.

How folder import works

  • Folder paths are matched against the dashboard’s folder tree case-insensitively. auth/onboarding matches the cloud folder named Onboarding nested under Auth.
  • Tests inside the folder and its nested subfolders are imported, together with the modules they reference. Referenced modules can live outside that folder; unused modules inside the folder are not included.
  • The cloud folder hierarchy is recreated on disk. A test in cloud folder Auth/Onboarding lands at auth/onboarding/<test-name>.test.yaml relative to the current working directory. Folder names are slugified the same way test names are.
  • In a simplified-format project, an imported test or module with the same ID as a local file keeps that file’s current location. Otherwise, the target path is derived from the dashboard folder and entity name.

Examples

Import the workspace’s web tests, referenced modules, and environments:
Import a single test by its dashboard path:
Import a cloud folder’s tests and their referenced modules, recreating the folder hierarchy on disk:
Import multiple folders and a specific test in one command: