helix 추가

This commit is contained in:
Jerry Chae committed 2026-06-02 11:20:59 +09:00
1 parent c90e467ae4
commit c0058e6719
3 files changed
+439 -2

No files matched your search

+47 -2
View File
@@ -8,6 +8,7 @@
### 📁 1. 터미널 관리 & 파일 유틸리티
* **[tmux](https://github.com/tmux/tmux)** - 강력한 터미널 멀티플렉서 (세션 관리 및 화면 분할, Windows는 psmux로 설치)
* **[Helix](https://github.com/helix-editor/helix)** - 현대적이고 강력한 터미널 기반 모달 텍스트 에디터 (LSP 및 구문 강조 기본 내장)
* **[superfile](https://github.com/yorukot/superfile)** - 모던하고 수려한 터미널 기반 파일 관리자 (Vim 키바인딩 지원)
* **[dua](https://github.com/byron/dua-cli)** - 병렬 스캔을 지원하는 초고속 디스크 사용량 분석 도구
@@ -38,6 +39,11 @@
curl -fsSL "https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-tmux.sh?ref_type=heads" | bash
```
* **Helix:**
```bash
curl -fsSL "https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-helix.sh?ref_type=heads" | bash
```
* **superfile:**
```bash
curl -fsSL "https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-superfile.sh?ref_type=heads" | bash
@@ -117,6 +123,16 @@
> 💡 **Windows OpenSSH Server 참고:** 스크립트 가동 시 OpenSSH Server(sshd)가 미설치된 상태라면 자동으로 감지 및 백그라운드 설치 후 기동합니다. (관리자 권한이 필요할 수 있습니다.)
> 💡 **Windows tmux(psmux) 참고:** Windows 환경에서는 Rust 기반으로 빌드되어 성능이 뛰어난 네이티브 Windows 터미널 멀티플렉서인 `psmux`가 설치됩니다.
* **Helix:**
* **CMD 창에서 설치 시:**
```cmd
powershell -ExecutionPolicy Bypass -c "[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12; $t=\"$env:TEMP\install-helix.ps1\"; iwr -useb 'https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-helix.ps1' -OutFile $t; & $t"
```
* **파워쉘 창에서 설치 시:**
```powershell
$t="$env:TEMP\install-helix.ps1"; iwr -useb 'https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-helix.ps1' -OutFile $t; powershell -ExecutionPolicy Bypass -File $t
```
* **superfile:**
* **CMD 창에서 설치 시:**
```cmd
@@ -258,7 +274,36 @@ tmux ls # 가동 중인 세션 목록 보기
> 💡 **Windows (PowerShell) 참고:** 윈도우 환경에서 실행할 경우, OpenSSH Server 서비스(`sshd`)가 작동하지 않거나 없을 시 Windows 선택적 기능(Optional Capability)을 통하여 무인 설치 및 구동까지 완전 자동 지원합니다.
> 💡 **Windows psmux 연동 참고:** Windows에서는 네이티브 가상 터미널 환경을 선사하는 `psmux`가 설치되며, 기존 `.tmux.conf` 파일과 높은 수준으로 호환되어 동일한 설정과 vim 키바인딩을 사용할 수 있습니다.
#### 1.2. superfile
#### 1.2. Helix
터미널 환경에서 현대적인 사용성을 제공하는 모달(Modal) 텍스트 에디터입니다. 별도의 플러그인 설정 없이도 LSP(Language Server Protocol), 나무 모양 구문 트리 파서(Tree-sitter) 및 수려한 디자인 테마가 내장되어 있어 초보자부터 전문가까지 즉시 사용 가능합니다.
* **LSP 기본 내장** — 자동 완성, 정의 이동, 타입 힌트 등 IDE급 개발 지원
* **Tree-sitter 구문 분석** — 실시간 구문 분석을 통한 완벽한 색상 하이라이팅 및 스마트 영역 탐색
* **모달 편집 모드** — Vim과 유사하면서도 더 현대적인 다중 커서 및 텍스트 객체 편집 지원
```bash
hx # 실행 명령어
```
| 단축키 | 동작 |
| :--- | :--- |
| `i` | Insert 모드 진입 |
| `Esc` | Normal 모드 복귀 |
| `d` | 현재 선택 영역 삭제 (지우기) |
| `y` | 현재 선택 영역 복사 (Yank) |
| `p` | 복사한 텍스트 붙여넣기 (Paste) |
| `w` | 다음 단어로 이동 |
| `b` | 이전 단어로 이동 |
| `u` | 작업 취소 (Undo) |
| `U` | 취소 취소 (Redo) |
| `Space f` | 전역 파일 찾기 (File picker) |
| `Space /` | 현재 버퍼 전역 검색 |
| `:w` | 파일 저장 |
| `:q` | 에디터 종료 |
> 💡 **설치 구성 팁:** Helix 에디터는 실행 바이너리(`hx` / `hx.exe`)뿐만 아니라 언어별 구문 및 테마 파일이 모인 `runtime` 디렉토리가 올바른 경로에 배포되어야 합니다. 당사 배포 스크립트는 macOS/Linux의 경우 `~/.config/helix/runtime`, Windows의 경우 `%APPDATA%\helix\runtime`으로 런타임 폴더를 자동 탐색하여 백업 및 배치합니다.
#### 1.3. superfile
수려하고 미려한 디자인을 선사하는 고기능 터미널 파일 관리자입니다.
* **듀얼 패널** — 대칭형 레이아웃으로 직관적인 디렉토리 간 파일 조작
@@ -283,7 +328,7 @@ spf # 실행 명령어 (superfile이 아닌 spf를 사용합니다)
> 💡 **중요:** 터미널 아이콘이 박스나 물음표 기호처럼 깨져 보일 경우, 사용하시는 터미널 폰트를 **Nerd Font** 계열로 설정해 주세요.
> 💡 **macOS iTerm2 한글 깨짐 팁:** 설정(`Settings` > `Profile` > `Text` > `Normalization`)에서 **NFC** 옵션으로 설정을 전환하시면 정상 표기됩니다.
#### 1.3. dua
#### 1.4. dua
SSD와 시스템 성능을 최대로 활용하여 유실된 용량을 추적하는 병렬 스캔 방식의 초고속 디스크 분석 유틸리티입니다.
* **초고속 스캔** — 대용량 디스크도 수 초 만에 고속으로 스캔 처리
+213
View File
@@ -0,0 +1,213 @@
#Requires -Version 5.1
<#
.SYNOPSIS
Installs Helix Editor (TUI text editor) and its runtime directory on Windows.
.DESCRIPTION
Auto-detects the latest release from https://github.com/helix-editor/helix/releases,
downloads the x86_64-windows.zip archive, extracts it, installs hx.exe
to your local bin directory, and deploys the essential runtime files
to %APPDATA%\helix\runtime.
Supported architectures:
- Windows x64 (AMD64 / Intel 64bit)
.PARAMETER InstallDir
Directory to install hx.exe. Default: $env:USERPROFILE\.local\bin
.PARAMETER AddToPath
Whether to permanently add InstallDir to user PATH. Default: $true
.EXAMPLE
.\install-helix.ps1
# One-liner install from remote (works on Windows 10+):
powershell -ExecutionPolicy Bypass -c "[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12; $t=\"$env:TEMP\install-helix.ps1\"; iwr -useb 'https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-helix.ps1' -OutFile $t; & $t"
.NOTES
If execution policy error occurs:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
#>
[CmdletBinding()]
param(
[string] $InstallDir = "$env:USERPROFILE\.local\bin",
[bool] $AddToPath = $true
)
# 최신 윈도우 환경 및 에러 발생 시 즉시 중단 설정
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
# HTTPS 다운로드를 위한 TLS 1.2 강제 (Windows 7/10 및 PowerShell 5.1 호환성 보장)
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
# ────────────────────────────────────────────
# 유틸리티 함수 정의 (모든 안내 문구는 영문으로 작성)
# ────────────────────────────────────────────
function Write-Info { param([string]$msg) Write-Host "[INFO] $msg" -ForegroundColor Cyan }
# 정보 출력
function Write-Warn { param([string]$msg) Write-Host "[WARN] $msg" -ForegroundColor Yellow }
# 경고 출력
function Write-Success { param([string]$msg) Write-Host "[OK] $msg" -ForegroundColor Green }
# 성공 출력
function Write-Err { param([string]$msg) Write-Host "[ERROR] $msg" -ForegroundColor Red; exit 1 }
# 에러 출력 및 스크립트 강제 종료
# ────────────────────────────────────────────
# 상수 정의
# ────────────────────────────────────────────
$REPO = "helix-editor/helix"
$API_URL = "https://api.github.com/repos/$REPO/releases/latest"
$HELIX_CONFIG_DIR = Join-Path $env:APPDATA "helix"
# ────────────────────────────────────────────
# 메인 설치 프로세스
# ────────────────────────────────────────────
function Main {
Write-Info "===== Helix Editor install script (Windows PowerShell) ====="
# 1) 운영체제 아키텍처 감지 (Helix는 현재 64비트 Windows 빌드만 공식 배포)
$envArch = $env:PROCESSOR_ARCHITEW6432
if (-not $envArch) { $envArch = $env:PROCESSOR_ARCHITECTURE }
if ($envArch -ne "AMD64" -and $envArch -ne "ARM64") {
Write-Err "Helix editor only provides 64-bit Windows builds. Detected architecture: $envArch"
}
# 2) GitHub 최신 릴리스 정보 획득
Write-Info "Fetching latest Helix release information from GitHub API..."
try {
$release = Invoke-RestMethod -Uri $API_URL -UseBasicParsing -Headers @{ 'User-Agent' = 'install-helix-ps1' }
} catch {
Write-Err "GitHub API call failed: $_"
}
$tagName = $release.tag_name
$version = $tagName -replace '^v', ''
Write-Info "Latest Helix version confirmed: $tagName"
# 3) 윈도우 x86_64용 zip 파일 에셋 탐색
$asset = $release.assets | Where-Object { $_.name -like "*-x86_64-windows.zip" } | Select-Object -First 1
if (-not $asset) {
# 에셋 조회가 되지 않을 경우 릴리스 패턴에 맞추어 다운로드 URL 직접 빌드
$zipName = "helix-${version}-x86_64-windows.zip"
$downloadUrl = "https://github.com/$REPO/releases/download/$tagName/$zipName"
Write-Warn "Could not find asset in GitHub response. Trying fallback URL: $downloadUrl"
} else {
$zipName = $asset.name
$downloadUrl = $asset.browser_download_url
}
# 4) 임시 작업 디렉토리 생성 및 아카이브 다운로드
$tmpDir = Join-Path $env:TEMP "helix_install_$(Get-Random)"
New-Item -ItemType Directory -Path $tmpDir -Force | Out-Null
$tmpZipPath = Join-Path $tmpDir $zipName
try {
Write-Info "Downloading archive: $downloadUrl"
$ProgressPreference = 'SilentlyContinue' # 다운로드 속도 향상을 위해 진행바 숨김
Invoke-WebRequest -Uri $downloadUrl -OutFile $tmpZipPath -UseBasicParsing
$ProgressPreference = 'Continue'
# 5) 압축 해제
Write-Info "Extracting archive..."
Expand-Archive -Path $tmpZipPath -DestinationPath $tmpDir -Force
# 압축 해제 폴더 탐색 (helix-vXX.XX.X-x86_64-windows 구조)
$extractedFolder = Get-ChildItem -Path $tmpDir -Directory | Where-Object { $_.Name -like "helix-*" } | Select-Object -First 1
if (-not $extractedFolder) {
Write-Err "Failed to find extracted Helix directory in temporary path."
}
# 6) 바이너리 복사 (hx.exe)
$hxExe = Join-Path $extractedFolder.FullName "hx.exe"
if (-not (Test-Path $hxExe)) {
Write-Err "hx.exe not found in the extracted folder: $($extractedFolder.FullName)"
}
if (-not (Test-Path $InstallDir)) {
Write-Info "Creating installation directory: $InstallDir"
New-Item -ItemType Directory -Path $InstallDir -Force | Out-Null
}
$destExePath = Join-Path $InstallDir "hx.exe"
Write-Info "Deploying binary to: $destExePath"
Copy-Item -Path $hxExe -Destination $destExePath -Force
# 7) 런타임(runtime) 디렉토리 설치
# Helix 에디터는 테마, 언어 쿼리 등을 로드하기 위해 runtime 디렉토리가 필수적으로 요구됩니다.
# Windows의 경우 %APPDATA%\helix\runtime에 런타임 폴더가 복사되어야 합니다.
$srcRuntime = Join-Path $extractedFolder.FullName "runtime"
if (-not (Test-Path $srcRuntime)) {
Write-Err "Runtime directory not found in the extracted folder."
}
$destRuntime = Join-Path $HELIX_CONFIG_DIR "runtime"
if (Test-Path $destRuntime) {
Write-Warn "Existing Helix runtime directory detected: $destRuntime"
$backupRuntime = "${destRuntime}.bak.$(Get-Date -Format 'yyyyMMddHHmmss')"
Write-Info "Backing up existing runtime to: $backupRuntime"
# 동일한 드라이브 내 Rename을 수행하기 위해 새 폴더명(이름만)을 제공합니다.
Rename-Item -Path $destRuntime -NewName (Split-Path $backupRuntime -Leaf) -Force
}
if (-not (Test-Path $HELIX_CONFIG_DIR)) {
New-Item -ItemType Directory -Path $HELIX_CONFIG_DIR -Force | Out-Null
}
Write-Info "Deploying runtime directory to: $destRuntime"
Copy-Item -Path $srcRuntime -Destination $destRuntime -Recurse -Force
} finally {
# 임시 다운로드 파일 및 압축 해제 디렉토리 정리
if (Test-Path $tmpDir) {
Remove-Item -Path $tmpDir -Recurse -Force -ErrorAction SilentlyContinue | Out-Null
}
}
# 8) PATH 환경 변수 영구 등록
if ($AddToPath) {
# 현재 세션 PATH 반영
if ($env:Path -notlike "*$InstallDir*") {
$env:Path = "$InstallDir;$env:Path"
Write-Info "Temporarily added $InstallDir to current session PATH."
}
# 사용자 환경 변수 PATH 반영
$userPath = [System.Environment]::GetEnvironmentVariable('Path', 'User')
if ($userPath -notlike "*$InstallDir*") {
[System.Environment]::SetEnvironmentVariable('Path', "$InstallDir;$userPath", 'User')
Write-Success "Permanently added $InstallDir to User PATH."
Write-Warn "Please restart your terminal window to apply the updated PATH environment variable."
} else {
Write-Info "$InstallDir is already registered in User PATH."
}
}
# 9) 최종 설치 완료 확인 및 검증
if (Test-Path $destExePath) {
Write-Host ""
Write-Host "==================================================" -ForegroundColor Green
Write-Success "Helix Editor ($tagName) installation completed successfully!"
Write-Host "==================================================" -ForegroundColor Green
Write-Info "Run command: hx"
Write-Info "Config directory: $HELIX_CONFIG_DIR"
Write-Info "Runtime directory: $destRuntime"
Write-Host ""
Write-Info "Quick Vim-like shortcuts inside Helix:"
Write-Info " :q - Quit"
Write-Info " :w - Save"
Write-Info " i - Enter Insert mode"
Write-Info " Esc - Back to Normal mode"
Write-Info " hx --health - Check Helix system health"
} else {
Write-Err "Installation failed. hx.exe could not be verified at: $destExePath"
}
}
# 예기치 못한 전체 프로세스 에러 감지를 위한 Trap 설정
trap {
Write-Err "An unexpected error occurred during installation: $_"
}
Main
+179
View File
@@ -0,0 +1,179 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086
# GitHub Releases에서 최신 Helix 에디터 TUI를 다운로드하고 필수 런타임을 설치합니다.
# Helix: https://github.com/helix-editor/helix
#
# 지원 플랫폼:
# macOS : Apple Silicon (arm64), Intel (x86_64)
# Linux : x86_64, aarch64(arm64)
set -euo pipefail
# ────────────────────────────────────────────
# 상수 정의
# ────────────────────────────────────────────
REPO="helix-editor/helix"
API_URL="https://api.github.com/repos/${REPO}/releases/latest"
INSTALL_DIR="${HOME}/.local/bin"
HELIX_CONFIG_DIR="${HOME}/.config/helix"
# ────────────────────────────────────────────
# 유틸리티 함수 (모두 stderr 출력)
# ────────────────────────────────────────────
info() { echo "[INFO] $*" >&2; }
warn() { echo "[WARN] $*" >&2; }
error() { echo "[ERROR] $*" >&2; exit 1; }
success() { echo "[OK] $*" >&2; }
# ────────────────────────────────────────────
# 필수 명령어 확인
# ────────────────────────────────────────────
for cmd in curl tar xz uname; do
command -v "$cmd" &>/dev/null || error "'$cmd' 명령어가 필요합니다. 먼저 설치해 주세요."
done
# Fallback: jq가 없을 경우 python3를 사용해 JSON 분석
if command -v jq &>/dev/null; then
_json_latest_tag() {
jq -r '.tag_name'
}
else
command -v python3 &>/dev/null || error "'jq' 또는 'python3' 명령어가 설치되어 있어야 합니다."
_json_latest_tag() {
python3 -c "
import sys, json
data = json.load(sys.stdin)
print(data.get('tag_name', ''))
"
}
fi
# ────────────────────────────────────────────
# OS 및 아키텍처 분석
# ────────────────────────────────────────────
# 반환 형식: "아카이브아키텍처명"
detect_platform() {
local os arch
os="$(uname -s)"
arch="$(uname -m)"
case "$os" in
# ── macOS ──────────────────────────────────────────────
Darwin)
case "$arch" in
arm64) echo "aarch64-macos" ;;
x86_64) echo "x86_64-macos" ;;
*) error "지원하지 않는 macOS 아키텍처입니다: $arch" ;;
esac
;;
# ── Linux ──────────────────────────────────────────────
Linux)
case "$arch" in
x86_64|amd64)
echo "x86_64-linux" ;;
aarch64|arm64)
echo "aarch64-linux" ;;
*)
error "지원하지 않는 Linux 아키텍처입니다: $arch" ;;
esac
;;
*)
error "지원하지 않는 운영체제입니다: $os (uname -a: $(uname -a))"
;;
esac
}
# ────────────────────────────────────────────
# 최신 릴리스 태그 가져오기
# ────────────────────────────────────────────
get_latest_release_tag() {
info "GitHub API를 통해 Helix 최신 릴리스 버전을 조회하는 중..."
local release_json tag
release_json="$(curl -fsSL "${API_URL}")" || error "GitHub API 호출에 실패했습니다."
tag="$(echo "$release_json" | _json_latest_tag)"
if [[ -z "$tag" || "$tag" == "null" ]]; then
error "최신 릴리스 태그를 확인하는 데 실패했습니다."
fi
echo "$tag"
}
# ────────────────────────────────────────────
# 메인 설치 로직
# ────────────────────────────────────────────
main() {
local platform_arch
platform_arch="$(detect_platform)"
local tag version
tag="$(get_latest_release_tag)"
version="${tag#v}" # v25.07.1 형태에서 v 접두사 제거
info "설치 환경 감지: $platform_arch ($tag 버전)"
local asset_name="helix-${version}-${platform_arch}"
local archive_name="${asset_name}.tar.xz"
local download_url="https://github.com/helix-editor/helix/releases/download/${tag}/${archive_name}"
# 임시 작업 디렉토리 생성
local tmp_dir
tmp_dir="$(mktemp -d)"
local tmp_archive="${tmp_dir}/${archive_name}"
info "아카이브 다운로드 중: $download_url"
if ! curl -fsSL "$download_url" -o "$tmp_archive"; then
rm -rf "$tmp_dir"
error "바이너리 다운로드에 실패했습니다. URL: $download_url"
fi
info "압축 해제 중..."
tar -xf "$tmp_archive" -C "$tmp_dir"
local extracted_folder="${tmp_dir}/${asset_name}"
if [ -d "${extracted_folder}-source" ]; then
# 간혹 폴더 이름 뒤에 -source가 붙는 예외 방어
extracted_folder="${extracted_folder}-source"
fi
# 1) 바이너리 설치
mkdir -p "$INSTALL_DIR"
local dest_binary="${INSTALL_DIR}/hx"
info "바이너리 배포 중: $dest_binary"
cp "${extracted_folder}/hx" "$dest_binary"
chmod +x "$dest_binary"
# 2) 런타임(runtime) 디렉토리 설치
# 테마, 구문 강조 트리 등을 로드하기 위해 Helix는 runtime 디렉토리가 필수적입니다.
local dest_runtime="${HELIX_CONFIG_DIR}/runtime"
if [ -d "$dest_runtime" ]; then
warn "기존 Helix 런타임 디렉토리가 감지되었습니다: $dest_runtime"
local backup_runtime="${dest_runtime}.bak.$(date +%Y%m%d%H%M%S)"
info "기존 런타임을 백업합니다: $backup_runtime"
mv "$dest_runtime" "$backup_runtime"
fi
mkdir -p "$HELIX_CONFIG_DIR"
info "런타임 디렉토리 배포 중: $dest_runtime"
cp -r "${extracted_folder}/runtime" "$dest_runtime"
# 임시 디렉토리 청소
rm -rf "$tmp_dir"
success "Helix 에디터 ($tag) 설치가 성공적으로 완료되었습니다!"
info "실행 명령어: hx"
info "런타임 경로: $dest_runtime"
# PATH 환경 변수 확인 및 안내
if [[ ":$PATH:" != *":$INSTALL_DIR:"* ]]; then
warn "설치 경로($INSTALL_DIR)가 현재 PATH 환경 변수에 등록되어 있지 않습니다."
warn "사용하시는 쉘 프로필 파일(예: ~/.bashrc 또는 ~/.zshrc)에 아래 설정을 추가해 주세요:"
warn " export PATH=\"\$HOME/.local/bin:\$PATH\""
fi
}
main "$@"