Files
zeekayandHanzo Dev ecd717c6fb the product is Minutes, and the archived tier is gone
A fork of meetily (MIT, Zackriya Solutions) rebranded to Hanzo.

The Python/FastAPI tier, its Docker files, its whisper-server scripts and the
whisper.cpp submodule are deleted rather than rebranded. Upstream's own CLAUDE.md
says that tier is archived and unsupported and tells you not to add endpoints to
it; the shipping product is one Tauri binary that transcribes in-process with
whisper-rs and Parakeet. Rebranding a corpse would have doubled the surface and
taught the next reader that a dead service is a live one. Going with it: the
vestigial localhost:5167 gate the sidebar checked before reading its own
database.

.github/workflows goes too. This repo lives on git.hanzo.ai, which reads
.hanzo/workflows, and we do not use GitHub-hosted runners — six workflow files
that cannot run read like CI that passes. Nothing replaces them yet, because a
pipeline that has never run is worse than an honest absence.

Summaries are written by api.hanzo.ai, our own stack, and it is the default.
The other providers still compile and should go in a follow-up.

The upstream MIT notice stays and the Hanzo copyright joins it. About and the
README say plainly what this is a fork of.

Left alone deliberately, and each is a decision someone must still make: the
minisign updater key is upstream's and we cannot re-sign, so the updater points
at a release path that does not exist yet; the ffmpeg binaries still come from
upstream's GitHub; the Parakeet models still come from upstream's host.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-14 07:40:31 -07:00

179 lines
5.0 KiB
Bash
Executable File

