Loading...
Loading...
Use when creating new Bun packages from zenobi-us/bun-module template - automates repo creation, cloning, and setup using GitHub CLI; note setup.sh runs non-interactively with defaults requiring manual package.json updates
npx skill4agent add zenobi-us/dotfiles create-new-bun-package-repopackage.json| Step | Command | Purpose |
|---|---|---|
| 1. Create repo | | Create from template |
| 2. Navigate | | Enter repo directory |
| 3. Setup | | Run interactive setup |
# GitHub CLI installed and authenticated
gh auth status
# Bun installed (required for setup.sh)
bun --versionzenobi-usmy-awesome-module# Public repository (recommended for open source)
gh repo create OWNER/REPO-NAME \
--template zenobi-us/bun-module \
--public \
--clone
# Private repository (if needed)
gh repo create OWNER/REPO-NAME \
--template zenobi-us/bun-module \
--private \
--clone--clonecd REPO-NAMEbash setup.shmy-bun-packageA Bun packageYour Name <you@example.com>package.jsonpackage.json# Edit package.json - update these fields:
# - name: Change from "my-bun-package" to your actual name
# - description: Update to your package's description
# - author.name: Your actual name
# - author.email: Your actual email# Required before running mise tasks
mise trust# Install dependencies
bun install
# Build the package
mise run build
# Verify build succeeded
ls -la dist/# Stage package.json changes
git add package.json
# Commit your customizations
git commit -m "chore: update package metadata"
# Push to remote
git push -u origin maingh repo create [<owner>/]<name> [flags]--template OWNER/REPO--public--private--clone--description DESC--homepage URL# Minimal - public, auto-clone
gh repo create zenobi-us/new-module \
--template zenobi-us/bun-module \
--public \
--clone
# With metadata
gh repo create zenobi-us/new-module \
--template zenobi-us/bun-module \
--public \
--clone \
--description "My awesome Bun module" \
--homepage "https://example.com"
# Organization repository
gh repo create my-org/new-module \
--template zenobi-us/bun-module \
--public \
--clonezenobi-us/bun-moduletsconfig.jsonpackage.jsonsetup.sh| Field | Default Value | Where to Update |
|---|---|---|
| Package name | | |
| Description | | |
| Author name | | |
| Author email | | |
| Repository URL | Auto-detected from git remote | Usually correct, verify in |
| GitHub org | | Not stored, used during setup only |
package.json# 1. Create repository from template
gh repo create zenobi-us/my-bun-package \
--template zenobi-us/bun-module \
--public \
--clone \
--description "My awesome Bun package"
# 2. Navigate to directory
cd my-bun-package
# 3. Run setup (applies defaults)
bash setup.sh
# 4. Edit package.json manually
# Update: name, description, author.name, author.email
# 5. Trust mise and build
mise trust
bun install
mise run build
# 6. Commit and push
git add package.json
git commit -m "chore: update package metadata"
git push -u origin main# Create under organization
gh repo create my-org/shared-package \
--template zenobi-us/bun-module \
--public \
--clone \
--description "Shared Bun package for organization"
cd shared-package
bash setup.sh
# Edit package.json with org-scoped name:
# name: "@my-org/shared-package"
# ...
mise trust
bun install
mise run build
git add package.json
git commit -m "chore: update package metadata"
git push -u origin main# Create private repository
gh repo create zenobi-us/internal-package \
--template zenobi-us/bun-module \
--private \
--clone \
--description "Internal Bun package"
cd internal-package
bash setup.sh
# Edit package.json as needed
# ...
mise trust
bun install
mise run build
git add package.json
git commit -m "chore: update package metadata"
git push -u origin mainCould not clone: zenobi-us/bun-module is not a template repository# Mark repository as template
gh repo edit zenobi-us/bun-module --template
# Verify it's now a template
gh repo view zenobi-us/bun-module --json isTemplategh: Not authenticated# Authenticate with GitHub
gh auth login
# Verify authentication
gh auth statusrepository not found: zenobi-us/bun-modulesetup.sh: command not found# Verify file exists
ls -la setup.sh
# Make executable if needed
chmod +x setup.sh
# Run with bash explicitly
bash setup.sh
# Check Bun is installed
bun --versionConfig files in [...] are not trusted# Trust the mise configuration
mise trust
# Now run mise tasks
mise run builddestination path 'repo-name' already exists# Choose different name or remove existing directory
rm -rf repo-name
# Or use --clone flag without specifying directory
gh repo create owner/repo-name --template ... --clone# Ensure dependencies are installed
bun install
# Trust mise config if not done
mise trust
# Try build again
mise run build
# Check for specific errors
mise run build --verbosecat package.json | jq '.name, .description, .author'bun installmise trust
mise run buildls -la dist/
# Should see: index.js, index.d.tsmise run testgit add package.json
git commit -m "chore: update package metadata"
git push origin main.github/workflows/src/# Pin Bun version in project
mise use bun@latest
# Add to mise.toml tasks
[tasks]
setup = "bash setup.sh"
test = "bun test"
build = "bun run build"# Create feature branch immediately
git checkout -b feat/initial-implementation
# Set up pre-commit hooks
bun add -D husky lint-stagedbun installbun addnpm installpnpm installgh repo edit --template@scope/namemise run build# 1. Ensure template repo is marked as template (one-time setup)
gh repo edit zenobi-us/bun-module --template
# 2. Create and clone from template
gh repo create OWNER/NAME \
--template zenobi-us/bun-module \
--public \
--clone \
--description "Your plugin description"
# 3. Enter directory
cd NAME
# 4. Run setup (uses defaults)
bash setup.sh
# 5. Edit package.json manually - UPDATE THESE:
# - name: "my-bun-package" → "@owner/actual-name"
# - description: "A Bun package" → "Your description"
# - author.name: "Your Name" → Your actual name
# - author.email: "you@example.com" → Your actual email
# 6. Trust mise, install, and build
mise trust
bun install
mise run build
# 7. Commit updates and push
git add package.json
git commit -m "chore: update package metadata"
git push -u origin main