diff --git a/AGENTS.md b/AGENTS.md index 8aacdfd..babb19b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -37,6 +37,6 @@ rendering, and CLI dispatch separate. ## Public/private boundary Public files may contain documentation-only values such as `192.0.2.10` and -generic example names. Site inventory belongs in the private `home-ops` repo. -Secrets may live in the private `home-ops` configuration deployed mode `0600`, +generic example names. Site inventory belongs in the private `home-config` repo. +Secrets may live in the private `home-config` configuration deployed mode `0600`, but never in this public repository, logs, issues, or command output. diff --git a/README.md b/README.md index 16d06b1..c8f0b85 100644 --- a/README.md +++ b/README.md @@ -29,14 +29,14 @@ Python 3.11 or newer is required by the current implementation. ## Install ```bash -cd /path/to/private/home-ops +cd /path/to/private/home-config ./bin/bootstrap-ctls switchctl ``` -The private `home-ops` bootstrap is the canonical installer: it populates the +The private `home-config` bootstrap is the canonical installer: it populates the real switch inventory, calls this repository's stable `script/install` contract, and creates `/usr/local/bin/switchctl` backed by an isolated system -environment under `/usr/local/lib/home-ops/ctls`. +environment under `/usr/local/lib/home-config/ctls`. ## Configure private switches @@ -62,7 +62,7 @@ Store each Tuya local key directly in the private mode-`0600` configuration: ``` The public repository and command output must never contain or print real keys. -The private `home-ops` repository is the deployment source of truth and its +The private `home-config` repository is the deployment source of truth and its bootstrap installs the complete configuration without runtime environment variables. diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 47a6cc9..86adf8e 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -3,13 +3,13 @@ ## Config is not found Create `/usr/local/config/switchctl/config.json` from the public example, install the -private home-ops inventory, or set `SWITCHCTL_CONFIG`. Repository-local runtime +private home-config inventory, or set `SWITCHCTL_CONFIG`. Repository-local runtime configuration is intentionally unsupported. ## A local key is missing Add the target's `local_key` to the private source configuration, run the -`home-ops` bootstrap, and confirm `/usr/local/config/switchctl/config.json` is +`home-config` bootstrap, and confirm `/usr/local/config/switchctl/config.json` is owned by the operating user with mode `0600`. Never paste the key into logs. ## A device is unreachable diff --git a/runbooks/tuya-local-setup.md b/runbooks/tuya-local-setup.md index 40710cd..71e4a34 100644 --- a/runbooks/tuya-local-setup.md +++ b/runbooks/tuya-local-setup.md @@ -12,8 +12,9 @@ current instructions before creating cloud resources. - protocol version; and - switch datapoint, commonly but not universally `1`. -Names, addresses, identifiers, and room metadata belong in the private -`home-ops` inventory. Local and cloud keys do not belong in Git at all. +Names, addresses, identifiers, room metadata, and local keys belong in the +private `home-config` inventory. Cloud-extraction credentials and generated +vendor snapshots do not belong in Git. ## 1. Pair a test device @@ -38,7 +39,7 @@ Save TinyTuya cloud extraction credentials only in: ``` Use the format expected by the installed `tinytuya` release and set mode `0600`. -Do not put this file in `home-ops` or any other Git repository. +Do not put this extraction file in `home-config` or any other Git repository. ## 4. Discover and extract @@ -59,7 +60,7 @@ rather than copying an environment-specific script into public documentation. ## 5. Record private inventory -Add the endpoint to private `home-ops` switch configuration with its meaningful +Add the endpoint to private `home-config` switch configuration with its meaningful local name, role, room, host, device ID, local key, protocol version, and datapoint: diff --git a/script/install b/script/install index c3e9af5..5cbe284 100755 --- a/script/install +++ b/script/install @@ -4,7 +4,7 @@ set -eu repo_root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) name=switchctl install_prefix=${CTL_INSTALL_PREFIX:-/usr/local} -venv_root=${CTL_VENV_ROOT:-$install_prefix/lib/home-ops/ctls} +venv_root=${CTL_VENV_ROOT:-$install_prefix/lib/home-config/ctls} bin_dir=${CTL_BIN_DIR:-$install_prefix/bin} venv="$venv_root/$name" python=${PYTHON:-python3} @@ -14,7 +14,7 @@ if ! command -v "$python" >/dev/null 2>&1; then exit 1 fi -install -d -m 755 "$install_prefix/lib" "$install_prefix/lib/home-ops" "$venv_root" "$bin_dir" +install -d -m 755 "$install_prefix/lib" "$install_prefix/lib/home-config" "$venv_root" "$bin_dir" "$python" -m venv --clear "$venv" "$venv/bin/python" -m pip install --disable-pip-version-check "$repo_root" chmod -R a+rX "$venv"