Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 17 additions & 14 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
# LinuxWizards
# AGENTS.md

- Run the `*Wizard.sh` entrypoints from the repo root. They `source ./src/...` with relative paths, so launching them from a subdirectory breaks.
- The top-level scripts are thin wrappers; put shared logic in `src/common.sh` and area-specific logic in `src/<area>/*.sh`.
- These entrypoints are not standalone downloads. They depend on the checked-out `src/` tree.
- `src/templates/` is the source for files `repoWizard.sh` copies into new repos. Edit templates, not generated repos, when changing scaffold content.
- `src/repo/agents.sh` and `src/repo/mdtomdc.sh` generate agent-support folders/symlinks. Keep them in sync with any `.agents/rules` changes.
- `aliasWizard.sh` only supports bash/zsh. It copies `src/scripts/.aliases` to `~/.aliases`, appends source blocks to `~/.bashrc` or `~/.zshrc`, and installs helper scripts from `src/scripts/` into `~/bin`.
- If you add or rename helpers under `src/scripts/`, update `aliasWizard.sh` so the installed set stays in sync.
- `gitWizard.sh` creates an `ed25519` SSH key, starts `ssh-agent`, and writes global Git config, including SSH signing when `~/.ssh/id_ed25519.pub` exists.
- `softwareWizard.sh`, `debianWizard.sh`, and `z.sh` are privileged, networked installers. They modify apt state and user config such as `~/.ssh`, `~/.dircolors`, `~/.config/ghostty/config`, `~/.bashrc`, and `~/.zshrc`.
- `debianWizard.sh` re-execs itself with `sudo` when needed and is intended for Debian 13.
- `z.sh` expects MesloLGS Nerd Font for Powerlevel10k.
- `repoWizard.sh` initializes a new repo from the templates, makes an initial `🎉 Project created!` commit, and switches the new repo to `dev`.
- There is no package manager, formatter, or test runner configured here; for shell edits use `bash -n <file>` and a disposable run of the affected wizard.
## Repo Shape
- Root `*.sh` files are the entrypoints: `softwareWizard.sh`, `gitWizard.sh`, `aliasWizard.sh`, `repoWizard.sh`, `debianWizard.sh`, and `z.sh`.
- Shared code lives in `src/common.sh` and the `src/<wizard>/` folders; scripts source files with repo-relative paths like `./src/common.sh`, so run them from the repository root.
- `repoWizard.sh` is the repo scaffolder. It copies templates from `src/templates/` and can create `.agents/`, `.cursor/`, `.opencode/`, `.claude/`, `.agent/`, and `.github/` support trees depending on the chosen agent target.

## Commands
- Run a wizard directly from the repo root, for example `./softwareWizard.sh` or `./repoWizard.sh`.
- `repoWizard.sh` makes an initial `git commit -m "🎉 Project created!"` and switches to a new `dev` branch.
- `aliasWizard.sh` writes `~/.aliases`, appends shell source blocks to `~/.bashrc` or `~/.zshrc`, and installs helper scripts into `~/bin`.
- `gitWizard.sh`, `softwareWizard.sh`, `debianWizard.sh`, and `z.sh` make system changes and may require `sudo`.

## Repo Conventions
- `src/common.sh` is shared utility code and should not be executed directly.
- `NO_COLOR` disables colored output in shared helpers.
- The repo is Bash-only; there is no package manager or test runner to discover here.
- `src/templates/README.md` is a scaffold template, not the project README.
1 change: 0 additions & 1 deletion CLAUDE.md

This file was deleted.

2 changes: 1 addition & 1 deletion aliasWizard.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

source ./src/common.sh
source ./src/alias/welcome.sh
source ./src/welcome/welcome_alias.sh

ALIAS_SOURCE_BLOCK='if [[ -f ~/.aliases ]]; then
. ~/.aliases
Expand Down
2 changes: 1 addition & 1 deletion debianWizard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ root_test(){
fi
}

source ./src/deb/welcome.sh
source ./src/welcome/welcome_deb.sh

set_timezone(){
dots "Setting timezone to America/Mexico_City"
Expand Down
2 changes: 1 addition & 1 deletion gitWizard.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

source ./src/common.sh
source ./src/git/welcome.sh
source ./src/welcome/welcome_git.sh

# Global variables
git_username=""
Expand Down
2 changes: 1 addition & 1 deletion repoWizard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
WIZARD_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

source ./src/common.sh
source ./src/repo/welcome.sh
source ./src/welcome/welcome_repo.sh
source ./src/repo/devcontainer.sh
source ./src/repo/agents.sh

Expand Down
2 changes: 1 addition & 1 deletion softwareWizard.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

source ./src/common.sh
source ./src/software/welcome.sh
source ./src/welcome/welcome_software.sh

install_packages() {
dots "Installing essential APT packages"
Expand Down
13 changes: 7 additions & 6 deletions src/scripts/.aliases
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ alias untar='tar -xf'
# Docker shortcuts
alias dc='docker'
alias dcu='docker compose up -d'
alias dcd='docker compose down'
alias dci='docker images'
alias dcps='docker ps'
alias dcpsa='docker ps -a'
alias dcrm='docker rm'
alias dcps='docker ps -a'
alias dcrm='docker rm -f'
Comment on lines +54 to +57
alias dcrmi='docker rmi'
alias dockerclean='docker system prune -a --volumes'

Expand Down Expand Up @@ -92,14 +92,15 @@ alias gitunstage='git reset HEAD --'
alias gitrepair='sudo chown -R "$(whoami)":"$(id -gn)" .git'
alias gitlocal='git config --local commit.gpgsign false'
alias cleanremote='git fetch origin --prune'
alias deleteremote ='git push origin --delete'
alias deleteremote='git push origin --delete'

# AI Agents
alias cld='claude'
alias ocd='opencode'

# Miscellaneous
alias h='history'
alias rootrc='code .bashrc --no-sandbox --user-data-dir'
alias rootzrc='code .zshrc --no-sandbox --user-data-dir'
alias rootaliases='code .aliases --no-sandbox --user-data-dir'
alias rootaliases='code .aliases --no-sandbox --user-data-dir'
alias h='history'
search() { history | grep "$1" | tail -n 10; }
15 changes: 0 additions & 15 deletions src/scripts/search

This file was deleted.

2 changes: 1 addition & 1 deletion src/templates/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# New Project
# New Project
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 2 additions & 18 deletions z.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/env bash

source ./src/common.sh
source ./src/zsh/welcome.sh
source ./src/welcome/welcome_zsh.sh

ghostty_configs() {
if command_exists ghostty; then
dots "Adding ghostty configs"
printf '%s\n' "theme = Homebrew" >> ~/.config/ghostty/config
printf '%s\n' "theme = Vercel" >> ~/.config/ghostty/config
printf '%s\n' "bell-features = no-title,no-attention" >> ~/.config/ghostty/config
printf '%s\n' "shell-integration-features = ssh-env" >> ~/.config/ghostty/config
return 0
Expand All @@ -17,20 +17,6 @@ ghostty_configs() {
fi
}

set_colors() {
dots "Setting custom dircolors"

cat > ~/.dircolors <<'EOF'
# Directories (More contrast than blue)
DIR 01;36
# Symlinks and executables (optional)
LINK 01;35
EXEC 01;32
EOF

return 0
}

install_zsh() {
dots "Installing zsh shell"
sudo apt-get install -y zsh
Expand Down Expand Up @@ -78,8 +64,6 @@ finish_setup() {
main() {
welcome
ghostty_configs
set_colors
update_system
install_zsh
setup_zsh_theme
activate_zsh
Expand Down