Skip to content

Conversation

kunrex
Copy link

@kunrex kunrex commented Oct 3, 2025

Add beast init for Issue 417

Primary Changes:

  • Creates .beast directories
  • Creates beast_authorized_keys file in accordance to the example config. Does not create a secret.key since no usages were found
  • Creates a global config file from example config if not found
  • Validates the docker daemon is running
  • Installs air for live reloads
  • Prompts the user and creates a beast postgres database
  • Prompts the user and creates an admin user

Secondary Change:

  • Remove unused init from main.go
  • beast run checks for existence of .beast folders before running

@kunrex
Copy link
Author

kunrex commented Oct 5, 2025

Implemented Suggestions

  • beast config is used to interactively set up the global beast config
  • beast init now checks the existence of the beast postgres user and database as well as calls beast config internally

@v1bh475u
Copy link
Contributor

v1bh475u commented Oct 6, 2025

Also,@kunrex, I would like to have a demo run for this before approving changes.

_, selectedMinute, err := minuteSelection.Run()
if err != nil {
log.Errorln("Failed to read input... defaulting to now...")
return now
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be we can have the correctly parsed incomplete time with some fix instead of defaulting to now. Thoughts?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so we just default it to something if it fails? like if it fails on hours then just default it to 00 minutes, UTC or smthg like that?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. Something of that sorts. However, I am not too convinced of the idea and would like to know your opinion on the same.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah i think its better than now, also the prompt only really fails if the user ctrl+c', with that in mind what can we default it to?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants