Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add bash shell install script #44

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
33 changes: 22 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Localias is a tool for developers to securely manage local aliases for development servers.

Use Localias to redirect `https://server.test` → `http://localhost:3000` in your browser and on your command line.
Use Localias to redirect `https://server.test` → `http://localhost:3000` in your browser and on your command line.

<img width="464" alt="iTerm showing the most basic usage of Localias" src="https://github.com/peterldowns/localias/assets/824173/5b0121df-237e-47e7-92b8-d09017fcf95f.png">

Expand Down Expand Up @@ -52,6 +52,17 @@ nix run github:peterldowns/localias -- --help
nix profile install --refresh github:peterldowns/localias
```

#### Bash
```bash
curl -sS https://raw.githubusercontent.com/peterldowns/localias/refs/heads/main/install.sh | sh -s
```

Or, for a non-interactive install:

```bash
curl -sS https://raw.githubusercontent.com/peterldowns/localias/refs/heads/main/install.sh | sh -s -- --yes
```

#### Manually download binaries
Visit [the latest Github release](https://github.com/peterldowns/localias/releases/latest) and pick the appropriate binary. Or, click one of the shortcuts here:
- [darwin-amd64](https://github.com/peterldowns/localias/releases/latest/download/localias-darwin-amd64)
Expand Down Expand Up @@ -176,7 +187,7 @@ $ localias run
This will prompt you to authenticate at least once. Each time Localias runs, it will

- Automatically edit your `/etc/hosts` file and add entries for each of your aliases.
- Sign TLS certificates for your aliases, and generate+install a custom root certificate to your system if it hasn't done so already.
- Sign TLS certificates for your aliases, and generate+install a custom root certificate to your system if it hasn't done so already.

Each of these steps requires sudo access. But starting/stopping Localias will only prompt for sudo when it needs to, so if you hit `control-C` and restart the process you won't get prompted again:

Expand Down Expand Up @@ -213,19 +224,19 @@ will need to explicitly reload the daemon:
# Start with frontend.test -> 3000
localias set frontend.test 3000
localias start
# Update frontend.test -> 4004.
# Update frontend.test -> 4004.
localias set frontend.test 4004
# The daemon will still be running with frontend.test -> 3000, so
# to apply the new changes you'll need to reload it
localias reload
```

# Using the CLI
# Using the CLI

`localias` has many different subcommands, each of which is documented
(including usage examples). To see the available subcommands, run `localias`. To
see help on any command, you can run `localias help $command` or
`localias $command --help`.
`localias $command --help`.

```console
$ localias
Expand All @@ -246,7 +257,7 @@ Examples:
localias list
# Clear all aliases
localias clear

# Start the proxy server as a daemon process
localias start
# Show the status of the daemon process
Expand Down Expand Up @@ -288,11 +299,11 @@ Localias is the tool I've always wanted to use for local web development. After
Finally, [my friend Justin wanted this to exist, too](https://twitter.com/jmduke/status/1628034461605539840?s=20):

> I swear there's a tool that lets me do:
>
> localhost:8000 → application.local
> localhost:3000 → marketing.local
> localhost:3002 → docs.local
>
>
> localhost:8000 → application.local
> localhost:3000 → marketing.local
> localhost:3002 → docs.local
>
> But I can't for the life of me remember the name of it. Does anyone know what I'm talking about?

## Why not hotel/chalet?
Expand Down
Loading