-
-
Save jlschrag/635ba89c5b6ab55091e346a1b46f04b5 to your computer and use it in GitHub Desktop.
Coder Setup
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
| # Obviously, read & understand these commands before running. You assume all responsibility for the results. | |
| # Fill out these variable values, and the rest of the script should run as is | |
| NAME="Your name" | |
| AUTHOR_EMAIL="commits@yourdomain.com" | |
| COMMITER_EMAIL="agent@yourdomain.com" | |
| GITHUB_USERNAME="your_username" | |
| REPO_NAME="your_repo" | |
| PI_PACKAGE_URL="git:github.com/jlschrag/pi_config" # Or one of your choosing | |
| # This allows you to mark agent commits but still have them show up on your GitHub commit graph. | |
| echo "export GIT_AUTHOR_NAME=\"$NAME\"" >> ~/.bashrc | |
| echo "export GIT_AUTHOR_EMAIL=\"$AUTHOR_EMAIL\"" >> ~/.bashrc | |
| echo "export GIT_COMMITTER_NAME=\"agent\"" >> ~/.bashrc | |
| echo "export GIT_COMMITTER_EMAIL=\"$COMMITER_EMAIL\"" >> ~/.bashrc | |
| source ~/.bashrc | |
| ssh-keygen -t ed25519 -C "$NAME" -f ~/.ssh/id_ed25519 -N "" -q | |
| eval "$(ssh-agent -s)" | |
| ssh-add ~/.ssh/id_ed25519 | |
| git config --global user.signingkey "$(cat ~/.ssh/id_ed25519.pub)" | |
| git config --global commit.gpgsign true | |
| git config --global gpg.format ssh | |
| curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash | |
| export NVM_DIR="$HOME/.nvm" | |
| [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
| [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" | |
| nvm install --lts | |
| npm install @mariozechner/pi-ai | |
| npm install @mariozechner/pi-agent-core | |
| npm install -g @mariozechner/pi-coding-agent | |
| mkdir Code && cd Code | |
| git clone "git@github.com:${GITHUB_USERNAME}/${REPO_NAME}.git" | |
| cd * | |
| pi install "git:github.com/jlschrag/pi_config" | |
| printf "\n\n\n--------------------------------------------------\nSetup complete\n\n" | |
| echo "Paste the following line into https://github.com/${GITHUB_USERNAME}/${REPO_NAME}/settings/keys/new" | |
| echo $(cat ~/.ssh/id_ed25519.pub) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment