Skip to content

Commit a8a1226

Browse files
committed
♻️ Add package variable to DRY up bun/npm justfiles
1 parent c1a041a commit a8a1226

File tree

9 files changed

+36
-27
lines changed

9 files changed

+36
-27
lines changed

home/.justfiles/clawdbot.justfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ set dotenv-load := false
66
set export := true
77

88
justfile := justfile_directory() + "/.justfiles/clawdbot.justfile"
9+
package := "clawdbot"
910

1011
# list all available recipes
1112
[private]
@@ -27,20 +28,20 @@ justfile := justfile_directory() + "/.justfiles/clawdbot.justfile"
2728

2829
# install clawdbot CLI
2930
@install:
30-
bun install -g clawdbot@latest
31+
bun install -g {{ package }}@latest
3132
# just --justfile {{ justfile }} restart
3233

3334
# uninstall clawdbot CLI
3435
@uninstall:
35-
bun remove -g clawdbot
36+
bun remove -g {{ package }}
3637

3738
# restart clawdbot daemon
3839
@restart:
3940
clawdbot daemon restart
4041

4142
# upgrade clawdbot to the latest version
4243
@upgrade:
43-
bun install -g clawdbot@latest
44+
bun install -g {{ package }}@latest
4445
-just --justfile {{ justfile }} restart
4546

4647
# display clawdbot version

home/.justfiles/clawdhub.justfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ set dotenv-load := false
66
set export := true
77

88
justfile := justfile_directory() + "/.justfiles/clawdhub.justfile"
9+
package := "clawdhub"
910

1011
# list all available recipes
1112
[private]
@@ -19,15 +20,15 @@ justfile := justfile_directory() + "/.justfiles/clawdhub.justfile"
1920

2021
# install clawdhub CLI
2122
@install:
22-
bun add -g clawdhub
23+
bun add -g {{ package }}
2324

2425
# uninstall clawdhub CLI
2526
@uninstall:
26-
bun remove -g clawdhub
27+
bun remove -g {{ package }}
2728

2829
# upgrade clawdhub to the latest version
2930
@upgrade:
30-
bun add -g clawdhub
31+
bun add -g {{ package }}
3132

3233
# display clawdhub version
3334
@version:

home/.justfiles/codex.justfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ set dotenv-load := false
66
set export := true
77

88
justfile := justfile_directory() + "/.justfiles/codex.justfile"
9+
package := "@openai/codex"
910

1011
# list all available recipes
1112
[private]
@@ -23,16 +24,16 @@ justfile := justfile_directory() + "/.justfiles/codex.justfile"
2324

2425
# install Codex CLI
2526
@install:
26-
bun install -g @openai/codex
27+
bun install -g {{ package }}
2728

2829
# uninstall Codex CLI
2930
@uninstall:
30-
bun remove -g @openai/codex
31+
bun remove -g {{ package }}
3132

3233
# update Codex CLI to the latest version
3334
@upgrade:
3435
just --justfile {{ justfile }} version
35-
bun install -g @openai/codex
36+
bun install -g {{ package }}
3637
just --justfile {{ justfile }} version
3738

3839
# see Codex CLI usage

home/.justfiles/copilot.justfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ set dotenv-load := false
66
set export := true
77

88
justfile := justfile_directory() + "/.justfiles/copilot.justfile"
9+
package := "@github/copilot"
910

1011
# list all available recipes
1112
[private]
@@ -23,16 +24,16 @@ justfile := justfile_directory() + "/.justfiles/copilot.justfile"
2324

2425
# check for outdated Copilot npm package
2526
@outdated:
26-
npm outdated @github/copilot
27+
npm outdated {{ package }}
2728

2829
# uninstall Copilot CLI
2930
@uninstall:
30-
npm uninstall -g @github/copilot
31+
npm uninstall -g {{ package }}
3132

3233
# update Copilot CLI to the latest version
3334
@upgrade:
3435
just --justfile {{ justfile }} version
35-
npm install -g @github/copilot
36+
npm install -g {{ package }}
3637
just --justfile {{ justfile }} version
3738

3839
# display Copilot CLI version

home/.justfiles/glm.justfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ set dotenv-load := false
66
set export := true
77

88
justfile := justfile_directory() + "/.justfiles/glm.justfile"
9+
package := "cc-x10ded"
910

1011
# list all available recipes
1112
[private]
@@ -19,17 +20,17 @@ justfile := justfile_directory() + "/.justfiles/glm.justfile"
1920

2021
# install ccx CLI
2122
@install:
22-
bun install -g cc-x10ded@latest
23+
bun install -g {{ package }}@latest
2324
just --justfile {{ justfile }} version
2425

2526
# uninstall ccx CLI
2627
@uninstall:
27-
bun remove -g cc-x10ded
28+
bun remove -g {{ package }}
2829