#!/bin/bash
# GPU-accelerated development script for Minutes
# Automatically detects and runs in development mode with optimal GPU features
set -e
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
CYAN='\033[0;36m'
NC='\033[0m' # No Color
echo -e "${BLUE}🚀 Minutes GPU-Accelerated Development Mode${NC}"
echo ""
# Export CUDA flags for Linux/NVIDIA
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
export CMAKE_CUDA_ARCHITECTURES=75
export CMAKE_CUDA_STANDARD=17
export CMAKE_POSITION_INDEPENDENT_CODE=ON
fi
# Detect OS
if [[ "$OSTYPE" == "darwin"* ]]; then
OS="macos"
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
OS="linux"
else
echo -e "${RED}❌ Unsupported OS: $OSTYPE${NC}"
exit 1
fi
# Function to check if command exists
command_exists() {
command -v "$1" >/dev/null 2>&1
}
# Find the correct directory - we need to be in frontend root for npm commands
if [ -f "package.json" ]; then
FRONTEND_DIR="."
elif [ -f "frontend/package.json" ]; then
cd frontend || { echo -e "${RED}❌ Failed to change to frontend directory${NC}"; exit 1; }
FRONTEND_DIR="frontend"
else
echo -e "${RED}❌ Could not find package.json${NC}"
echo -e "${RED} Make sure you're in the project root or frontend directory${NC}"
exit 1
fi
echo ""
echo -e "${BLUE}📦 Starting Minutes in development mode...${NC}"
echo ""
# Check for pnpm or npm
if command_exists pnpm; then
PKG_MGR="pnpm"
elif command_exists npm; then
PKG_MGR="npm"
else
echo -e "${RED}❌ Neither npm nor pnpm found${NC}"
exit 1
fi
# Detect GPU feature if not already set
if [ -z "$TAURI_GPU_FEATURE" ]; then
echo -e "${BLUE}🔍 Detecting GPU features...${NC}"
TAURI_GPU_FEATURE=$(node scripts/auto-detect-gpu.js)
fi
if [ -n "$TAURI_GPU_FEATURE" ]; then
if [ "$TAURI_GPU_FEATURE" == "none" ]; then
echo -e "${YELLOW}⚠️ GPU feature explicitly set to none. Running in CPU-only mode.${NC}"
else
echo -e "${GREEN}✅ Detected GPU feature: $TAURI_GPU_FEATURE${NC}"
fi
export TAURI_GPU_FEATURE
else
echo -e "${YELLOW}⚠️ No specific GPU feature detected or forced${NC}"
fi
# Build llama-helper
echo ""
echo -e "${BLUE}🦙 Building llama-helper sidecar (debug)...${NC}"
HELPER_DIR="llama-helper"
if [ ! -d "$HELPER_DIR" ]; then
# Try to find it relative to script location
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
HELPER_DIR="$SCRIPT_DIR/../llama-helper"
fi
if [ ! -d "$HELPER_DIR" ]; then
echo -e "${RED}❌ Could not find llama-helper directory${NC}"
exit 1
fi
# Determine llama-helper features
# Note: llama-cpp-2 does NOT support coreml, only metal/cuda/vulkan
# So for macOS Apple Silicon (which returns 'coreml' for Whisper), use 'metal' for llama-helper
HELPER_FEATURES=""
if [ -n "$TAURI_GPU_FEATURE" ] && [ "$TAURI_GPU_FEATURE" != "none" ]; then
LLAMA_FEATURE="$TAURI_GPU_FEATURE"
if [ "$LLAMA_FEATURE" = "coreml" ]; then
LLAMA_FEATURE="metal"
echo -e "${YELLOW} Note: llama-cpp-2 doesn't support CoreML, using Metal instead${NC}"
fi
HELPER_FEATURES="--features $LLAMA_FEATURE"
fi
echo -e " Building in $HELPER_DIR with features: ${HELPER_FEATURES:-none}"
(cd "$HELPER_DIR" && cargo build $HELPER_FEATURES)
if [ $? -ne 0 ]; then
echo -e "${RED}❌ Failed to build llama-helper${NC}"
exit 1
fi
echo -e "${GREEN}✅ llama-helper built successfully${NC}"
# Detect target triple
echo ""
echo -e "${BLUE}🎯 Detecting target triple...${NC}"
TARGET_TRIPLE=$(rustc -vV | grep "host:" | awk '{print $2}')
echo -e " Target: $TARGET_TRIPLE"
# Copy binary
BINARIES_DIR="$FRONTEND_DIR/src-tauri/binaries"
mkdir -p "$BINARIES_DIR"
# Clean old binaries
find "$BINARIES_DIR" -name "llama-helper*" -delete
BASE_BINARY="llama-helper"
SIDECAR_BINARY="llama-helper-$TARGET_TRIPLE"
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
BASE_BINARY="llama-helper.exe"
SIDECAR_BINARY="llama-helper-$TARGET_TRIPLE.exe"
fi
# The binary is in the workspace target directory, which is one level up from frontend
# if we are in frontend dir.
WORKSPACE_ROOT="$FRONTEND_DIR/.."
SRC_PATH="$WORKSPACE_ROOT/target/debug/$BASE_BINARY"
DEST_PATH="$BINARIES_DIR/$SIDECAR_BINARY"
if [ ! -f "$SRC_PATH" ]; then
# Fallback: check if we are running from root and target is in root
SRC_PATH="target/debug/$BASE_BINARY"
fi
if [ -f "$SRC_PATH" ]; then
cp "$SRC_PATH" "$DEST_PATH"
echo -e "${GREEN}✅ Copied binary to $DEST_PATH${NC}"
else
echo -e "${RED}❌ Binary not found at $SRC_PATH${NC}"
# List contents of target/debug to help debugging
echo -e "${YELLOW}Contents of target/debug:${NC}"
ls -la "$WORKSPACE_ROOT/target/debug/" || ls -la "target/debug/"
exit 1
fi
# Run tauri dev using npm scripts
echo ""
echo -e "${CYAN}Starting complete Tauri application...${NC}"
echo ""
$PKG_MGR run tauri:dev
if [ $? -eq 0 ]; then
echo ""
echo -e "${GREEN}✅ Development server stopped cleanly${NC}"
else
echo ""
echo -e "${RED}❌ Development server encountered an error${NC}"
exit 1
fi