Created
January 27, 2026 22:29
-
-
Save jamesscottbrown/c938524c4439853533383ea463a977b3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| echo "=== exe.xyz Machine Setup ===" | |
| echo | |
| # --- APT Packages --- | |
| read -p "Packages to install with apt (space-separated): " packages | |
| if [ -n "$packages" ]; then | |
| echo "Installing: $packages" | |
| sudo apt update | |
| sudo apt install -y $packages | |
| echo "Done." | |
| fi | |
| echo | |
| # --- Node.js --- | |
| read -p "Install Node.js? [y/N]: " install_node | |
| if [[ "$install_node" =~ ^[Yy]$ ]]; then | |
| echo "Installing Node.js via nvm..." | |
| curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash | |
| export NVM_DIR="$HOME/.nvm" | |
| [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" | |
| nvm install --lts | |
| echo "Node.js installed: $(node --version)" | |
| fi | |
| echo | |
| # --- GitHub Token --- | |
| read -p "Save a GitHub access token? [y/N]: " save_token | |
| if [[ "$save_token" =~ ^[Yy]$ ]]; then | |
| echo | |
| echo "Create a token at: https://github.com/settings/personal-access-tokens/new" | |
| echo | |
| read -p "Paste your token: " token | |
| echo "$token" > ~/gh-token | |
| chmod 600 ~/gh-token | |
| echo "Token saved to ~/gh-token" | |
| echo | |
| echo "Logging into GitHub CLI..." | |
| gh auth login --with-token < ~/gh-token | |
| echo "Setting up git credential helper..." | |
| gh auth setup-git | |
| echo "GitHub CLI configured." | |
| fi | |
| echo | |
| # --- Git Config --- | |
| read -p "Git username: " git_name | |
| read -p "Git email: " git_email | |
| if [ -n "$git_name" ]; then | |
| git config --global user.name "$git_name" | |
| fi | |
| if [ -n "$git_email" ]; then | |
| git config --global user.email "$git_email" | |
| fi | |
| echo "Git configured." | |
| echo | |
| # --- Bash Aliases --- | |
| echo "Adding aliases to ~/.bashrc..." | |
| cat >> ~/.bashrc << 'EOF' | |
| # exe.xyz setup aliases | |
| alias yolo='claude --dangerously-skip-permissions' | |
| alias gst="git status -sb" | |
| alias ga="git add" | |
| alias gaa="git add -A" | |
| alias gcm="git commit -m" | |
| alias gpl="git pull" | |
| alias gps="git push" | |
| alias gll="git log --graph --date=short --pretty=format:'%Cgreen%h %Cblue%cd (%cr) %Cred%an%C(yellow)%d%Creset: %s'" | |
| alias glll="git log --graph --stat --date=short --pretty=format:'%Cgreen%h %Cblue%cd (%cr) %Cred%an%C(yellow)%d%Creset: %s'" | |
| alias gundo="git checkout" | |
| alias gd="git diff" | |
| alias gdtool="git difftool" | |
| alias greset="git reset HEAD" | |
| alias goops="git reset --hard HEAD" | |
| alias gsh="git stash" | |
| alias gnuke="git branch -D" | |
| alias gbr="git checkout -b" | |
| alias gba="git branch -a" | |
| alias squish="git commit -a --amend -C HEAD" | |
| EOF | |
| echo "Aliases added. Run 'source ~/.bashrc' or start a new shell to use them." | |
| echo | |
| echo "=== Setup complete ===" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment