Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 6 additions & 79 deletions 1bite
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Powerlevel10k is installed after Oh My Zsh; existing explicit themes are preserv
--battery Run battery diagnostics; supports --summary/--json/--tsv/--shell/--field.
--install-battery Install ~/.local/bin/1bite-battery; add --update to replace an unchanged managed copy.
--update Update managed tools and refresh desktop DMGs (install mode only).
--managed-desktop Automatically place desktop apps and configure Kiro hooks (explicit opt-in).
--managed-desktop Automatically place selected desktop apps (explicit opt-in).
--check-updates Report available versions and configuration drift; never upgrade.
--with-docker Include Docker Desktop (disabled by default; review its license terms).
--with-claude Include Claude Desktop and Claude Code CLI (disabled by default).
Expand Down Expand Up @@ -368,7 +368,6 @@ bundle_healthy() {
}

bundle_identifier() { /usr/libexec/PlistBuddy -c 'Print :CFBundleIdentifier' "$1/Contents/Info.plist" 2>/dev/null; }
bundle_version() { /usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' "$1/Contents/Info.plist" 2>/dev/null; }

input_method_path() {
local app=$1 identifier=$2 candidate
Expand All @@ -383,41 +382,8 @@ input_method_path() {

input_method_healthy() { input_method_path "$1" "$2" >/dev/null; }

kiro_bundle_healthy() {
local path=$1 version
bundle_healthy "$path" || return 1
[[ $(bundle_identifier "$path") == dev.kiro.desktop ]] || return 1
version=$(bundle_version "$path") || return 1
[[ "$version" =~ ^[1-9][0-9]*\. ]] || return 1
}

kiro_cli_bundle_healthy() {
local directory=$1 executable
bundle_healthy "$directory" || return 1
[[ $(bundle_identifier "$directory") == com.amazon.codewhisperer ]] || return 1
for executable in kiro-cli kiro-cli-chat kiro-cli-term; do
"$directory/Contents/MacOS/$executable" --version >/dev/null 2>&1 || return 1
done
}

app_path() {
local app=$1 candidate
if [[ "$app" == Kiro.app ]]; then
for candidate in /Applications/Kiro.app "$HOME/Applications/Kiro.app"; do
if kiro_bundle_healthy "$candidate"; then
printf '%s\n' "$candidate"
return
fi
done
fi
if [[ "$app" == 'Kiro CLI.app' ]]; then
for candidate in '/Applications/Kiro CLI.app' "$HOME/Applications/Kiro CLI.app"; do
if kiro_cli_bundle_healthy "$candidate"; then
printf '%s\n' "$candidate"
return
fi
done
fi
if [[ "$app" == Claude.app ]]; then
for candidate in /Applications/Claude.app "$HOME/Applications/Claude.app"; do
if bundle_healthy "$candidate" && [[ $(bundle_identifier "$candidate") == com.anthropic.claudefordesktop ]]; then
Expand All @@ -433,7 +399,7 @@ app_path() {
return
fi
done
elif [[ "$app" == 'Google Chrome.app' || "$app" == 'Visual Studio Code.app' || "$app" == 'Obsidian.app' || "$app" == Kiro.app || "$app" == 'Kiro CLI.app' ]] && ! bundle_healthy "/Applications/$app" && bundle_healthy "$HOME/Applications/$app"; then
elif [[ "$app" == 'Google Chrome.app' || "$app" == 'Visual Studio Code.app' || "$app" == 'Obsidian.app' ]] && ! bundle_healthy "/Applications/$app" && bundle_healthy "$HOME/Applications/$app"; then
printf '%s\n' "$HOME/Applications/$app"
return
fi
Expand All @@ -449,12 +415,6 @@ app_healthy() {
if [[ "$app" == Claude.app ]]; then
[[ $(bundle_identifier "$(app_path "$app")") == com.anthropic.claudefordesktop ]] || return 1
fi
if [[ "$app" == Kiro.app ]]; then
kiro_bundle_healthy "$(app_path "$app")" || return 1
fi
if [[ "$app" == 'Kiro CLI.app' ]]; then
kiro_cli_bundle_healthy "$(app_path "$app")" || return 1
fi
if [[ "$app" == Docker.app ]]; then
/Applications/Docker.app/Contents/Resources/bin/docker --version >/dev/null 2>&1 || return 1
/Applications/Docker.app/Contents/Resources/cli-plugins/docker-compose version >/dev/null 2>&1 || return 1
Expand All @@ -463,7 +423,7 @@ app_healthy() {
}

manual_desktop() {
case "$1" in docker-desktop | google-chrome | chatgpt | kiro | claude-desktop) return 0 ;; esac
case "$1" in docker-desktop | google-chrome | chatgpt | claude-desktop) return 0 ;; esac
return 1
}

Expand All @@ -481,36 +441,15 @@ prepare_desktop() {
MANUAL_STEPS="$MANUAL_STEPS $package"
}

ensure_vendor_kiro() {
local installer
if app_healthy 'Kiro CLI.app'; then
echo 'Preserving Kiro CLI; its official app/CLI handles updates and onboarding.'
STEP_ACTION=preserved
return
fi
# Keep the vendor's own replacement prompts, launch and integration behavior.
installer=$(mktemp)
download_installer kiro-cli "$installer"
run_package_installer /bin/bash "$installer"
rm -f "$installer"
hash -r
app_healthy 'Kiro CLI.app' || fail 'Kiro official installer did not produce a runnable application.'
STEP_ACTION=installed
}

ensure_cask() {
local package=$1 app=$2
if [[ "$DESKTOP_MODE" == download ]] && manual_desktop "$package"; then
prepare_desktop "$package" "$app"
return
fi
if [[ "$package" == kiro-cli && "$DESKTOP_MODE" == download ]]; then
ensure_vendor_kiro
return
fi
# Resolve AI installations directly from their official vendor sources.
case "$package" in
chatgpt | kiro | kiro-cli | claude-desktop)
chatgpt | claude-desktop)
ensure_official_app "$package" "$app"
return
;;
Expand Down Expand Up @@ -603,17 +542,6 @@ check_agent() {
agent_healthy "$name" || fail "Official installation did not produce a runnable $name."
}

ensure_kiro_shell() {
if [[ "$DESKTOP_MODE" == download ]]; then
echo 'Kiro shell integration is handled by its official app. Complete onboarding there.'
STEP_ACTION=preserved
if ! agent_healthy kiro-cli; then MANUAL_STEPS="$MANUAL_STEPS kiro-cli-onboarding"; fi
return
fi
STEP_ACTION=$(python3 "$ROOT/scripts/kiro-shell.py" --app "$(app_path 'Kiro CLI.app')")
echo 'Kiro Zsh hooks ready. First launch and system permissions remain manual; see README.'
}

apply_configuration() { python3 "$ROOT/scripts/configure.py" --config-dir "$CONFIG_DIR"; }
verify_installation() {
export DESKTOP_MODE
Expand Down Expand Up @@ -671,7 +599,7 @@ execute_mode() {
step_run verification verify_installation
;;
install)
STEP_TOTAL=$((12 + $(awk 'NF { n++ } END { print n+0 }' "$ROOT/config/formulae.txt") + $(awk 'NF { n++ } END { print n+0 }' "$ROOT/config/casks.tsv") + $(awk 'NF { n++ } END { print n+0 }' "$ROOT/config/font-casks.tsv") + $(awk 'NF { n++ } END { print n+0 }' "$ROOT/config/vscode-extensions.txt")))
STEP_TOTAL=$((11 + $(awk 'NF { n++ } END { print n+0 }' "$ROOT/config/formulae.txt") + $(awk 'NF { n++ } END { print n+0 }' "$ROOT/config/casks.tsv") + $(awk 'NF { n++ } END { print n+0 }' "$ROOT/config/font-casks.tsv") + $(awk 'NF { n++ } END { print n+0 }' "$ROOT/config/vscode-extensions.txt")))
if [[ "$WITH_DOCKER" != true ]]; then STEP_TOTAL=$((STEP_TOTAL - 1)); fi
if [[ "$WITH_CLAUDE" != true ]]; then STEP_TOTAL=$((STEP_TOTAL - 2)); fi
if [[ "$WITH_SOGOU" == true ]]; then STEP_TOTAL=$((STEP_TOTAL + 1)); fi
Expand All @@ -690,7 +618,6 @@ execute_mode() {
step_run configuration apply_configuration
step_run ohmyzsh ensure_ohmyzsh
step_run powerlevel10k ensure_powerlevel10k
step_run kiro-shell ensure_kiro_shell
install_extensions
if [[ "$WITH_CLAUDE" == true ]]; then step_run claude check_agent claude; fi
step_run codex check_agent codex
Expand Down Expand Up @@ -772,7 +699,7 @@ main() {
echo "Final step: prepare the official Doubao Input Method ZIP in $HOME/Downloads/1bite; install and enable it manually."
echo 'Claude Desktop and Claude Code CLI require --with-claude, including verification and updates.'
echo 'Docker Desktop requires --with-docker, including installation, verification and updates; review its current license terms first.'
echo '--managed-desktop opts into automatic desktop placement and Kiro shell integration.'
echo '--managed-desktop opts into automatic placement of selected desktop applications.'
echo '--update refreshes recorded official installations; existing unmanaged copies are preserved.'
echo "Logs: $LOG_ROOT"
if [[ "$WITH_SOGOU" == true ]]; then
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Read `README.md` and `docs/automation.md` first. This directory is an independen
- Print the Zsh ownership boundary and restart command after configuration. A non-empty entry gets an explicit review notice; an unchanged rerun reports no change. Unknown loader syntax and dotfile-manager symlinks stop before any configuration write and give the canonical loader for manual merging; never recommend replacing a complete entry file.
- Install Obsidian through its official cask. Keep the reviewed starter under `~/.config/1bite/obsidian-vault`, create only new vault directories through `obn`, use `ob` only to open Obsidian or an existing vault, and never read or update created vaults. Bundle only licensed theme assets and portable vault settings; exclude notes, workspace state, identity, account data, and community plugin data.
- Recognize only the documented One Bite loader variants. Canonicalize them in place, preserve all surrounding content, and stop before writes when a managed-path loader has unknown syntax.
- Default desktop policy prepares official DMGs for manual installation; iTerm2/VS Code remain casks. AI CLIs use official scripts; default Kiro keeps vendor onboarding/integration. --managed-desktop explicitly enables automatic app placement and Kiro shell management. Never label prepared downloads as installed apps. Preserve healthy unmanaged copies and personal configuration; test both policies on disposable machines.
- Default desktop policy prepares official DMGs for manual installation; iTerm2/VS Code remain casks. AI CLIs use official scripts. Kiro is outside the managed software set because its current release no longer provides the CLI used for terminal hooks; do not install, configure, update, inventory, or verify it. Preserve existing Kiro applications and personal settings. --managed-desktop explicitly enables automatic app placement. Never label prepared downloads as installed apps. Preserve healthy unmanaged copies and personal configuration; test both policies on disposable machines.
- Docker Desktop is disabled by default. Only explicit `--with-docker` selects its installation, verification, inventory, maintenance, network probe, or manual steps; `--managed-desktop` never implies selection. Expose the Docker application PATH, aliases, helper, and Oh My Zsh client plugin only when a real `docker` client is available. Keep `DOCKER_DEFAULT_PLATFORM` engine-neutral and globally available for another local engine or a remote context.
- Install the managed Python runtime first, then check Doubao and optional Sogou independently by their expected Input Methods bundle, executable, and bundle identifier. Preserve each healthy installation; otherwise prepare only that input method's checksum-verified official ZIP before remaining package/configuration/onboarding/verification stages. One installed app/package must never suppress another selected app's download. A later failure must retain current receipts and print exact package/manual steps. Installation, logout/login, input-source activation, microphone access, and typing/voice checks remain manual; receipts never claim the input method is installed or enabled.
- Keep the One Bite iTerm2 Dynamic Profile on its release-stable unique GUID and the declared MesloLGS Nerd Font PostScript name. Replace only the managed profile, preserve all unrelated profiles, and tell users to open a new One Bite profile window before running the Powerlevel10k wizard.
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ Run the installer as your normal administrator account, without `sudo`. If `gh`
| Notes | Installs Obsidian and a reusable vault starter with Tokyo Night, the `wide` CSS snippet, portable vault settings, and empty attachment/template folders. |
| Prompt and fonts | Installs Oh My Zsh, Powerlevel10k, MesloLGS Nerd Font, and JetBrains Mono Nerd Font while preserving personal themes and configuration. |
| Input method | Prepares the checksum-verified official Doubao Input Method ZIP for manual installation, microphone permission, and activation. Sogou remains opt-in. |
| AI command-line tools | Installs Codex CLI and Kiro CLI from their official installers. Claude Code is opt-in. |
| Desktop applications | Downloads official DMGs for Chrome, ChatGPT, and Kiro IDE when the apps are missing. Docker Desktop is opt-in. |
| AI command-line tools | Installs Codex CLI from its official installer. Claude Code is opt-in. |
| Desktop applications | Downloads official DMGs for Chrome and ChatGPT when the apps are missing. Docker Desktop is opt-in. |
| Optional Docker apps | Provides separate, opt-in launchers for useful local services. These apps never start as part of the main installer. |
| Battery diagnostics | Shows a best-effort charge, power, maximum-capacity, and cycle summary beside the initial macOS check. The independent dashboard also provides JSON, TSV, Shell, and single-field output. Probe failure never changes installation success. |

Docker Desktop is disabled by default because its terms may not fit every workplace. Review the current vendor terms, then add `--with-docker` whenever you install, update, or verify it. Claude Desktop and Claude Code are also disabled by default and use `--with-claude`.
Docker Desktop is disabled by default because its terms may not fit every workplace. Review the current vendor terms, then add `--with-docker` whenever you install, update, or verify it. Claude Desktop and Claude Code are disabled by default and use `--with-claude`.

One Bite no longer installs, updates, configures, or verifies Kiro. The current Kiro release no longer provides the CLI that One Bite used to add terminal hooks and operation prompts, so that integration no longer serves its intended purpose. Existing Kiro applications and personal settings are left untouched.

## Finish downloaded application and input-method installations

Expand All @@ -45,7 +47,7 @@ At the end of a run, the installer prints a numbered guide for every package pre
2. Drag the `.app` into **Applications** and wait for the copy to finish.
3. Eject the mounted installer disk.
4. Start the app from **Applications**, sign in, and approve required macOS permissions.
5. If Docker Desktop was selected, wait for the engine to start. Complete Kiro IDE and Kiro CLI onboarding separately.
5. If Docker Desktop was selected, wait for the engine to start.

The same guide is saved as `manual-steps.txt` in the run directory printed by the installer. After all manual work is complete, run the exact `--verify` command shown in that guide. A Docker-selected run also prints a separate `--docker-smoke` command for use after the engine is running.

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.8
0.0.9
2 changes: 0 additions & 2 deletions config/casks.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@ visual-studio-code Visual Studio Code.app
obsidian Obsidian.app
google-chrome Google Chrome.app
chatgpt ChatGPT.app
kiro Kiro.app
kiro-cli Kiro CLI.app
claude-desktop Claude.app
8 changes: 0 additions & 8 deletions config/kiro-permissions.json

This file was deleted.

7 changes: 2 additions & 5 deletions config/repository-files.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.gitignore
.github/pull_request_template.md
.github/workflows/quality.yml
.gitignore
1bite
AGENTS.md
LICENSE
Expand All @@ -24,7 +24,6 @@ config/formulae.txt
config/git-defaults.json
config/gitignore-global
config/iterm2-profile.json
config/kiro-permissions.json
config/obsidian-vault/.gitignore
config/obsidian-vault/.obsidian/app.json
config/obsidian-vault/.obsidian/appearance.json
Expand Down Expand Up @@ -73,7 +72,6 @@ scripts/desktop.py
scripts/docker-smoke.sh
scripts/editor.sh
scripts/inventory.py
scripts/kiro-shell.py
scripts/manual.py
scripts/ob.py
scripts/official_ai.py
Expand All @@ -83,8 +81,8 @@ scripts/prepare-sogou.py
scripts/quality.sh
scripts/runtime-smoke.py
scripts/session.sh
scripts/welcome.sh
scripts/verify.sh
scripts/welcome.sh
tests/fixtures/battery/pmset-log-batt-uppercase.txt
tests/fixtures/battery/pmset-log-batt.txt
tests/fixtures/config-golden.json
Expand All @@ -93,7 +91,6 @@ tests/test_desktop.py
tests/test_doubao.py
tests/test_editor.py
tests/test_interruptions.py
tests/test_kiro_shell.py
tests/test_maintenance.py
tests/test_obsidian.py
tests/test_official_ai.py
Expand Down
6 changes: 0 additions & 6 deletions config/sources.tsv
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
homebrew installer https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh
claude installer https://claude.ai/install.sh
codex installer https://chatgpt.com/codex/install.sh
kiro-cli installer https://cli.kiro.dev/install
chatgpt documentation https://learn.chatgpt.com/docs/app
kiro documentation https://kiro.dev/downloads/
chatgpt-download distribution https://persistent.oaistatic.com/codex-app-prod/Codex.dmg
chatgpt-distribution distribution https://persistent.oaistatic.com/codex-app-prod/
chatgpt-releases metadata https://persistent.oaistatic.com/codex-app-prod/appcast.xml
kiro-distribution distribution https://prod.download.desktop.kiro.dev/
kiro-releases metadata https://prod.download.desktop.kiro.dev/stable/metadata-dmg-darwin-arm64-stable.json
kiro-cli-distribution distribution https://prod.download.cli.kiro.dev/stable/
kiro-cli-releases metadata https://prod.download.cli.kiro.dev/stable/latest/manifest.json
claude-releases metadata https://downloads.claude.ai/claude-code-releases/latest
codex-releases metadata https://releases.openai.com/codex/channels/latest
ohmyzsh installer https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
Expand Down
Loading
Loading