Giter Club home page Giter Club logo

locdev's Introduction

locdev ๐Ÿ› ๏ธ

Crates.io GitHub Actions GitHub Releases

locdev is a handy CLI tool that simplifies the process of adding, removing, and listing entries in the hosts file. You no longer need to deal with manual and error-prone editing. Now, it's as simple as running a command.

Features

  • Add entries to the hosts file
  • Remove entries from the hosts file
  • Print the current entries in the hosts file

Installation

Download Compiled Binaries

You can download the compiled binaries for locdev from the GitHub Releases page. Choose the binary that corresponds to your operating system and architecture, and place it in a directory included in your system's PATH environment variable.

Install with Cargo

To install locdev using Cargo, you'll need to have Rust installed on your system. Once Rust is installed, you can install locdev with Cargo:

cargo install locdev

Usage

locdev [COMMAND]

Commands

  • add <ip> <hostname>: Add an entry to the hosts file with the specified IP and hostname
  • remove <ip> <hostname>: Remove the entry with the specified IP and hostname from the hosts file
  • list: Print the current entries in the hosts file

Examples

Add an entry to the hosts file:

sudo locdev add 127.0.0.1 dev.local

Remove an entry from the hosts file:

sudo locdev remove 127.0.0.1 dev.local

Print the current entries in the hosts file:

locdev list

Note

You need to use sudo to execute the add and remove commands, as the hosts file requires administrator privileges to modify its contents.

License

This project is available under the MIT License.

locdev's People

Contributors

dependabot[bot] avatar nrempel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ngriaznov

locdev's Issues

Thank you!

I found your project while i was browsing https://github.com/topics/localhost. I was looking for an easy way to setup a domain for localhost
After installing and trying the sudo locdev add 127.0.0.1 [myproject].local, i got an error message saying sudo: locdev: command not found.
Though the command works without sudo

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.