Repository navigation
Expand file tree
/
Copy pathcode.bash
More file actions
85 lines (70 loc) · 1.73 KB
/
Copy pathcode.bash
File metadata and controls
85 lines (70 loc) · 1.73 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
#!/bin/bash
ag() {
antigravity-ide "${@:-.}"
}
alias antigravity-editor="antigravity-ide"
agy() {
# If running non-interactively, pass through directly
if [[ ! -t 0 ]]; then
command agy "$@"
return $?
fi
# Pass through common subcommands and help flags without prompting
case "$1" in
agent|agents|changelog|help|install|mcp|mic-serve|models|plugin|plugins|update|--help|-h|--version|-v)
command agy "$@"
return $?
;;
esac
# If user already passed permission or mode flags, pass through directly
for arg in "$@"; do
if [[ "$arg" == "--dangerously-skip-permissions" || "$arg" == "--mode" ]]; then
command agy "$@"
return $?
fi
done
local response
printf "Auto-approve all actions for this session? [y/N]: "
read -r response
if [[ "$response" =~ ^([yY][eE][sS]|[yY])$ ]]; then
command agy --mode accept-edits --dangerously-skip-permissions "$@"
else
command agy "$@"
fi
}
agyy() {
echo "⚡ Launching in auto-approval mode..."
command agy --mode accept-edits --dangerously-skip-permissions "$@"
}
agp() {
echo "[AG_USER_DIR] $AG_USER_DIR"
(
cd "$AG_USER_DIR" || exit
git add . && echo "[*] Adding files"
echo "[*] Commiting files"
git commit -m "push" || echo "No changes to commit"
echo "[*] Pushing files"
git push
)
}
agpull() {
echo "[AG_USER_DIR] $AG_USER_DIR"
echo "[*] Pulling"
git -C "$AG_USER_DIR" pull
}
alias tf="tail -f"
findPort() {
lsof -i :$1
}
#alias port="findPort"
alias killPort="npx kill-port"
process() {
if [[ -z "$1" ]]; then
echo "Usage: process <process_name>"
return 1
fi
sudo ps aux | grep -i "$1"
}
alias header="curl -I -L"
alias portListener="sudo netstat -tolpn"
alias tsd="tsx watch"