bun-shell-commands

Solid

Writing shell commands for OpenCode custom commands using Bun Shell

Data & Documents 364 stars 68 forks Updated today MIT

Install

View on GitHub

Quality Score: 89/100

Stars 20%
85
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Bun Shell Commands This skill covers how to write effective shell commands in OpenCode custom commands using Bun Shell (Bun's bash-like shell implementation). ## Context OpenCode uses **Bun Shell** for executing shell commands in custom commands via the !`command` syntax. Bun Shell is a bash-like shell written in Zig that provides cross-platform shell scripting, but it has some differences from traditional bash. ## Supported Features ### ✅ Arguments Positional arguments work correctly: ```markdown !`echo "Arg1: $1" && echo "Arg2: $2" && echo "Arg3: $3"` ``` Usage: `/mycommand 5 "hello world" "a,b,c"` ### ✅ Command Substitution Use `$(command)` for command substitution: ```markdown !`echo "Sum: $(seq $1 | awk '{s+=$1} END {print s}')"` ``` ### ✅ Pipes Pipe commands using `|`: ```markdown !`echo "$2" | tr '[:lower:]' '[:upper:]' | rev` ``` ### ✅ Environment Variables Set environment variables and use them: ```markdown !`TEST_VAR="$1" && echo "TEST_VAR=$TEST_VAR"` ``` Store command substitution results in variables: ```markdown !`REV=$(echo "$2" | rev) && echo "Reversed: $REV"` ``` ### ✅ Command Chaining Use `&&` to chain commands (instead of newlines or `;`): ```markdown !`echo "First" && echo "Second" && echo "Third"` ``` ### ✅ Available Commands Bun Shell includes these built-in commands: - `cd`, `ls`, `rm`, `echo`, `pwd`, `cat`, `touch`, `mkdir`, `which`, `mv` - `seq`, `dirname`, `basename`, `true`, `false`, `yes` Common external commands also work...

Details

Author
majiayu000
Repository
majiayu000/claude-skill-registry
Created
5 months ago
Last Updated
today
Language
HTML
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category