Skip to content

bu-ist/starship-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

BU IS&T Starship Configuration

Terminal prompt configuration for PHP, JavaScript, and Python development with server management tools.

Overview

Starship is a cross-shell prompt written in Rust. This configuration provides context-aware information display with optimized performance for the BU IS&T development stack.

What You Get

~ via 🐘 v7.4.33 via ⬒ v23.11.0 via 🐍 v3.13.3 on ☁️ (us-east-1)
➀ cd repos/my-project

~/repos/my-project on 🌱 main [!2 +1] via 🐘 v8.1.0 via ⬒ v18.0.0
➀ 

Elements:

  • 🐘 PHP version (when composer.json detected)
  • β¬’ Node.js version (when package.json detected)
  • 🐍 Python version (when requirements.txt detected)
  • 🌱 Git branch with status (when in Git repository)
  • ☁️ AWS context (when AWS credentials configured)
  • ➀ Prompt indicator (green=success, red=error)

Plus optimized .zshrc with:

  • Useful aliases (g for git, gs for git status, art for php artisan)
  • Better history management (100k entries, no duplicates)
  • Performance optimizations
  • Integration with fzf, zoxide, and other productivity tools

πŸš€ Installation

Automated Installation (Recommended)

Option 1: Interactive Installation

curl -fsSL https://raw.githubusercontent.com/bu-ist/starship-config/main/install.sh > /tmp/install-starship.sh
chmod +x /tmp/install-starship.sh
/tmp/install-starship.sh

Option 2: One-Command Installation

echo "1" | curl -fsSL https://raw.githubusercontent.com/bu-ist/starship-config/main/install.sh | bash

What this does:

  1. Installs Starship (if not already installed)
  2. Installs JetBrains Mono Nerd Font
  3. Installs productivity tools (fzf, zoxide, bat, exa, htop)
  4. Downloads optimized configurations
  5. Sets up shell integration

Note: Option 1 allows you to choose how to handle your existing .zshrc. Option 2 automatically replaces it with the BU IS&T configuration.

Manual Installation

# 1. Install Starship
brew install starship  # macOS
curl -sS https://starship.rs/install.sh | sh  # Linux

# 2. Install Nerd Font
brew tap homebrew/cask-fonts && brew install font-jetbrains-mono-nerd-font  # macOS

# 3. Install configurations
curl -fsSL https://raw.githubusercontent.com/bu-ist/starship-config/main/starship.toml -o ~/.config/starship.toml
curl -fsSL https://raw.githubusercontent.com/bu-ist/starship-config/main/.zshrc -o ~/.zshrc.bu-ist

# 4. Configure shell
echo 'eval "$(starship init zsh)"' >> ~/.zshrc
source ~/.zshrc

🎯 Key Features

Performance Optimizations

  • 15-25ms prompt generation (vs 150-250ms with Oh My Zsh)
  • Disabled unused language modules (Ruby, Rust, Go, Java, etc.)
  • Git optimizations for large repositories
  • Aggressive completion caching

Development Workflow

  • Smart language detection for PHP, Node.js, Python
  • Git integration with branch, status, and performance optimizations
  • AWS context when working with cloud resources
  • Command duration for long-running commands
  • Directory shortcuts and path substitutions

Productivity Features

  • 50+ useful aliases for common development tasks
  • Better history management with smart search
  • FZF integration for fuzzy finding
  • Zoxide integration for smart directory jumping
  • Auto-completion enhancements

βš™οΈ Configuration Details

Starship Modules (Enabled)

  • Directory: Smart truncation with path substitutions
  • Git: Branch, status with performance optimizations
  • Languages: PHP, Node.js, Python version detection
  • Cloud: AWS region and profile information
  • Docker: Context when working with containers
  • Duration: Execution time for commands >1 second

Zsh Enhancements

  • History: 100k entries, no duplicates, timestamp tracking
  • Navigation: Auto-cd, directory stack, smart globbing
  • Completion: Enhanced with colors, case-insensitive matching
  • Key Bindings: Arrow keys for history search, Ctrl+R for reverse search

