You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 16-ai.rc
+29-3Lines changed: 29 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,6 @@
7
7
alias clinerules="code /Users/samm/Library/Mobile\ Documents/com\~apple\~CloudDocs/Documents/Cline"
8
8
alias clinerulesd="cd /Users/samm/Library/Mobile\ Documents/com\~apple\~CloudDocs/Documents/Cline"
9
9
alias sync_ollama_models="${HOME}/git/sammcj/scripts/ollama/export_ollama_model.py"
10
-
# alias copilot="gh copilot suggest -t shell"
11
-
# alias copilot-explain="gh copilot explain"
12
-
alias '??'='claude -p'
13
10
alias '???'='copilot-comments'
14
11
alias wtf='copilot'
15
12
alias l="OLLAMA_HOST=http://localhost:11434 gollama -l"
@@ -27,9 +24,38 @@ alias kanban="npx -y vibe-kanban"
27
24
alias claude="~/.claude/local/claude --dangerously-skip-permissions"
28
25
alias cc='claude --dangerously-skip-permissions'
29
26
27
+
# Claude Code non-interactive functions
28
+
alias '??'='claude_helper'
29
+
alias '??!'='claude_helper_exec'
30
30
31
31
### Functions ###
32
32
33
+
# Command-line helper - provides commands without execution
34
+
function claude_helper {
35
+
local prompt="$*"
36
+
37
+
claude \
38
+
--system-prompt 'You are a macOS zsh command-line assistant. Provide exact commands to accomplish tasks. Output the command. If the command is highly complex you may provide a concise explanation. You are running non-interactively so you cannot ask questions. You cannot execute commands. Do not add conversational text, questions, or unnecessary detail. Focus on providing the most appropriate and efficient command following current best practices.' \
39
+
--disallowed-tools Bash \
40
+
--strict-mcp-config \
41
+
-p \
42
+
"$prompt"
43
+
}
44
+
45
+
# Command-line helper with execution - runs commands when explicitly requested
46
+
function claude_helper_exec {
47
+
local prompt="$*"
48
+
49
+
claude \
50
+
--system-prompt 'You are a macOS command-line assistant with execution access. Run commands to accomplish the requested task. Do not run unsafe commands that may harm the system or compromise security. You are running non-interactively so you cannot ask questions. If the user asks you to run a command that may delete, edit or overwrite files BEFORE DOING ANYTHING ELSE YOU MUST REFUSE unless they have given you the exact phrase "YES REALLY" at the start or end of their request - you may state this as a condition for executing such commands. Provide concise output keeping explanations brief and focused on the commands being run.' \
51
+
--strict-mcp-config \
52
+
-p \
53
+
"$prompt"
54
+
}
55
+
56
+
57
+
58
+
33
59
copilot-comments() {
34
60
# Function to list and display comments made by GitHub Copilot on the current PR
35
61
local -r current_branch="$(git branch --show-current 2>/dev/null)" || {
0 commit comments