Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061#!/usr/bin/env bash
# Start the Aesthetic Computer devcontainer and open VS Code connected to it.## Prerequisites:# npm install -g @devcontainers/cli## This script:# 1. Builds the devcontainer if needed# 2. Opens VS Code connected to the devcontainer
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"cd "$SCRIPT_DIR"
# ColorsGREEN='\033[0;32m'YELLOW='\033[1;33m'BLUE='\033[0;34m'MAGENTA='\033[0;35m'NC='\033[0m' # No Color
echo -e "${MAGENTA}"echo "╔══════════════════════════════════════════════════════════════╗"echo "║ 🎨 Aesthetic Computer - Devcontainer Mode ║"echo "╚══════════════════════════════════════════════════════════════╝"echo -e "${NC}"
# Check if devcontainer CLI is installedif ! command -v devcontainer &> /dev/null; then echo -e "${YELLOW}⚠️ devcontainer CLI not found. Installing...${NC}" npm install -g @devcontainers/clifi
echo -e "${BLUE}📦 Checking devcontainer CLI version...${NC}"devcontainer --version
# Check if Docker is runningif ! docker info &> /dev/null; then echo -e "${YELLOW}⚠️ Docker doesn't seem to be running. Please start Docker Desktop.${NC}" exit 1fi
echo -e "${GREEN}✅ Docker is running${NC}"
# Open VS Code connected to the devcontainer (builds if needed)echo -e "${BLUE}🚀 Building and starting devcontainer...${NC}"echo -e "${YELLOW} (This may take a while on first run to build the container)${NC}"
# First bring up the containerdevcontainer up --workspace-folder "$SCRIPT_DIR"
echo -e "${GREEN}✅ Devcontainer is up!${NC}"
# Now open VS Code attached to itecho -e "${BLUE}🚀 Opening VS Code...${NC}"code --folder-uri "vscode-remote://dev-container+$(printf '%s' "$SCRIPT_DIR" | xxd -p | tr -d '\n')/workspaces/aesthetic-computer"
echo -e "${GREEN}✅ VS Code launched with devcontainer!${NC}"