Essential Aliases

# Git shortcuts
g='git'
gs='git status'
ga='git add'
gc='git commit'
gp='git push'

# Development tools
art='php artisan'
nr='npm run'
py='python3'

# System utilities
ll='ls -alF'
ports='lsof -i -P -n | grep LISTEN'
myip='curl -s ifconfig.me'

🎨 Customization

Personal Configuration

If you need personal modifications:

cp ~/.config/starship.toml ~/.config/starship-personal.toml
export STARSHIP_CONFIG=~/.config/starship-personal.toml

Common Customizations

# Hide AWS context entirely
[aws]
disabled = true

# Change prompt symbol
[character]
success_symbol = "[β†’](bold green)"
error_symbol = "[β†’](bold red)"

# Show more git information
[git_status]
format = '([\[$all_status$ahead_behind\]]($style) )'

Using Example Configurations

# Use minimal configuration
cp examples/minimal.toml ~/.config/starship.toml

# Use advanced configuration
cp examples/advanced.toml ~/.config/starship.toml

πŸ”§ Troubleshooting

Symbols Not Displaying

Problem: Seeing boxes or question marks instead of symbols

Solution: Install and configure Nerd Font

# macOS
brew tap homebrew/cask-fonts
brew install font-jetbrains-mono-nerd-font

# Linux
./fonts/install-fonts.sh

Then configure your terminal:

  1. Set font to "JetBrains Mono Nerd Font"
  2. Use 12pt or larger size
  3. Enable Unicode support

Slow Performance

Problem: Prompt feels sluggish (>100ms)

Solutions:

  1. Check repository size: du -sh .git
  2. Increase timeout: command_timeout = 5000 in starship.toml
  3. Disable git status temporarily: [git_status] disabled = true

Configuration Errors

Problem: Starship shows configuration errors

Solutions:

  1. Check syntax: starship config
  2. Verify file location: ls -la ~/.config/starship.toml
  3. Restart shell: source ~/.zshrc

Installation Issues

Problem: Installer doesn't respond to input when using the one-command method

Solution: Use the interactive installation method instead:

curl -fsSL https://raw.githubusercontent.com/bu-ist/starship-config/main/install.sh > /tmp/install-starship.sh
chmod +x /tmp/install-starship.sh
/tmp/install-starship.sh

Alternative: Use the pre-answered version:

echo "1" | curl -fsSL https://raw.githubusercontent.com/bu-ist/starship-config/main/install.sh | bash

If the automated installer doesn't work:

  1. Check internet connection
  2. Verify GitHub repository access
  3. Try manual installation steps above
  4. Check for permission issues

πŸ“‹ Team Benefits

Consistency

  • Same prompt experience across all team members
  • Standardized aliases and shortcuts
  • Consistent git workflow indicators

Productivity

  • 30% reduction in context-switching commands
  • Faster navigation with smart aliases
  • Better history and completion

Onboarding

  • New team members get productive setup immediately
  • Comprehensive documentation and examples
  • Automated installation process

πŸ”„ Maintenance

Updating Configuration

# Backup current config
cp ~/.config/starship.toml ~/.config/starship.toml.backup

# Download latest
curl -fsSL https://raw.githubusercontent.com/bu-ist/starship-config/main/starship.toml -o ~/.config/starship.toml

# Test new configuration
starship config

Upgrading Starship

# macOS
brew upgrade starship

# Linux
curl -sS https://starship.rs/install.sh | sh

πŸ“š Resources

🀝 Contributing

Reporting Issues

  1. Check existing issues
  2. Include your OS, terminal, and error details
  3. Provide steps to reproduce

Suggesting Improvements

  1. Open an issue describing the improvement
  2. Explain how it benefits the team
  3. Include configuration examples if applicable

Maintained by: BU IS&T Development Team
Version: 1.0.0
Last Updated: May 2025

About

Installation and Management of Starship terminal prompt

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages