Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synthetics init command takes args to skip dialogue steps #907

Open
justinkambic opened this issue Mar 27, 2024 · 2 comments
Open

Synthetics init command takes args to skip dialogue steps #907

justinkambic opened this issue Mar 27, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@justinkambic
Copy link
Contributor

Today, when creating a new project via npx @elastic/synthetics init, I am given a number of prompts. This includes my Kibana API key, locations, monitor duration, Kibana spaces, etc.

I would like to skip these and get right to managing my project.

The init command should allow arguments for these fields, so if we create a project quickstart flow in Kibana we could publish a pre-filled command like npx @elastic/synthetics init --apiKey {...} --kibanaUrl http://127.0.0.1:5601/ --location us-east --location us-west --period 5 --kibanaSpace default --exportApiKey yes that the user could then paste to their shell and skip the dialogue altogether.

With a feature like this, they could either npm run push straight away, or make modifications as needed and push afterwards.

We only really require API Key, Kibana URL, and Location input from the user, all the other fields are default-able, so if they're unspecified we can simply supply the default with this usage. For no arguments, we could use the existing wizard dialogue instead.

@justinkambic
Copy link
Contributor Author

An additional nice feature would be, if the API key is unspecified but SYNTHETICS_API_KEY is defined in the env we could optionally pick it up without displaying, but I'm not sure if that'd be confusing.

@borism
Copy link

borism commented May 3, 2024

Hi, we also would be quite interested in this feature so we can use it to automatically onboard new projects via Github action in our Synthetics-as-a-code monorepo. Doesn't seem to work like this yet in 1.9.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants