Coder Social home page Coder Social logo

dot's Introduction

Version

dot is a bash script allowing users to manage their dotfiles.

Prerequisites

  • bash 4.0 or higher
  • gum
  • stow
  • git

๐Ÿงฐ Installation

Using dot

Clone the repository in the recommended location

git clone [email protected]:alexis-moins/dot.git ~/.dot

Go into the install directory and execute the install script:

./install

The last command creates a symbolic link to the dot script in the ~/.local/bin/ directory (you can also change the link destination path by passing it as an argument to the install script).

If you did not clone the repository in ~/.dot, don't forget to set the DOT_INSTALL_DIR environment variable globally afterwards!

Manually

Clone the repository then move the dot script to anywhere in your PATH, and ensure it is executable!

๐ŸŒฑ Quick Start

After installing, you can follow these steps to quickly see how it works:

# Initialize an empty dotfiles repo
dot init

# Or clone your dotfiles
dot init [email protected]:alexis-moins/dotfiles.git

# Add a new config file to your dotfiles
dot add ~/.bashrc

# Ensure the file was added
dot status

# Show git diff
dot diff .bashrc

# Remove the original file
rm ~/.bashrc

# Create symlinks to your dotfiles in $HOME
dot install

# Stage one or more files
dot stage .bashrc

# Save your changes...
dot commit "feat: add .bashrc"

# ...and push them to your remote!
dot git push

๐Ÿšฆ Usage

$ dot

dot - dotfiles manager

Usage:
  dot COMMAND
  dot [COMMAND] --help | -h
  dot --version | -v

Commands:
  help        Show help about a command
  link        Create a link to the dot script
  unlink      Remove the link to the dot script
  update      Update dot to the latest version
  env         Show environment information
  dir         Show dotfiles directory

Dotfiles Commands:
  init        Initialize a dotfiles repository or clone one
  edit        Edit your dotfiles
  install     Install dotfiles using symbolic links
  uninstall   Remove symbolic links from /Users/alexis
  list        List files from your dotfiles
  filter      Filter files from your dotfiles
  cd          Navigate to your dotfiles in a new shell
  add         Add files to your dotfiles

Git Commands:
  status      Show the status of your dotfiles
  stage       Stage files
  unstage     Unstage files
  restore     Restore unstaged files (undo changes)
  diff        Show interactive diff with last commit
  commit      Commit changes
  git         Run git commands within your dotfiles

Options:
  --help, -h
    Show this help

  --version, -v
    Show version number

Environment Variables:
  EDITOR
    Editor to use for interactive commands
    Default: vim

  DOT_INSTALL_DIR
    Directory where the repository was cloned
    Default: ~/.dot

  DOTFILES_DIR
    Directory containing your dotfiles
    Default: ~/dotfiles

dot's People

Contributors

alexis-moins avatar

Stargazers

 avatar  avatar Alexandre Sparton avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.