@deepcrawl/oreo
v2.17.0
Published
deepcrawl cli
Readme
Oreo
✨ 🤖 🐱 the CLI for Lumar
Usage
$ npx @deepcrawl/oreo@latest COMMANDCommands
oreo config profile create NAMEoreo config profile delete NAMEoreo config profile listoreo crawl createoreo help [COMMAND]oreo loginoreo metric bootstrap PATHoreo metric buildoreo metric createoreo metric generate-config-schemaoreo metric global-secret setoreo metric global-secret set-from-dotenvoreo metric linkoreo metric local-testoreo metric publish-dir PATHoreo metric publish-zip PATHoreo metric pulloreo metric secret setoreo metric secret set-from-dotenvoreo metric unlinkoreo metric updateoreo project createoreo project request-custom-metricsoreo service-account createoreo service-account deleteoreo service-account key createoreo service-account key listoreo service-account key revokeoreo service-account listoreo service-account updateoreo user-key create
oreo config profile create NAME
Create a named auth profile for a deployment target
USAGE
$ oreo config profile create NAME --api-url <value>
ARGUMENTS
NAME Profile name (e.g. staging, dev)
FLAGS
--api-url=<value> (required) API URL for this profile
DESCRIPTION
Create a named auth profile for a deployment target
EXAMPLES
$ oreo config profile create staging --api-url https://api.staging.lumar.io/graphqlSee code: src/commands/config/profile/create.ts
oreo config profile delete NAME
Delete a named auth profile
USAGE
$ oreo config profile delete NAME
ARGUMENTS
NAME Profile name to delete
DESCRIPTION
Delete a named auth profile
EXAMPLES
$ oreo config profile delete stagingSee code: src/commands/config/profile/delete.ts
oreo config profile list
List all named auth profiles
USAGE
$ oreo config profile list
DESCRIPTION
List all named auth profiles
EXAMPLES
$ oreo config profile listSee code: src/commands/config/profile/list.ts
oreo crawl create
Run Crawl in a Project
USAGE
$ oreo crawl create [--accountId <value>] [--projectId <value>] [--profile <value>]
FLAGS
--accountId=<value> Account ID to create the Project in
--profile=<value> Named auth profile to use (e.g. staging, prod)
--projectId=<value> ID of the Project to run Crawl in
DESCRIPTION
Run Crawl in a Project
EXAMPLES
$ oreo crawl createSee code: src/commands/crawl/create/index.ts
oreo help [COMMAND]
Display help for oreo.
USAGE
$ oreo help [COMMAND...] [-n]
ARGUMENTS
[COMMAND...] Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for oreo.See code: @oclif/plugin-help
oreo login
Authenticate oreo with Lumar
USAGE
$ oreo login [--api-key <value> | [--id <value> --secret <value>] | | ] [--accountId <value>] [--profile
<value>]
FLAGS
--accountId=<value> Set default account ID after login
--api-key=<value> Service account API key (format: lmr_sa_{id}_{secret})
--id=<value> UserKey ID for authentication
--profile=<value> Named profile to authenticate (stores tokens in the profile instead of default config)
--secret=<value> UserKey secret for authentication
DESCRIPTION
Authenticate oreo with Lumar
EXAMPLES
$ oreo loginSee code: src/commands/login/index.ts
oreo metric bootstrap PATH
Bootstraps a new CustomMetricContainer project. Generates boilerplate TypeScript project and registers CustomMetricContainer with API.
USAGE
$ oreo metric bootstrap PATH [--accountId <value>] [--name <value>] [--description <value>] [--resourceTypes
Document|Image|Script|Stylesheet...] [--inputType DOM|Puppeteer] [--dirty] [--profile <value>]
ARGUMENTS
PATH path to the new CustomMetricContainer project (empty folder)
FLAGS
--accountId=<value> Account ID to create the CustomMetricContainer in
--description=<value> Description of the new CustomMetricContainer
--dirty Allow building in a non-empty directory
--inputType=<option> Which input type the CustomMetricContainer uses to extract metrics from the source types
<options: DOM|Puppeteer>
--name=<value> Name of the new CustomMetricContainer
--profile=<value> Named auth profile to use (e.g. staging, prod)
--resourceTypes=<option>... Which source types the CustomMetricContainer extracts metrics from
<options: Document|Image|Script|Stylesheet>
DESCRIPTION
Bootstraps a new CustomMetricContainer project. Generates boilerplate TypeScript project and registers
CustomMetricContainer with API.
EXAMPLES
$ oreo metric bootstrap my-metrics/ --name MyMetricNameSee code: src/commands/metric/bootstrap/index.ts
oreo metric build
Build a CustomMetricContainer. Bundles TypeScript using esbuild and generates JSON schemas
USAGE
$ oreo metric build [--outDir <value>] [--dirty] [--entrypoint <value>] [--handler <value>] [--metricsSchema
<value>]
FLAGS
--dirty Allow building in a non-empty directory
--entrypoint=<value> path to the JavaScript or TypeScript file with handler export
--handler=<value> name of the handler function exported from entrypoint
--metricsSchema=<value> path to JSON schema file for the output of handler function
--outDir=<value> [default: dc.out/build/] Output directory for the build
DESCRIPTION
Build a CustomMetricContainer. Bundles TypeScript using esbuild and generates JSON schemas
EXAMPLES
$ oreo metric build --outDir dc.out/build/See code: src/commands/metric/build/index.ts
oreo metric create
Create a new CustomMetricContainer in the account
USAGE
$ oreo metric create [--accountId <value>] [--profile <value>] [--name <value>] [--description <value>]
[--resourceTypes Document|Image|Script|Stylesheet...] [--inputType DOM|Puppeteer]
FLAGS
--accountId=<value> Account ID to create the CustomMetricContainer in
--description=<value> Description of the new CustomMetricContainer
--inputType=<option> Which input type the CustomMetricContainer uses to extract metrics from the source types
<options: DOM|Puppeteer>
--name=<value> Name of the new CustomMetricContainer
--profile=<value> Named auth profile to use (e.g. staging, prod)
--resourceTypes=<option>... Which source types the CustomMetricContainer extracts metrics from
<options: Document|Image|Script|Stylesheet>
DESCRIPTION
Create a new CustomMetricContainer in the account
EXAMPLES
$ oreo metric create --name MyMetricContainer --resourceTypes Document ImageSee code: src/commands/metric/create.ts
oreo metric generate-config-schema
Generate a JSON schema for the container config
USAGE
$ oreo metric generate-config-schema
DESCRIPTION
Generate a JSON schema for the container config
EXAMPLES
$ oreo metric generate-config-schemaSee code: src/commands/metric/generate-config-schema/index.ts
oreo metric global-secret set
Set a secret for a CustomMetricContainer that will be inherited by all Projects using this container.
USAGE
$ oreo metric global-secret set --name <value> --value <value> [--containerId <value>] [-t <value>]
FLAGS
-t, --target=<value> Named deployment target from .oreorc config targets block (e.g. staging, dev)
--containerId=<value> ID of the CustomMetricContainer that you want to set a secret for
--name=<value> (required) Secret name. (Will be available via Environment variables in the container.)
--value=<value> (required) Secret value
DESCRIPTION
Set a secret for a CustomMetricContainer that will be inherited by all Projects using this container.
EXAMPLES
$ oreo metric global-secret set --name SECRET_NAME --value SECRET_VALUESee code: src/commands/metric/global-secret/set.ts
oreo metric global-secret set-from-dotenv
Reads all secrets in .env and sets secrets for a CustomMetricContainer that will be inherited by all Projects using this container.
USAGE
$ oreo metric global-secret set-from-dotenv [--containerId <value>] [--dotenvPath <value>] [-y] [-t <value>]
FLAGS
-t, --target=<value> Named deployment target from .oreorc config targets block (e.g. staging, dev)
-y, --yes Skip all prompts and use the default values
--containerId=<value> ID of the CustomMetricContainer that you want to set a secret for
--dotenvPath=<value> [default: .env] Path to the .env file
DESCRIPTION
Reads all secrets in .env and sets secrets for a CustomMetricContainer that will be inherited by all Projects using
this container.
EXAMPLES
$ oreo metric global-secret set-from-dotenvSee code: src/commands/metric/global-secret/set-from-dotenv.ts
oreo metric link
link existing CustomMetricContainer with a Project
USAGE
$ oreo metric link [--accountId <value>] [--containerId <value>] [--projectId <value>] [--projectIds
<value>...] [-t <value>]
FLAGS
-t, --target=<value> Named deployment target from .oreorc config targets block (e.g. staging, dev)
--accountId=<value> Account ID to use for selecting containers and projects
--containerId=<value> ID of the CustomMetricContainer that you want to link with a Project
--projectId=<value> ID of the Project that you want to link CustomMetricContainer to
--projectIds=<value>... IDs of the Projects that you want to link CustomMetricContainer to
DESCRIPTION
link existing CustomMetricContainer with a Project
EXAMPLES
$ oreo metric linkSee code: src/commands/metric/link.ts
oreo metric local-test
Runs tests for custom metric container
USAGE
$ oreo metric local-test [--updateResults] [--entrypoint <value>] [--metricsTypePath <value>] [--metricsTypeName
<value>] [--metricsTypeNames <value>]
FLAGS
--entrypoint=<value> path to the TypeScript file with handler export
--metricsTypeName=<value> name of the interface/type with metrics definitions. if missing, output types will be
generated from TypeScript
--metricsTypeNames=<value> JSON with multitype metric mapping, e.g '{"metricName": "MetricType" }'. if missing,
output types will be generated from TypeScript
--metricsTypePath=<value> path to the TypeScript file with the metrics type export. if missing, entrypoint path will
be used
--updateResults updates expected results file with new results
DESCRIPTION
Runs tests for custom metric container
EXAMPLES
$ oreo metric local-testSee code: src/commands/metric/local-test/index.ts
oreo metric publish-dir PATH
Publish a CustomMetricContainer bundle directory as a .zip file and publish it to the API.
USAGE
$ oreo metric publish-dir PATH [--id <value>] [-t <value>]
ARGUMENTS
PATH [default: dc.out/build/] path to directory that you want to publish
FLAGS
-t, --target=<value> Named deployment target from .oreorc config targets block (e.g. staging, dev)
--id=<value> ID of the CustomMetricContainer that you want to update
DESCRIPTION
Publish a CustomMetricContainer bundle directory as a .zip file and publish it to the API.
EXAMPLES
$ oreo metric publish-dir dc.out/build/See code: src/commands/metric/publish-dir/index.ts
oreo metric publish-zip PATH
Publish a CustomMetricContainer .zip file and publish it to the API. This command will create a new version of the CustomMetricContainer.
USAGE
$ oreo metric publish-zip PATH [--id <value>] [-t <value>]
ARGUMENTS
PATH path to zip that you want to publish
FLAGS
-t, --target=<value> Named deployment target from .oreorc config targets block (e.g. staging, dev)
--id=<value> ID of the CustomMetricContainer that you want to update
DESCRIPTION
Publish a CustomMetricContainer .zip file and publish it to the API. This command will create a new version of the
CustomMetricContainer.
EXAMPLES
$ oreo metric publish-zip dc.out/my-container.zipSee code: src/commands/metric/publish-zip/index.ts
oreo metric pull
Fetch container properties from the API and write them into the existing .oreorc config.
USAGE
$ oreo metric pull [--id <value>] [-t <value>]
FLAGS
-t, --target=<value> Named deployment target from .oreorc config targets block (e.g. staging, dev)
--id=<value> ID of the CustomMetricContainer to pull from
DESCRIPTION
Fetch container properties from the API and write them into the existing .oreorc config.
EXAMPLES
$ oreo metric pull
$ oreo metric pull --target prodSee code: src/commands/metric/pull.ts
oreo metric secret set
Set a secret for a CustomMetricContainerProject.
USAGE
$ oreo metric secret set --projectId <value> --name <value> --value <value> [--containerId <value>] [-t <value>]
FLAGS
-t, --target=<value> Named deployment target from .oreorc config targets block (e.g. staging, dev)
--containerId=<value> ID of the CustomMetricContainer that you want to set a secret for
--name=<value> (required) Secret name. (Will be available via Environment variables in the container.)
--projectId=<value> (required) ID of the Project that you want to set a secret for
--value=<value> (required) Secret value
DESCRIPTION
Set a secret for a CustomMetricContainerProject.
EXAMPLES
$ oreo metric secret set --projectId 282970 --name SECRET_NAME --value SECRET_VALUESee code: src/commands/metric/secret/set.ts
oreo metric secret set-from-dotenv
Reads all secrets in .env and sets secrets for a specific Project using a CustomMetricContainer.
USAGE
$ oreo metric secret set-from-dotenv --projectId <value> [--containerId <value>] [--dotenvPath <value>] [-y] [-t
<value>]
FLAGS
-t, --target=<value> Named deployment target from .oreorc config targets block (e.g. staging, dev)
-y, --yes Skip all prompts and use the default values
--containerId=<value> ID of the CustomMetricContainer that you want to set a secret for
--dotenvPath=<value> [default: .env] Path to the .env file
--projectId=<value> (required) ID of the Project that you want to set a secret for
DESCRIPTION
Reads all secrets in .env and sets secrets for a specific Project using a CustomMetricContainer.
EXAMPLES
$ oreo metric secret set-from-dotenv --projectId 282970See code: src/commands/metric/secret/set-from-dotenv.ts
oreo metric unlink
unlink CustomMetricContainer from Project
USAGE
$ oreo metric unlink --projectId <value> [--containerId <value>] [-t <value>]
FLAGS
-t, --target=<value> Named deployment target from .oreorc config targets block (e.g. staging, dev)
--containerId=<value> ID of the CustomMetricContainer that you want to unlink from a Project
--projectId=<value> (required) ID of the Project that you want to unlink CustomMetricContainer from
DESCRIPTION
unlink CustomMetricContainer from Project
EXAMPLES
$ oreo metric unlinkSee code: src/commands/metric/unlink.ts
oreo metric update
Sync container properties from .oreorc to the API without publishing code.
USAGE
$ oreo metric update [--id <value>] [-t <value>]
FLAGS
-t, --target=<value> Named deployment target from .oreorc config targets block (e.g. staging, dev)
--id=<value> ID of the CustomMetricContainer to update
DESCRIPTION
Sync container properties from .oreorc to the API without publishing code.
EXAMPLES
$ oreo metric update
$ oreo metric update --target prodSee code: src/commands/metric/update.ts
oreo project create
Create a new Project in the account
USAGE
$ oreo project create [--accountId <value>] [--name <value>] [--domain <value>] [--type
Accessibility|Basic|SEO|SiteSpeed] [--useRenderer] [--receiveAlertEmails] [--profile <value>]
FLAGS
--accountId=<value> Account ID to create the Project in
--domain=<value> Primary domain of the new Project
--name=<value> Name of the new Project
--profile=<value> Named auth profile to use (e.g. staging, prod)
--receiveAlertEmails Receive alert emails for the new Project
--type=<option> Type of the new Project
<options: Accessibility|Basic|SEO|SiteSpeed>
--useRenderer Use JS renderer for the new Project
DESCRIPTION
Create a new Project in the account
EXAMPLES
$ oreo project create --name "Test Oreo Project" --domain http://example.comSee code: src/commands/project/create/index.ts
oreo project request-custom-metrics
Run a request against a project.
USAGE
$ oreo project request-custom-metrics --projectId <value> --url <value> [--json] [--customMetricContainerIds <value>...]
[--saveHtml <value>] [--customHtml <value>] [--profile <value>]
FLAGS
--customHtml=<value> Path to an HTML file to use instead of the live page content.
--customMetricContainerIds=<value>...
--profile=<value> Named auth profile to use (e.g. staging, prod)
--projectId=<value> (required) The project ID from which all the settings will be inherited.
--saveHtml=<value> The file to write the renderedBody to.
--url=<value> (required) The URL to request.
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Run a request against a project.
EXAMPLES
$ oreo project request-custom-metrics --projectId 282970 --url https://www.example.com/
$ oreo project request-custom-metrics --projectId 282970 --url https://www.example.com/ --customMetricContainerIds 1,2
$ oreo project request-custom-metrics --projectId 282970 --url https://www.example.com/ --customMetricContainerIds 44 --jsonSee code: src/commands/project/request-custom-metrics/index.ts
oreo service-account create
Create a new service account
USAGE
$ oreo service-account create --name <value> --role Admin|Editor|Reporter|Viewer [--json] [--description <value>]
[--accountId <value>] [--profile <value>]
FLAGS
--accountId=<value> Account ID to create the service account in
--description=<value> Description of the service account
--name=<value> (required) Name of the service account
--profile=<value> Named auth profile to use (e.g. staging, prod)
--role=<option> (required) Role for the service account
<options: Admin|Editor|Reporter|Viewer>
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Create a new service account
EXAMPLES
$ oreo service-account create --name "CI Pipeline" --role EditorSee code: src/commands/service-account/create.ts
oreo service-account delete
Delete a service account
USAGE
$ oreo service-account delete --id <value> [--json] [--force] [--profile <value>]
FLAGS
--force Skip confirmation prompt
--id=<value> (required) ID of the service account to delete
--profile=<value> Named auth profile to use (e.g. staging, prod)
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Delete a service account
EXAMPLES
$ oreo service-account delete --id 123See code: src/commands/service-account/delete.ts
oreo service-account key create
Create a new API key for a service account. The full key is only shown once.
USAGE
$ oreo service-account key create --service-account-id <value> [--json] [--name <value>] [--expires-at <value>] [--profile
<value>]
FLAGS
--expires-at=<value> Expiration date for the key (ISO 8601 format, e.g. 2025-12-31)
--name=<value> Name for the API key
--profile=<value> Named auth profile to use (e.g. staging, prod)
--service-account-id=<value> (required) ID of the service account to create the key for
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Create a new API key for a service account. The full key is only shown once.
EXAMPLES
$ oreo service-account key create --service-account-id 123
$ oreo service-account key create --service-account-id 123 --name "CI Key" --expires-at 2025-12-31See code: src/commands/service-account/key/create.ts
oreo service-account key list
List API keys for a service account
USAGE
$ oreo service-account key list --service-account-id <value> [--json] [--profile <value>]
FLAGS
--profile=<value> Named auth profile to use (e.g. staging, prod)
--service-account-id=<value> (required) ID of the service account
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List API keys for a service account
EXAMPLES
$ oreo service-account key list --service-account-id 123See code: src/commands/service-account/key/list.ts
oreo service-account key revoke
Revoke an API key for a service account
USAGE
$ oreo service-account key revoke --id <value> [--json] [--force] [--profile <value>]
FLAGS
--force Skip confirmation prompt
--id=<value> (required) ID of the API key to revoke
--profile=<value> Named auth profile to use (e.g. staging, prod)
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Revoke an API key for a service account
EXAMPLES
$ oreo service-account key revoke --id 456See code: src/commands/service-account/key/revoke.ts
oreo service-account list
List service accounts in an account
USAGE
$ oreo service-account list [--json] [--accountId <value>] [--profile <value>]
FLAGS
--accountId=<value> Account ID to list service accounts for
--profile=<value> Named auth profile to use (e.g. staging, prod)
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List service accounts in an account
EXAMPLES
$ oreo service-account listSee code: src/commands/service-account/list.ts
oreo service-account update
Update a service account
USAGE
$ oreo service-account update --id <value> [--json] [--name <value>] [--description <value>] [--role
Admin|Editor|Reporter|Viewer] [--enabled] [--profile <value>]
FLAGS
--description=<value> New description for the service account
--[no-]enabled Enable or disable the service account
--id=<value> (required) ID of the service account to update
--name=<value> New name for the service account
--profile=<value> Named auth profile to use (e.g. staging, prod)
--role=<option> New role for the service account
<options: Admin|Editor|Reporter|Viewer>
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Update a service account
EXAMPLES
$ oreo service-account update --id 123 --name "Updated Name"See code: src/commands/service-account/update.ts
oreo user-key create
Create a new UserKey
USAGE
$ oreo user-key create [--json] [--name <value>]
FLAGS
--name=<value> Name of the new UserKey
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Create a new UserKeySee code: src/commands/user-key/create/index.ts
