chore: automate platform installation by running internalai install after setup

Replace manual next steps display with automatic execution of the platform installation command. The installer now runs `internalai install` immediately after CLI installation, with fallback to direct path execution if the command is not in PATH.
This commit is contained in:
Jose B
2025-12-11 16:23:34 -05:00
parent fd4cbfe780
commit fa90c79ee7

View File

@@ -822,28 +822,31 @@ install_cli() {
# Post-Installation
# ============================================================================
show_next_steps() {
run_platform_install() {
log_header "Installation Complete!"
echo -e "${GREEN}${BOLD}The InternalAI platform has been set up successfully!${NC}"
echo ""
echo -e "${BOLD}Platform Location:${NC} ${CYAN}$INSTALL_DIR${NC}"
echo ""
echo -e "${BOLD}Next Steps:${NC}"
echo ""
echo " 1. Configure and start the platform:"
echo -e " ${GREEN}$CLI_NAME install${NC}"
echo ""
echo " 2. View available commands:"
echo -e " ${GREEN}$CLI_NAME help${NC}"
echo ""
echo " 3. Check platform status:"
echo -e " ${GREEN}$CLI_NAME status${NC}"
echo ""
echo -e "${BOLD}Documentation:${NC}"
echo " • Platform docs: $INSTALL_DIR/docs/"
echo " • README: $INSTALL_DIR/README.md"
log_info "Starting platform configuration and installation..."
echo ""
# Run internalai install
if command -v "$CLI_NAME" &> /dev/null; then
"$CLI_NAME" install
else
log_error "$CLI_NAME command not found in PATH"
log_info "Trying direct path: $CLI_INSTALL_DIR/$CLI_NAME"
if [ -x "$CLI_INSTALL_DIR/$CLI_NAME" ]; then
"$CLI_INSTALL_DIR/$CLI_NAME" install
else
log_error "Failed to run $CLI_NAME install"
log_info "Please run manually: $CLI_NAME install"
exit 1
fi
fi
}
# ============================================================================
@@ -858,8 +861,9 @@ main() {
clone_repository
configure_git_credentials
install_cli
show_next_steps
run_platform_install
echo ""
echo -e "${GREEN}${BOLD}Setup completed successfully!${NC}"
echo ""
}