My BETA dotfiles for Ubuntu 20.04, Zsh, Oh My Zsh, TMUX, and NVim. Based on the RCM dotfile framework. This project is in development mode, so you may encounter bugs. Please don't use this if you're not familiar with these tools.
sudo apt update -y \
&& sudo apt upgrade -y \
&& sudo apt autoremove -y \
&& sudo apt install -y rcm# Create local dotfiles directory
mkdir -p ~/dotfiles-local
# Create example local dotfiles
touch ~/dotfiles-local/gitconfig.local
touch ~/dotfiles-local/aliases.local
# Clone dotfiles repository
git clone https://github.com/jesuserro/dotfiles.git ~/dotfiles
# Install the dotfiles (create symlinks)
env RCRC=$HOME/dotfiles/rcrc rcupAfter the initial installation, you can run rcup without setting the RCRC environment variable. This command will create symlinks for config files in your home directory:
rcupTo link any new files and install new vim plugins:
rcup
source ~/.zshrc
pkill -f tmuxYou can add vim support by doing this:
touch ~/.vim
mkrc ~/.vim
rcupFor more information on adding new files, visit RCM Documentation.
Create a directory for your personal customizations:
mkdir -p ~/dotfiles-localPut your customizations in ~/dotfiles-local appended with .local:
~/dotfiles-local/aliases.local~/dotfiles-local/gitconfig.local~/dotfiles-local/tmux.conf.local~/dotfiles-local/vimrc.local~/dotfiles-local/zshrc.local
Edit your ~/dotfiles/zshrc like this:
# Powerlevel10k instant prompt
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# Oh My Zsh configuration
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="powerlevel10k/powerlevel10k"
plugins=(
autoupdate
aws
colored-man-pages
colorize
composer
dirhistory
docker
extract
gh
git
history
jsontools
tmux
vi-mode
wp-cli
z
zsh-autosuggestions
zsh-completions
zsh-history-substring-search
zsh-syntax-highlighting
)
source $ZSH/oh-my-zsh.sh
# User configuration
[[ -f ~/.zshrc.local ]] && source ~/.zshrc.local # export apikeys here
[[ -f ~/.aliases ]] && source ~/.aliases
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zshCreates a new feature branch from dev, pushes it to the remote, and checks it out locally.
git start-feature 33-export-csvgit feat.
Merges dev into main, then merges your feature branch into dev, and finally deletes the feature branch (both locally and remotely). You can pass the feature name with or without the feature/ prefix.
git merge-cleanup 33-export-csv
# or
git merge-cleanup feature/33-export-csvMigration: Use git feat instead for the new workflow.
Brings changes from a specific Codex commit to your current branch, leaving the changes uncommitted for review. It's especially useful when working with branches generated by Codex/ChatGPT.
# Using full commit hash
git codexpick abc1234def5678
# Using abbreviated hash (minimum 4 characters)
git codexpick abc1Features:
- Verifies you're in a Git repository
- Checks that the working directory is clean
- Validates that the commit hash exists
- Supports abbreviated hashes (minimum 4 characters)
- Shows the full hash when using an abbreviated one
- Applies changes without committing (
-nflag) - Shows clear error messages
- Suggests solutions when there are conflicts
Para localizar el hash de un commit en una rama remota de Codex, puedes usar los siguientes comandos:
# 1. Actualizar la informaciΓ³n de las ramas remotas
git fetch origin
# 2. Ver el ΓΊltimo commit de la rama remota de Codex
git log origin/codex/nombre-de-la-rama -1
# 3. Ver todos los commits de la rama remota de Codex
git log origin/codex/nombre-de-la-rama
# 4. Ver los commits de forma mΓ‘s compacta
git log --oneline origin/codex/nombre-de-la-ramaCaracterΓsticas:
- Muestra el hash completo del commit
- Incluye el mensaje del commit
- Muestra la fecha y el autor
- Permite ver el historial completo de commits en la rama
- Formato compacto disponible con
--oneline
Integrates a feature branch into dev, archives the feature branch, and cleans up. This is the new workflow command that replaces the old git merge-cleanup.
# From any branch (including your feature branch)
git feat mi-nueva-funcionalidad
# The script automatically:
# 1. Moves to dev branch
# 2. Pulls latest changes from dev
# 3. Merges your feature into dev
# 4. Archives your feature branch as archive/feature/mi-nueva-funcionalidad
# 5. Deletes the original feature branch from remote
# 6. Ends up in dev branchFeatures:
- Works from any branch (automatically switches to dev)
- Detects feature branches with or without
feature/prefix - Checks for potential conflicts before merging
- Archives feature branches instead of deleting them completely
- Provides clear error messages and suggestions
- Validates clean working directory
Conflict Handling:
- Detects potential conflicts before merging
- If conflicts occur during merge, provides clear instructions
- Allows manual conflict resolution with helpful guidance
Creates a release by merging dev into main, running tests, and creating a version tag. This is the new workflow command for production releases.
# Release with automatic version (vYYYY.MM.DD_HHMM)
git rel
# Release with specific version
git rel 1.2.3
# Release skipping tests (when tests are failing)
git rel --force
# or
git rel --skip-tests
# Release with specific version and skipping tests
git rel 1.2.3 --force
# Show help
git rel --helpFeatures:
- Works from any branch (automatically switches to main)
- Runs tests automatically (detects multiple frameworks)
- Creates version tags automatically
- Supports manual version specification
- Provides options to skip tests when needed
- Interactive conflict resolution
Supported Test Frameworks:
- Node.js (
npm test) - Python (
pytest) - Java/Maven (
mvn test) - Java/Gradle (
./gradlew test) - Rust (
cargo test) - Go (
go test ./...) - PHP (
composer test) - Ruby (
bundle exec rspec) - Makefile (
make testormake tests) - Custom scripts (
scripts/test.sh)
Test Handling:
- Automatically detects and runs tests
- If tests fail, asks if you want to continue
- Option to skip tests completely with
--forceor--skip-tests - Provides helpful suggestions for test configuration
Changelog Generation:
- Automatically generates changelogs for each release
- Creates individual changelog files in
releases/directory - Updates main
CHANGELOG.mdwith recent releases - Categorizes commits by type (feat, fix, docs, etc.)
- Maintains last 5 releases in main changelog
Conflict Resolution:
- If
git relfails due to conflicts, usegit rel-resolveto handle them automatically - Detects and cleans up problematic files (like untracked directories)
- Provides step-by-step guidance for manual conflict resolution
- Automatically generates tags and changelogs after conflict resolution
Automatically resolves conflicts that occur during git rel and generates the missing tag and changelog. This is essential when the normal release process fails due to merge conflicts.
# Resolve conflicts and complete the release process
git rel-resolve
# Skip merge (if already resolved manually) and only generate tag/changelog
git rel-resolve --skip-merge
# Use a specific tag instead of auto-generated one
git rel-resolve --tag v1.2.3
# Show help
git rel-resolve --helpWhen to use:
- When
git relfails with merge conflicts - When you've manually resolved conflicts and need to complete the release
- When you need to regenerate tags and changelogs after a failed release
What it does automatically:
- π§Ή Cleans problematic files (like untracked directories that cause conflicts)
- π Attempts the merge of
devβmain - π·οΈ Creates the tag automatically (format:
vYYYY.MM.DD_HHMM) - π Generates the changelog using the corrected script
- π€ Pushes all changes to the repository
Complete workflow for conflicts:
# 1. Try normal release
git rel
# 2. If it fails with conflicts, use the resolver
git rel-resolve
# 3. If the resolver detects conflicts, it will guide you to resolve them manually
# 4. After manual resolution, complete the process:
git rel-resolve --skip-mergeGenerates professional changelogs for releases, categorizing commits and maintaining both individual release files and a main changelog.
# Generate changelog for a specific tag (auto-detects previous tag)
git changelog v1.2.3
# Generate changelog between two specific tags
git changelog v1.2.3 v1.2.2
# Show help
git changelog --helpFeatures:
- Automatically detects previous tag if not specified
- Categorizes commits by type (feat, fix, docs, chore, etc.)
- Creates individual changelog files in
releases/directory - Updates main
CHANGELOG.mdwith recent releases - Maintains professional formatting and structure
- Supports Conventional Commits format
Generated Structure:
proyecto/
βββ CHANGELOG.md # Last 5 releases (quick view)
βββ releases/ # Complete history by release
βββ v2024.01.15_1430.md
βββ v2024.01.20_0915.md
βββ v2024.01.25_1645.md
Example Output:
# Release v2024.01.15_1430
**Fecha:** 2024-01-15
## Changes
### Added
- feat(auth): implement OAuth2 authentication system
- feat(api): add user profile management endpoints
### Fixed
- fix(mobile): resolve login timeout issue
### Chores
- chore(deps): update security dependencies
## Technical Details
- Tag: v2024.01.15_1430
- Previous tag: v2024.01.10_0915
- Total commits: 15Enhanced script to perform add, commit, and push in a single command, with messages formatted according to the conventional standard.
# Basic usage (quick commit)
git-save
# With custom description
git-save "update configuration"
# With specific type
git-save feat "add Google login"
# With type and scope
git-save fix api "fix authentication endpoint error"Script to create commits with conventional format, allowing you to specify type, scope, and description.
# With type and description
git-cc feat "new feature"
# With type, scope, and description
git-cc fix api "fix authentication error"| Alias | Command | Description |
|---|---|---|
git prettylog |
git log --color=always --pretty=format:"%C(auto)%h %Cblue%ad %Cgreen%an %C(yellow)%s%Creset" |
Shows commit history with improved formatting |
git diffstat |
git diff --stat --color=always |
Shows change statistics |
git taglist |
`git for-each-ref --sort=-creatordate --format='π·οΈ %(refname:short) | %(creatordate:format:%Y-%m-%d %H:%M) |
git prettysince |
git log --color=always --pretty=format:"%C(auto)%h %Cblue%ad %Cgreen%an %C(yellow)%s%Creset" |
Shows commits added since a branch |
git prettyuntil |
git log --color=always --pretty=format:"%C(auto)%h %Cblue%ad %Cgreen%an %C(yellow)%s%Creset" |
Shows commits that need to be updated |
git rel-resolve |
bash ~/dotfiles/scripts/git_rel_resolve.sh |
Resolves conflicts from failed git rel and generates missing tag/changelog |
Here are some popular plugins to enhance your Oh My Zsh experience:
| Plugin | Git Command | Description |
|---|---|---|
| autoupdate | git clone https://github.com/TamCore/autoupdate-oh-my-zsh-plugins ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/autoupdate |
Automatically updates oh-my-zsh and its plugins. |
| aws | git clone https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/aws ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/aws |
Adds auto-completion for AWS CLI commands. |
| docker | git clone https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/docker ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/docker |
Adds auto-completion and aliases for Docker. |
| gh | git clone https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/gh ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/gh |
Adds auto-completion and aliases for GitHub CLI. |
| vi-mode | git clone https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/vi-mode ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/vi-mode |
Adds vi keybindings for command line editing. |
| wp-cli | git clone https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/wp-cli ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/wp-cli |
Adds auto-completion for WP-CLI commands. |
| z | git clone https://github.com/rupa/z ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/z |
Quickly navigates to directories you use frequently. |
| zsh-autosuggestions | git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions |
Suggests commands based on history as you type. |
| zsh-completions | git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-completions |
Provides additional completions for many commands. |
| zsh-history-substring-search | git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-history-substring-search |
Searches your command history by substring. |
| zsh-nvm | git clone https://github.com/lukechilds/zsh-nvm ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-nvm |
Manages Node.js versions. |
| zsh-syntax-highlighting | git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting |
Highlights syntax in your command line. |
Installing Github Copilot (gh) extension:
sudo apt update -y \
&& sudo apt install -y gh
gh extension install github/gh-copilotCursor CLI has been integrated into these dotfiles to provide AI-powered development assistance directly from the terminal.
Installation command:
curl https://cursor.com/install -fsS | bashExpected output:
Cursor Agent Installer
β Detected linux/x64
β Package downloaded and extracted
β Package installed successfully
β Bin directory ready
β Symlink created
β¨ Installation Complete!
Next Steps
1. Add ~/.local/bin to your PATH:
For zsh:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
2. Start using Cursor Agent:
cursor-agent
Happy coding! π
The dotfiles automatically configure Cursor CLI with:
- PATH Configuration:
~/.local/binis added to PATH in.zshrc(line 254) - Useful Aliases: Added to
aliasesfile:cursor.- Open Cursor in current directorycur- Shortcut forcursor-agentcura- Show Cursor CLI help
Basic commands:
# Open Cursor in current directory
cursor.
# Start Cursor Agent
cur
# Show help
curaPractical examples:
# Analyze and refactor code
cur "Analyze this Python project and suggest performance improvements"
# Generate code from scratch
cur "Create a REST API with FastAPI including JWT authentication and CRUD operations"
# Debug and fix errors
cur "This code has a bug, help me find and fix it"
# Generate documentation
cur "Generate complete documentation for this project including README and docstrings"
# Security audit
cur "Review this code for security vulnerabilities and suggest fixes"Authentication:
# Login to Cursor
cur login
# Check authentication status
cur status
# Logout
cur logoutShell Integration:
# Install shell integration for better terminal experience
cur install-shell-integration
# Uninstall shell integration
cur uninstall-shell-integration- AI-Powered Development: Get intelligent code suggestions and assistance
- Multi-Language Support: Works with any programming language
- Context Awareness: Maintains context of your current terminal session
- Script Integration: Can be integrated into development scripts
- Background Mode: Run in background for continuous assistance
- Model Selection: Choose between different AI models (GPT-5, Sonnet-4, etc.)
Background mode:
cur --backgroundPrint mode (for scripts):
cur --print "Generate a Dockerfile for this Node.js app"Specific model:
cur --model gpt-5 "Optimize this database query"Force mode (allows all commands):
cur --force "Refactor this entire codebase"curl 'https://raw.githubusercontent.com/jesuserro/dotfiles/main/termux/install.sh' | sh