Initial opencode‑tinfoil nono profile repository

This commit is contained in:
2026-08-12 18:26:06 +01:00
commit cd26906105
7 changed files with 320 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
#!/usr/bin/env bash
set -euo pipefail
PROFILE_NAME="opencode-tinfoil"
PROFILE_SRC="profiles/${PROFILE_NAME}.jsonc"
PROFILE_DIR="${HOME}/.config/nono/profiles"
BIN_DIR="${HOME}/.local/bin"
WRAPPER_SRC="bin/opencode"
if ! command -v nono &>/dev/null; then
echo "Error: nono is not installed. Install it first:"
echo " brew install nono"
exit 1
fi
if [[ ! -f "${PROFILE_SRC}" ]]; then
echo "Error: profile not found at ${PROFILE_SRC}"
exit 1
fi
mkdir -p "${PROFILE_DIR}"
mkdir -p "${BIN_DIR}"
cp "${PROFILE_SRC}" "${PROFILE_DIR}/${PROFILE_NAME}.json"
chmod 644 "${PROFILE_DIR}/${PROFILE_NAME}.json"
cp "${WRAPPER_SRC}" "${BIN_DIR}/opencode"
chmod 755 "${BIN_DIR}/opencode"
nono profile validate "${PROFILE_NAME}"
echo "Installed:"
echo " Profile: ${PROFILE_DIR}/${PROFILE_NAME}.json"
echo " Wrapper: ${BIN_DIR}/opencode"
if [[ ":${PATH}:" != *":${BIN_DIR}:"* ]]; then
echo ""
echo "Warning: ${BIN_DIR} is not in your PATH."
echo "Add this to your shell profile:"
echo " export PATH=\"${BIN_DIR}:\${PATH}\""
fi