-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.botrc
More file actions
126 lines (106 loc) · 5.74 KB
/
Copy path.botrc
File metadata and controls
126 lines (106 loc) · 5.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# Botfiles interactive shell loader (zsh/bash).
#
# Sources .botenv for core env (secrets, PATH, EDITOR, TERM, UV_BIN),
# then adds interactive-only content: aliases, shell modules, and
# interactive env vars.
# --- Resolve own directory to locate .botenv -------------------------------
if [ -n "${BASH_SOURCE:-}" ]; then
_botrc_source="${BASH_SOURCE[0]}"
elif [ -n "${ZSH_VERSION:-}" ]; then
_botrc_source="${(%):-%x}"
else
_botrc_source="$0"
fi
_botrc_dir="$(cd "$(dirname "$_botrc_source")" && pwd)"
unset _botrc_source
# --- Core env (secrets, PATH, EDITOR, TERM, UV_BIN) -----------------------
. "$_botrc_dir/.botenv"
unset _botrc_dir
# --- Codex CLI profile shortcuts -------------------------------------------
# codex-cli 0.134.0 dropped the legacy top-level `profile = "..."` selector,
# so profiles now live in sibling `<name>.config.toml` files and only apply
# with an explicit `--profile <name>`.
#
# Bare `codex` is intentionally left UNWRAPPED: it runs the vanilla binary and
# picks up the top-level `config.toml`, which is configured to use persistent
# ChatGPT subscription auth through `~/.codex/auth.json`. Use explicit
# `codex-azure` / `codex-openai` helpers to select non-ChatGPT providers.
unalias codex codex-azure codex-openai codex-chatgpt \
codexy codexy-azure codexy-openai codexy-chatgpt 2>/dev/null || true
# Bare `codex` is deliberately NOT shadowed by a shell function here, so it
# runs the vanilla binary against the ChatGPT-configured top-level config.toml.
#
# `_botrc_codex_default` is intentionally raw Codex for now. The app-server
# notification path is paused because it has caused auth/session drift.
_botrc_codex_default() {
command codex "$@"
}
codex-azure() { _botrc_codex_default --profile azure "$@"; }
codex-openai() { _botrc_codex_default --profile openai_api "$@"; }
codex-chatgpt() { _botrc_codex_default --profile chatgpt "$@"; }
# --- Codex yolo aliases (parallel to ccy for Claude) ----------------------
# Bare `codexy` runs vanilla yolo against the ChatGPT top-level config.toml.
codexy() { _botrc_codex_default --yolo "$@"; }
codexy-azure() { _botrc_codex_default --yolo --profile azure "$@"; }
codexy-openai() { _botrc_codex_default --yolo --profile openai_api "$@"; }
codexy-chatgpt() { _botrc_codex_default --yolo --profile chatgpt "$@"; }
# --- Legacy Codex notification aliases -------------------------------------
# Notification/app-server aliases are paused; keep old names as raw Codex
# compatibility shims so muscle memory does not accidentally start app-server.
alias codexn="codex"
alias codexn-azure="codex --profile azure"
alias codexn-openai="codex --profile openai_api"
alias codexn-chatgpt="codex --profile chatgpt"
alias codexny="codex --yolo"
alias codexny-azure="codex --yolo --profile azure"
alias codexny-openai="codex --yolo --profile openai_api"
alias codexny-chatgpt="codex --yolo --profile chatgpt"
alias codexn-start="codex-app-notify-start"
alias codexn-stop="codex-app-notify-stop"
alias codexn-status="codex-app-notify-status"
alias codexn-logs="codex-app-notify-proxy-logs"
# --- Claude Code aliases ---------------------------------------------------
alias cc="claude" # normal start
alias ccc="claude --continue" # continue last session
alias ccy="claude --dangerously-skip-permissions" # skip all permission prompts
alias ccyc="claude --dangerously-skip-permissions -c" # skip permissions + continue
alias bedcc="export CLAUDE_CODE_USE_BEDROCK=1; claude" # use bedrock
alias bedccc="export CLAUDE_CODE_USE_BEDROCK=1; claude --continue" # use bedrock and continue last session
alias bedccy="export CLAUDE_CODE_USE_BEDROCK=1; claude --dangerously-skip-permissions" # use bedrock and skip all permission prompts
alias bedccyc="export CLAUDE_CODE_USE_BEDROCK=1; claude --dangerously-skip-permissions -c" # use bedrock and skip all permission prompts and continue last session
alias ancc="export CLAUDE_CODE_USE_ANTHROPIC=0; claude"
alias anccc="export CLAUDE_CODE_USE_ANTHROPIC=0; claude --continue"
alias anccy="export CLAUDE_CODE_USE_ANTHROPIC=0; claude --dangerously-skip-permissions"
alias anccyc="export CLAUDE_CODE_USE_ANTHROPIC=0; claude --dangerously-skip-permissions -c"
# --- Zellij aliases (mobile-friendly session management) -------------------
alias zj="zellij" # quick start
alias zjs="zellij list-sessions" # list active sessions
alias zja="zellij attach -c" # attach to session (create if missing)
alias zjk="zellij kill-session" # kill a specific session
alias start-zellij-session-for-task-raw="start-zellij-session-for-task --no-codex-app-notify"
# --- Shell: list current dir entries with full paths -----------------------
alias lsf='ls -ld $(pwd)/.* $(pwd)/*'
# --- Load modular shell extensions (skip 10-* loaded by .botenv) -----------
if [ -d "$BOTFILES_ROOT/shell" ]; then
for _botrc_module in "$BOTFILES_ROOT"/shell/*.sh; do
[ -f "$_botrc_module" ] || continue
case "$(basename "$_botrc_module")" in
10-*) continue ;; # already loaded by .botenv
esac
. "$_botrc_module"
done
unset _botrc_module
fi
# --- Interactive env vars --------------------------------------------------
# https://opencode.ai/docs/cli/
# https://github.com/anomalyco/opencode/issues/1721
OPENCODE_EXPERIMENTAL_BASH_DEFAULT_TIMEOUT_MS=3600000
# Originally set for good opencode.
# export COLORTERM=truecolor # disabled: causes garish colors in Claude Code under Zellij
# Optional local Symcode experiment launcher. Guarded so this shared botfiles
# layer stays portable on machines without the experiment checkout.
_botrc_symcode="$HOME/pro/symcode-sidebar-experiment/packages/opencode/dist/opencode-linux-x64/bin/symcode"
if [ -x "$_botrc_symcode" ]; then
alias symcode="$_botrc_symcode"
fi
unset _botrc_symcode