2930
# update ccx CLI to the latest version
3031
@upgrade:
3132
just --justfile {{ justfile }} version
32-
bun install -g cc-x10ded@latest
33+
bun install -g {{ package }}@latest
3334
just --justfile {{ justfile }} version
3435

3536
# show available ccx model usage

home/.justfiles/happy.justfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ set dotenv-load := false
77
set export := true
88

99
justfile := justfile_directory() + "/.justfiles/happy.justfile"
10+
package := "happy-coder"
1011

1112
# list all available recipes
1213
[private]
@@ -20,7 +21,7 @@ justfile := justfile_directory() + "/.justfiles/happy.justfile"
2021

2122
# install happy-coder CLI
2223
@install:
23-
bun install -g happy-coder
24+
bun install -g {{ package }}
2425
just --justfile {{ justfile }} version
2526

2627
# run happy CLI
@@ -29,11 +30,11 @@ justfile := justfile_directory() + "/.justfiles/happy.justfile"
2930

3031
# uninstall happy-coder CLI
3132
@uninstall:
32-
bun remove -g happy-coder
33+
bun remove -g {{ package }}
3334

3435
# upgrade happy-coder to the latest version
3536
@upgrade:
36-
bun install -g happy-coder
37+
bun install -g {{ package }}
3738
just --justfile {{ justfile }} version
3839

3940
# display happy-coder version

home/.justfiles/moltbot.justfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ set dotenv-load := false
66
set export := true
77

88
justfile := justfile_directory() + "/.justfiles/moltbot.justfile"
9+
package := "moltbot"
910

1011
# list all available recipes
1112
[private]
@@ -27,20 +28,20 @@ justfile := justfile_directory() + "/.justfiles/moltbot.justfile"
2728

2829
# install moltbot CLI
2930
@install:
30-
bun install -g moltbot@latest
31+
bun install -g {{ package }}@latest
3132
# just --justfile {{ justfile }} restart
3233

3334
# uninstall moltbot CLI
3435
@uninstall:
35-
bun remove -g moltbot
36+
bun remove -g {{ package }}
3637

3738
# restart moltbot daemon
3839
@restart:
3940
moltbot daemon restart
4041

4142
# upgrade moltbot to the latest version
4243
@upgrade:
43-
bun install -g moltbot@latest
44+
bun install -g {{ package }}@latest
4445
-just --justfile {{ justfile }} restart
4546

4647
# display moltbot version

home/.justfiles/openclaw.justfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ set dotenv-load := false
66
set export := true
77

88
justfile := justfile_directory() + "/.justfiles/openclaw.justfile"
9+
package := "openclaw"
910

1011
# list all available recipes
1112
[private]
@@ -27,20 +28,20 @@ justfile := justfile_directory() + "/.justfiles/openclaw.justfile"
2728

2829
# install openclaw CLI
2930
@install:
30-
bun install -g openclaw@latest
31+
bun install -g {{ package }}@latest
3132
# just --justfile {{ justfile }} restart
3233

3334
# uninstall openclaw CLI
3435
@uninstall:
35-
bun remove -g openclaw
36+
bun remove -g {{ package }}
3637

3738
# restart openclaw daemon
3839
@restart:
3940
openclaw daemon restart
4041

4142
# upgrade openclaw to the latest version
4243
@upgrade:
43-
bun install -g openclaw@latest
44+
bun install -g {{ package }}@latest
4445
-just --justfile {{ justfile }} restart
4546

4647
# display openclaw version

home/.justfiles/pi-coding-agent.justfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ set dotenv-load := false
66
set export := true
77

88
justfile := justfile_directory() + "/.justfiles/pi-coding-agent.justfile"
9+
package := "@mariozechner/pi-coding-agent"
910

1011
# list all available recipes
1112
[private]
@@ -23,7 +24,7 @@ justfile := justfile_directory() + "/.justfiles/pi-coding-agent.justfile"
2324

2425
# install pi-coding-agent CLI
2526
@install:
26-
bun install -g @mariozechner/pi-coding-agent
27+
bun install -g {{ package }}
2728
just --justfile {{ justfile }} version
2829

2930
# list available models
@@ -36,11 +37,11 @@ justfile := justfile_directory() + "/.justfiles/pi-coding-agent.justfile"
3637

3738
# uninstall pi-coding-agent CLI
3839
@uninstall:
39-
bun remove -g @mariozechner/pi-coding-agent
40+
bun remove -g {{ package }}
4041

4142
# upgrade pi-coding-agent to the latest version
4243
@upgrade:
43-
bun install -g @mariozechner/pi-coding-agent
44+
bun install -g {{ package }}
4445
just --justfile {{ justfile }} version
4546

4647
# display pi-coding-agent version

0 commit comments

Comments
 (0)