Skip to content

Commit bf693ee

Browse files
pofallonclaude
andcommitted
feat(modern-cli-tools): add starship, remove devcontainers-extra dependency
Starship's devcontainers-extra feature is broken on arm64 — it pins nanolayer v0.5.4 (missing the aarch64-musl binary) and relies on gh-release's platform filtering, which fails because starship only publishes aarch64-unknown-linux-musl (no gnu build). Installing directly from GitHub releases with explicit arch selection fixes both issues. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 8a9250a commit bf693ee

6 files changed

Lines changed: 34 additions & 3 deletions

File tree

examples/full-stack.devcontainer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"ghcr.io/devcontainers/features/aws-cli:1": {},
1515
"ghcr.io/devcontainers/features/github-cli:1": {},
1616
"ghcr.io/eitsupi/devcontainer-features/jq-likes:2": {},
17-
"ghcr.io/devcontainers-extra/features/starship:1": {},
1817
"ghcr.io/get2knowio/devcontainer-features/ai-clis:2": {},
1918
"ghcr.io/get2knowio/devcontainer-features/modern-cli-tools:2": {},
2019
"ghcr.io/get2knowio/devcontainer-features/node-dev-tools:2": {},

src/modern-cli-tools/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Modern CLI Tools (modern-cli-tools)
22

3-
Installs modern CLI replacements and TUI tools: bat, ripgrep, fd, fzf, eza, zoxide, neovim, tmux, lazygit, ast-grep, jujutsu, and zellij.
3+
Installs modern CLI replacements and TUI tools: bat, ripgrep, fd, fzf, eza, zoxide, neovim, tmux, lazygit, ast-grep, jujutsu, zellij, and starship.
44

55
## Options
66

@@ -13,6 +13,7 @@ Installs modern CLI replacements and TUI tools: bat, ripgrep, fd, fzf, eza, zoxi
1313
| `lazygitVersion` | Version of lazygit to install | string | `0.59.0` |
1414
| `astGrepVersion` | Version of ast-grep to install | string | `0.40.5` |
1515
| `zellijVersion` | Version of zellij to install | string | `0.43.1` |
16+
| `starshipVersion` | Version of starship to install | string | `latest` |
1617

1718
## Usage
1819

src/modern-cli-tools/devcontainer-feature.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "2.0.2",
44
"name": "Modern CLI Tools",
55
"documentationURL": "https://github.com/get2knowio/devcontainer-features/tree/main/src/modern-cli-tools",
6-
"description": "Installs modern CLI replacements and TUI tools: bat, ripgrep, fd, fzf, eza, zoxide, neovim, tmux, lazygit, ast-grep, jujutsu, and zellij.",
6+
"description": "Installs modern CLI replacements and TUI tools: bat, ripgrep, fd, fzf, eza, zoxide, neovim, tmux, lazygit, ast-grep, jujutsu, zellij, and starship.",
77
"options": {
88
"install": {
99
"type": "string",
@@ -39,6 +39,11 @@
3939
"type": "string",
4040
"default": "latest",
4141
"description": "Version of zellij to install, or 'latest'"
42+
},
43+
"starshipVersion": {
44+
"type": "string",
45+
"default": "latest",
46+
"description": "Version of starship to install, or 'latest'"
4247
}
4348
}
4449
}

src/modern-cli-tools/install.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ LAZYGIT="true"
2626
ASTGREP="true"
2727
JUJUTSU="true"
2828
ZELLIJ="true"
29+
STARSHIP="true"
2930

3031
# Step 2: If install is set, whitelist mode
3132
if [ -n "${INSTALL}" ]; then
@@ -41,6 +42,7 @@ if [ -n "${INSTALL}" ]; then
4142
ASTGREP="false"
4243
JUJUTSU="false"
4344
ZELLIJ="false"
45+
STARSHIP="false"
4446

4547
IFS=',' read -ra SELECTED <<< "${INSTALL}"
4648
for item in "${SELECTED[@]}"; do
@@ -58,6 +60,7 @@ if [ -n "${INSTALL}" ]; then
5860
astGrep) ASTGREP="true" ;;
5961
jujutsu) JUJUTSU="true" ;;
6062
zellij) ZELLIJ="true" ;;
63+
starship) STARSHIP="true" ;;
6164
*) echo "Warning: unknown tool '$item' in install list" ;;
6265
esac
6366
done
@@ -81,6 +84,7 @@ if [ -n "${OMIT}" ]; then
8184
astGrep) ASTGREP="false" ;;
8285
jujutsu) JUJUTSU="false" ;;
8386
zellij) ZELLIJ="false" ;;
87+
starship) STARSHIP="false" ;;
8488
*) echo "Warning: unknown tool '$item' in omit list" ;;
8589
esac
8690
done
@@ -210,6 +214,22 @@ if [ "${ZELLIJ}" = "true" ]; then
210214
rm -f /tmp/zellij.tgz
211215
fi
212216

217+
# starship
218+
if [ "${STARSHIP}" = "true" ]; then
219+
if [ "${STARSHIPVERSION}" = "latest" ]; then
220+
STARSHIPVERSION=$(resolve_latest_version "starship/starship")
221+
echo "Resolved starship latest -> ${STARSHIPVERSION}"
222+
fi
223+
echo "Installing starship ${STARSHIPVERSION}..."
224+
case "$ARCH" in
225+
amd64) STARSHIP_ARCH="x86_64-unknown-linux-gnu" ;;
226+
arm64) STARSHIP_ARCH="aarch64-unknown-linux-musl" ;; # no gnu build published for arm64
227+
*) echo "Unsupported architecture for starship: $ARCH" && exit 1 ;;
228+
esac
229+
STARSHIP_URL="https://github.com/starship/starship/releases/download/v${STARSHIPVERSION}/starship-${STARSHIP_ARCH}.tar.gz"
230+
curl -fsSL "$STARSHIP_URL" | tar -xzf - -C /usr/local/bin starship
231+
fi
232+
213233
# --- Shell configuration ---
214234
ZSHRC="$_REMOTE_USER_HOME/.zshrc"
215235

@@ -223,4 +243,8 @@ if [ "${ZOXIDE}" = "true" ]; then
223243
echo 'eval "$(zoxide init zsh)"' >> "$ZSHRC"
224244
fi
225245

246+
if [ "${STARSHIP}" = "true" ]; then
247+
echo 'eval "$(starship init zsh)"' >> "$ZSHRC"
248+
fi
249+
226250
echo "Modern CLI tools installation complete."

test/modern-cli-tools/minimal.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ check "bat installed" bash -c "command -v bat"
66
check "ripgrep installed" bash -c "command -v rg"
77
check "eza not installed" bash -c "! command -v eza"
88
check "lazygit not installed" bash -c "! command -v lazygit"
9+
check "starship not installed" bash -c "! command -v starship"
910

1011
reportResults

test/modern-cli-tools/test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ check "lazygit installed" bash -c "command -v lazygit"
1414
check "ast-grep installed" bash -c "command -v sg"
1515
check "jujutsu installed" bash -c "command -v jj"
1616
check "zellij installed" bash -c "command -v zellij"
17+
check "starship installed" bash -c "command -v starship"
1718

1819
reportResults

0 commit comments

Comments
 (0)