Home

Awesome

<div align="center"> <a href="https://codely.tv"> <img src="https://user-images.githubusercontent.com/1331435/141520189-90349bbd-3e0f-4200-8b76-f4297be11898.png" /> </a> </div> <div align="center"> <h1>āš”ļø Simple and fast dotfiles framework āš”ļø</h1> <strong>The path to increasing your productivity on macOS, Linux and WSL</strong> </div> <br> <p align="center"> <a href="https://github.com/CodelyTV"><img src="https://img.shields.io/badge/CodelyTV-OS-green.svg?style=flat-square" alt="codely.tv"/></a> <a href="https://pro.codely.tv"><img src="https://img.shields.io/badge/CodelyTV-PRO-black.svg?style=flat-square" alt="CodelyTV Courses"/></a> <a href="https://github.com/CodelyTV/dotly/actions"><img src="https://github.com/CodelyTV/dotly/workflows/CI/badge.svg" alt="CI pipeline status"/></a> </p>

dotly is a dotfiles framework built on top of zim, one of the fastest zsh existing frameworks. It creates an opinionated dotfiles structure to handle all your configs and scripts.

šŸš€ Installation

Using wget:

bash <(wget -qO- https://raw.githubusercontent.com/CodelyTV/dotly/HEAD/installer)

Or using curl:

bash <(curl -s https://raw.githubusercontent.com/CodelyTV/dotly/HEAD/installer)

šŸ³ Try it in Docker

You can safely install additional software and make any changes to the file system. Once you exit zsh the image is deleted.

<details> <summary>Using Alpine:</summary>
docker run -e TERM -e COLORTERM -e LC_ALL=C.UTF-8 -w /root -it --rm alpine sh -uec '
  apk add curl sudo bash zsh git g++ python3
  bash -c "$(curl -fsSL https://raw.githubusercontent.com/CodelyTV/dotly/HEAD/installer)"
  zsh'
</details> <details> <summary>Or using Ubuntu:</summary>
docker run -e TERM -e COLORTERM -w /root -it --rm ubuntu sh -uec '
  apt-get update
  apt-get install -y curl build-essential sudo
  su -c bash -c "$(curl -fsSL https://raw.githubusercontent.com/CodelyTV/dotly/HEAD/installer)"
  su -c zsh'
</details>

Restore your Dotfiles manually

Restore your Dotfiles with script

Using wget

bash <(wget -qO- https://raw.githubusercontent.com/CodelyTV/dotly/HEAD/restorer)

Using curl

bash <(curl -s https://raw.githubusercontent.com/CodelyTV/dotly/HEAD/restorer)

šŸ”’ You need to know your GitHub username, repository and install ssh key if your repository is private.

It also supports other git repos, but you need to know your git repository url.

šŸ’» Usage

šŸš¶ First steps

Once dotly is installed, the next step is to commit and push your dotfiles. Create a new repository in your GitHub named dotfiles and then copy the url. Then go to your dotfiles (cd "$DOTFILES_PATH") and execute:

git remote add origin YOUR_DOTFILES_REPO_URL &&
git add -A &&
git commit -m "Initial commit" &&
git push origin main

āš ļø It's recommended to commit every time you add/modify a config or script.

šŸŒš The dot command

dot is the core command of dotly. If you execute it, you'll see all your scripts.

{ā–ø} ~ dot -h
Usage:
   dot
   dot <context>
   dot <context> <script> [<args>...]
   dot -h | --help

šŸŒ“ Understanding your dotfiles folder structure

ā”œā”€ā”€ šŸ“ bin                 # External binaries/symlinks. This folder has preference in your $PATH
ā”œā”€ā”€ šŸ“ doc                 # Documentation of your dotfiles
ā”œā”€ā”€ šŸ“ editors             # Settings of your editors (vscode, IDEA, ā€¦)
ā”œā”€ā”€ šŸ“ git                 # git config
ā”œā”€ā”€ šŸ“ langs               # Config for programming languages/libraries
ā”œā”€ā”€ šŸ“ os                  # Specific config of your Operative System or apps
ā”œā”€ā”€ šŸ“ restoration_scripts # This will be execute when you restore your dotfiles in another computer/installation
ā”œā”€ā”€ šŸ“ scripts             # Your custom scripts
ā”œā”€ā”€ šŸ“ shell               # Bash/Zsh/Fish?ā€¦ configuration files
ā””ā”€ā”€ šŸ“ symlinks            # The config of your symlinks

āš™ļø Versioning configs

dotly allows you to version your apps' config files. Once you've found the config to version you should:

  1. Copy your config file inside your dotfiles so this will be the source of truth. E.g. cp ~/Library/Application Support/Code/User/settings.json $DOTFILES_PATH/editors/code/settings.json
  2. Symlink this file. To do this you should edit your $DOTFILES_PATH/symlinks/conf.YOUR-OS.yaml and add it. E.g. ~/Library/Application Support/Code/User/settings.json: editors/code/settings.json

šŸŽØ Customization

dotly includes an opinionated, minimal, very fast and powerful theme by default. You can configure it using the following parameters in your shell/exports.sh:

CODELY_THEME_MINIMAL=false|true  # If true the theme will only show the prompt status
CODELY_THEME_MODE="dark"|"light" # Use dark if you use dark colors, light if light
CODELY_THEME_PROMPT_IN_NEW_LINE=false|true           # If true the prompt will be in a newline
CODELY_THEME_PWD_MODE="short"|"full"|"home_relative" # short will show the first letter of each directory, full the full path and home_relative the full path relative to the $HOME dir
CODELY_THEME_STATUS_ICON_KO="ā–Ŗ" # The icon to show if the previous command failed. Useful if you're color blind

šŸ’¾ Default scripts

ā”œā”€ā”€ šŸ“ dotfiles
ā”‚  ā”œā”€ā”€ create # Creates the dotfiles scructure
ā”‚  ā””ā”€ā”€ import # Import an existing dotfiles
ā”œā”€ā”€ šŸ“ git
ā”‚  ā”œā”€ā”€ amend           # Amend a commit
ā”‚  ā”œā”€ā”€ apply-gitignore # Exlude all commited files that are inside the project .gitignore
ā”‚  ā”œā”€ā”€ changed-files   # Show all changed files to main
ā”‚  ā”œā”€ā”€ commit          # Add all files and then commit
ā”‚  ā”œā”€ā”€ contributors    # List contributors with number of commits
ā”‚  ā”œā”€ā”€ find            # Find commits by commit message
ā”‚  ā”œā”€ā”€ pretty-diff     # Show a pretty git diff using fzf (and copy selected path to the clipboard)
ā”‚  ā”œā”€ā”€ pretty-log      # Git log filtering
ā”‚  ā””ā”€ā”€ rm-file-history # Remove completely a file from the repo with its history
ā”œā”€ā”€ šŸ“ mac
ā”‚  ā”œā”€ā”€ brew     # Some brew utils
ā”‚  ā””ā”€ā”€ defaults # Some defaults utils to view your changes, import and export
ā”œā”€ā”€ šŸ“ package
ā”‚  ā”œā”€ā”€ add        # Install a package
ā”‚  ā”œā”€ā”€ dump       # Dump all installed packages
ā”‚  ā”œā”€ā”€ import     # Import previously dumped packages
ā”‚  ā””ā”€ā”€ update_all # Update all packages
ā”œā”€ā”€ šŸ“ self # Instead of `dot self` you can use direclty `dotly` in your terminal
ā”‚  ā”œā”€ā”€ debug           # Debug dotly
ā”‚  ā”œā”€ā”€ install         # Install dotly and setup dotfiles
ā”‚  ā”œā”€ā”€ lint            # Lint all dotly related bash files
ā”‚  ā”œā”€ā”€ static_analysis # Static analysis of all dotly related bash files
ā”‚  ā””ā”€ā”€ update          # Update dotly to the latest stable release
ā”œā”€ā”€ šŸ“ shell
ā”‚  ā””ā”€ā”€ zsh # ZSH helpers
ā””ā”€ā”€ šŸ“ symlinks
    ā””ā”€ā”€ apply # Apply all symlinks

šŸ’½ Alias

You can see the default aliases here. The most commonly used are:

šŸ“½ļø Feature showcase (Spanish)

For an in-depth look at the features offered by dotly, you can take a look at this video:

Watch the video

ā‰ļø Troubleshooting

You can execute dot self debug in parallel with another command to see the errors output.

šŸ¤ Contributing

šŸ˜Š Thanks

A lot of dotly concepts has been inspired by denisidoro/dotfiles

āš–ļø LICENSE

MIT Ā© CodelyTV