feat: rename Loki to Coyote

This commit is contained in:
2026-05-27 12:47:32 -06:00
parent c172736362
commit 0facb15e32
58 changed files with 506 additions and 3202 deletions
@@ -1,24 +1,24 @@
<#
loki installer (Windows/PowerShell 5+ and PowerShell 7)
coyote installer (Windows/PowerShell 5+ and PowerShell 7)
Examples:
powershell -NoProfile -ExecutionPolicy Bypass -Command "iwr -useb https://raw.githubusercontent.com/Dark-Alex-17/loki/main/scripts/install_loki.ps1 | iex"
pwsh -c "irm https://raw.githubusercontent.com/Dark-Alex-17/loki/main/scripts/install_loki.ps1 | iex -Version vX.Y.Z"
powershell -NoProfile -ExecutionPolicy Bypass -Command "iwr -useb https://raw.githubusercontent.com/Dark-Alex-17/coyote/main/scripts/install_coyote.ps1 | iex"
pwsh -c "irm https://raw.githubusercontent.com/Dark-Alex-17/coyote/main/scripts/install_coyote.ps1 | iex -Version vX.Y.Z"
Parameters:
-Version <tag> (default: latest)
-BinDir <path> (default: %LOCALAPPDATA%\loki\bin on Windows; ~/.local/bin on *nix PowerShell)
-BinDir <path> (default: %LOCALAPPDATA%\coyote\bin on Windows; ~/.local/bin on *nix PowerShell)
#>
[CmdletBinding()]
param(
[string]$Version = $env:LOKI_VERSION,
[string]$Version = $env:COYOTE_VERSION,
[string]$BinDir = $env:BIN_DIR
)
$Repo = 'Dark-Alex-17/loki'
$Repo = 'Dark-Alex-17/coyote'
function Write-Info($msg) { Write-Host "[loki-install] $msg" }
function Write-Info($msg) { Write-Host "[coyote-install] $msg" }
function Fail($msg) { Write-Error $msg; exit 1 }
Add-Type -AssemblyName System.Runtime
@@ -38,7 +38,7 @@ switch ([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture) {
}
if (-not $BinDir) {
if ($isWin) { $BinDir = Join-Path $env:LOCALAPPDATA 'loki\bin' }
if ($isWin) { $BinDir = Join-Path $env:LOCALAPPDATA 'coyote\bin' }
else { $home = $env:HOME; if (-not $home) { $home = (Get-Item -Path ~).FullName }; $BinDir = Join-Path $home '.local/bin' }
}
New-Item -ItemType Directory -Force -Path $BinDir | Out-Null
@@ -49,23 +49,23 @@ $apiBase = "https://api.github.com/repos/$Repo/releases"
$relUrl = if ($Version) { "$apiBase/tags/$Version" } else { "$apiBase/latest" }
Write-Info "Fetching release: $relUrl"
try {
$release = Invoke-RestMethod -UseBasicParsing -Headers @{ 'User-Agent' = 'loki-installer' } -Uri $relUrl -Method GET
$release = Invoke-RestMethod -UseBasicParsing -Headers @{ 'User-Agent' = 'coyote-installer' } -Uri $relUrl -Method GET
} catch { Fail "Failed to fetch release metadata. $_" }
if (-not $release.assets) { Fail "No assets found in the release." }
$candidates = @()
if ($os -eq 'windows') {
if ($arch -eq 'x86_64') { $candidates += 'loki-x86_64-pc-windows-msvc.zip' }
else { $candidates += 'loki-aarch64-pc-windows-msvc.zip' }
if ($arch -eq 'x86_64') { $candidates += 'coyote-x86_64-pc-windows-msvc.zip' }
else { $candidates += 'coyote-aarch64-pc-windows-msvc.zip' }
} elseif ($os -eq 'darwin') {
if ($arch -eq 'x86_64') { $candidates += 'loki-x86_64-apple-darwin.tar.gz' }
else { $candidates += 'loki-aarch64-apple-darwin.tar.gz' }
if ($arch -eq 'x86_64') { $candidates += 'coyote-x86_64-apple-darwin.tar.gz' }
else { $candidates += 'coyote-aarch64-apple-darwin.tar.gz' }
} elseif ($os -eq 'linux') {
if ($arch -eq 'x86_64') {
$candidates += 'loki-x86_64-unknown-linux-gnu.tar.gz'
$candidates += 'loki-x86_64-unknown-linux-musl.tar.gz'
$candidates += 'coyote-x86_64-unknown-linux-gnu.tar.gz'
$candidates += 'coyote-x86_64-unknown-linux-musl.tar.gz'
} else {
$candidates += 'loki-aarch64-unknown-linux-musl.tar.gz'
$candidates += 'coyote-aarch64-unknown-linux-musl.tar.gz'
}
} else {
Fail "Unsupported OS for this installer: $os"
@@ -84,9 +84,9 @@ if (-not $asset) {
Write-Info "Selected asset: $($asset.name)"
Write-Info "Download URL: $($asset.browser_download_url)"
$tmp = New-Item -ItemType Directory -Force -Path ([IO.Path]::Combine([IO.Path]::GetTempPath(), "loki-$(Get-Random)"))
$tmp = New-Item -ItemType Directory -Force -Path ([IO.Path]::Combine([IO.Path]::GetTempPath(), "coyote-$(Get-Random)"))
$archive = Join-Path $tmp.FullName 'asset'
try { Invoke-WebRequest -UseBasicParsing -Headers @{ 'User-Agent' = 'loki-installer' } -Uri $asset.browser_download_url -OutFile $archive } catch { Fail "Failed to download asset. $_" }
try { Invoke-WebRequest -UseBasicParsing -Headers @{ 'User-Agent' = 'coyote-installer' } -Uri $asset.browser_download_url -OutFile $archive } catch { Fail "Failed to download asset. $_" }
$extractDir = Join-Path $tmp.FullName 'extract'; New-Item -ItemType Directory -Force -Path $extractDir | Out-Null
@@ -107,14 +107,14 @@ if ($asset.name -match '\.zip$') {
$bin = $null
Get-ChildItem -Recurse -File $extractDir | ForEach-Object {
if ($isWin) { if ($_.Name -ieq 'loki.exe') { $bin = $_.FullName } }
else { if ($_.Name -ieq 'loki') { $bin = $_.FullName } }
if ($isWin) { if ($_.Name -ieq 'coyote.exe') { $bin = $_.FullName } }
else { if ($_.Name -ieq 'coyote') { $bin = $_.FullName } }
}
if (-not $bin) { Fail "Could not find loki binary inside the archive." }
if (-not $bin) { Fail "Could not find coyote binary inside the archive." }
if (-not $isWin) { try { & chmod +x -- $bin } catch {} }
$exec = if ($isWin) { 'loki.exe'} else { 'loki' }
$exec = if ($isWin) { 'coyote.exe'} else { 'coyote' }
$dest = Join-Path $BinDir $exec
Copy-Item -Force $bin $dest
Write-Info "Installed: $dest"
@@ -135,5 +135,5 @@ if ($isWin) {
}
}
Write-Info "Done. Try: loki --help"
Write-Info "Done. Try: coyote --help"
@@ -1,23 +1,23 @@
#!/usr/bin/env bash
set -euo pipefail
# loki installer (Linux/macOS)
# coyote installer (Linux/macOS)
#
# Usage examples:
# curl -fsSL https://raw.githubusercontent.com/Dark-Alex-17/loki/main/scripts/install_loki.sh | bash
# curl -fsSL https://raw.githubusercontent.com/Dark-Alex-17/loki/main/scripts/install_loki.sh | bash -s -- --version vX.Y.Z
# BIN_DIR="$HOME/.local/bin" bash scripts/install_loki.sh
# curl -fsSL https://raw.githubusercontent.com/Dark-Alex-17/coyote/main/scripts/install_coyote.sh | bash
# curl -fsSL https://raw.githubusercontent.com/Dark-Alex-17/coyote/main/scripts/install_coyote.sh | bash -s -- --version vX.Y.Z
# BIN_DIR="$HOME/.local/bin" bash scripts/install_coyote.sh
#
# Flags / Env:
# --version <tag> Release tag (default: latest). Or set LOKI_VERSION.
# --version <tag> Release tag (default: latest). Or set COYOTE_VERSION.
# --bin-dir <dir> Install directory (default: /usr/local/bin or ~/.local/bin). Or set BIN_DIR.
REPO="Dark-Alex-17/loki"
VERSION="${LOKI_VERSION:-}"
REPO="Dark-Alex-17/coyote"
VERSION="${COYOTE_VERSION:-}"
BIN_DIR="${BIN_DIR:-}"
usage() {
echo "loki installer (Linux/macOS)"
echo "coyote installer (Linux/macOS)"
echo
echo "Options:"
echo " --version <tag> Release tag (default: latest)"
@@ -44,7 +44,7 @@ fi
mkdir -p "${BIN_DIR}"
log() {
echo "[loki-install] $*"
echo "[coyote-install] $*"
}
need_cmd() {
@@ -92,9 +92,9 @@ fi
http_get() {
if [[ "$DL" == "curl" ]]; then
curl -fsSL -H 'User-Agent: loki-installer' "$1"
curl -fsSL -H 'User-Agent: coyote-installer' "$1"
else
wget -qO- --header='User-Agent: loki-installer' "$1"
wget -qO- --header='User-Agent: coyote-installer' "$1"
fi
}
@@ -111,9 +111,9 @@ fi
ASSET_CANDIDATES=()
if [[ "$OS" == "darwin" ]]; then
if [[ "$ARCH" == "x86_64" ]]; then
ASSET_CANDIDATES+=("loki-x86_64-apple-darwin.tar.gz")
ASSET_CANDIDATES+=("coyote-x86_64-apple-darwin.tar.gz")
else
ASSET_CANDIDATES+=("loki-aarch64-apple-darwin.tar.gz")
ASSET_CANDIDATES+=("coyote-aarch64-apple-darwin.tar.gz")
fi
elif [[ "$OS" == "linux" ]]; then
if [[ "$ARCH" == "x86_64" ]]; then
@@ -122,12 +122,12 @@ elif [[ "$OS" == "linux" ]]; then
if ldd --version 2>&1 | grep -qi glibc; then LIBC="gnu"; fi
if [[ "$LIBC" == "gnu" ]]; then
ASSET_CANDIDATES+=("loki-x86_64-unknown-linux-gnu.tar.gz")
ASSET_CANDIDATES+=("coyote-x86_64-unknown-linux-gnu.tar.gz")
fi
ASSET_CANDIDATES+=("loki-x86_64-unknown-linux-musl.tar.gz")
ASSET_CANDIDATES+=("coyote-x86_64-unknown-linux-musl.tar.gz")
else
ASSET_CANDIDATES+=("loki-aarch64-unknown-linux-musl.tar.gz")
ASSET_CANDIDATES+=("coyote-aarch64-unknown-linux-musl.tar.gz")
fi
else
echo "Error: unsupported OS for this installer: $OS" >&2; exit 1
@@ -170,9 +170,9 @@ log "Download URL: $ASSET_URL"
ARCHIVE="$TMPDIR/asset"
if [[ "$DL" == "curl" ]]; then
curl -fL -H 'User-Agent: loki-installer' "$ASSET_URL" -o "$ARCHIVE"
curl -fL -H 'User-Agent: coyote-installer' "$ASSET_URL" -o "$ARCHIVE"
else
wget -q --header='User-Agent: loki-installer' "$ASSET_URL" -O "$ARCHIVE"
wget -q --header='User-Agent: coyote-installer' "$ASSET_URL" -O "$ARCHIVE"
fi
WORK="$TMPDIR/work"; mkdir -p "$WORK"
@@ -192,21 +192,21 @@ fi
BIN_PATH=""
while IFS= read -r -d '' f; do
base=$(basename "$f")
if [[ "$base" == "loki" ]]; then
if [[ "$base" == "coyote" ]]; then
BIN_PATH="$f"
break
fi
done < <(find "$EXTRACTED_DIR" -type f -print0)
if [[ -z "$BIN_PATH" ]]; then
echo "Error: could not find 'loki' binary in the archive" >&2
echo "Error: could not find 'coyote' binary in the archive" >&2
exit 1
fi
chmod +x "$BIN_PATH"
install -m 0755 "$BIN_PATH" "${BIN_DIR}/loki"
install -m 0755 "$BIN_PATH" "${BIN_DIR}/coyote"
log "Installed: ${BIN_DIR}/loki"
log "Installed: ${BIN_DIR}/coyote"
case ":$PATH:" in
*":${BIN_DIR}:"*) ;;
@@ -216,5 +216,5 @@ case ":$PATH:" in
;;
esac
log "Done. Try: loki --help"
log "Done. Try: coyote --help"
+3 -3
View File
@@ -1,7 +1,7 @@
_loki_bash() {
_coyote_bash() {
if [[ -n "$READLINE_LINE" ]]; then
READLINE_LINE=$(loki -e "$READLINE_LINE")
READLINE_LINE=$(coyote -e "$READLINE_LINE")
READLINE_POINT=${#READLINE_LINE}
fi
}
bind -x '"\ee": _loki_bash'
bind -x '"\ee": _coyote_bash'
+3 -3
View File
@@ -1,7 +1,7 @@
fn _loki_elvish {
fn _coyote_elvish {
var line = (edit:current-command)
var new-line = (loki -e $line)
var new-line = (coyote -e $line)
edit:replace-input $new-line
}
edit:insert:binding[Alt-e] = $_loki_elvish
edit:insert:binding[Alt-e] = $_coyote_elvish
+3 -3
View File
@@ -1,9 +1,9 @@
function _loki_fish
function _coyote_fish
set -l _old (commandline)
if test -n $_old
echo -n "⌛"
commandline -f repaint
commandline (loki -e $_old)
commandline (coyote -e $_old)
end
end
bind \ee _loki_fish
bind \ee _coyote_fish
+4 -4
View File
@@ -1,20 +1,20 @@
def _loki_nushell [] {
def _coyote_nushell [] {
let _prev = (commandline)
if ($_prev != "") {
print '⌛'
commandline edit -r (loki -e $_prev)
commandline edit -r (coyote -e $_prev)
}
}
$env.config.keybindings = ($env.config.keybindings | append {
name: loki_integration
name: coyote_integration
modifier: alt
keycode: char_e
mode: [emacs, vi_insert]
event:[
{
send: executehostcommand,
cmd: "_loki_nushell"
cmd: "_coyote_nushell"
}
]
}
+1 -1
View File
@@ -3,7 +3,7 @@ Set-PSReadLineKeyHandler -Chord "alt+e" -ScriptBlock {
[Microsoft.PowerShell.PSConsoleReadline]::GetBufferState([ref]$_old, [ref]$null)
if ($_old) {
[Microsoft.PowerShell.PSConsoleReadLine]::Insert('⌛')
$_new = (loki -e $_old)
$_new = (coyote -e $_old)
[Microsoft.PowerShell.PSConsoleReadLine]::DeleteLine()
[Microsoft.PowerShell.PSConsoleReadline]::Insert($_new)
}
+4 -4
View File
@@ -1,11 +1,11 @@
_loki_zsh() {
_coyote_zsh() {
if [[ -n "$BUFFER" ]]; then
local _old=$BUFFER
BUFFER+="⌛"
zle -I && zle redisplay
BUFFER=$(loki -e "$_old")
BUFFER=$(coyote -e "$_old")
zle end-of-line
fi
}
zle -N _loki_zsh
bindkey '\ee' _loki_zsh
zle -N _coyote_zsh
bindkey '\ee' _coyote_zsh