mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 02:54:26 +00:00
Add the i8* terminal aliases (make install-alias) and ai8* agent conversation shortcuts (docs/.../agents/alias.md), move skill distribution to the external INFINITO_SKILLS_REPOSITORY (make install-skills), and add make cheat, make alias and make onboard. Introduce custom.env operator overrides (win over defaults and handlers) and pin INFINITO_ALIAS_MD / INFINITO_ALIAS_REPOSITORY / INFINITO_SKILLS_REPOSITORY in default.env. Drop the in-repo skills-lock.json and its update-skills CI job. AGENTS.md instructs agents to suggest the matching cli/prompt alias when an operator writes something an alias covers. Lints enforce alias sorting, i8/ai8 prefixes, no consonant clusters, full make-target coverage, and terminal/agent shortcut non-overlap. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
36 lines
1.4 KiB
Bash
Executable File
36 lines
1.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Install the general terminal aliases from INFINITO_ALIAS_REPOSITORY, then
|
|
# layer this project's Infinito.Nexus-specific aliases on top so both are
|
|
# sourced by the shell.
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
REPO_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
|
|
SHELL_CONFIG_DIR="${HOME}/.config/shell"
|
|
ALIASES_TARGET="${SHELL_CONFIG_DIR}/aliases-infinito"
|
|
|
|
if [[ -z "${INFINITO_ALIAS_REPOSITORY:-}" ]]; then
|
|
# shellcheck source=/dev/null
|
|
source <(grep -hE '^INFINITO_ALIAS_REPOSITORY=' "${REPO_ROOT}/.env" 2>/dev/null)
|
|
fi
|
|
: "${INFINITO_ALIAS_REPOSITORY:?not set; run 'make dotenv' to generate .env}"
|
|
|
|
CLONE_DIR="$(mktemp -d /tmp/infinito-alias-install.XXXXXX)"
|
|
trap 'rm -rf "${CLONE_DIR}"' EXIT
|
|
|
|
echo ">>> Installing general terminal aliases from ${INFINITO_ALIAS_REPOSITORY}"
|
|
git clone --depth 1 "${INFINITO_ALIAS_REPOSITORY}" "${CLONE_DIR}"
|
|
make -C "${CLONE_DIR}" install
|
|
|
|
echo ">>> Installing Infinito.Nexus-specific aliases"
|
|
mkdir -p "${SHELL_CONFIG_DIR}"
|
|
cp "${REPO_ROOT}/aliases" "${ALIASES_TARGET}"
|
|
|
|
source_line='[ -f ~/.config/shell/aliases-infinito ] && . ~/.config/shell/aliases-infinito'
|
|
for rc in "${HOME}/.bashrc" "${HOME}/.zshrc"; do
|
|
touch "${rc}"
|
|
grep -qxF "${source_line}" "${rc}" || printf '%s\n' "${source_line}" >>"${rc}"
|
|
done
|
|
|
|
echo ">>> Aliases installed. Open a new shell or 'source ~/.bashrc' (or ~/.zshrc) to activate them."
|