Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ra101/alias-alchemy
Best way to download alias for fast setup (WIP)
https://github.com/ra101/alias-alchemy
alias aliases bash bashrc cli cmd curl deno gnu gnu-linux httpie javascript linux nodejs powershell productivity utility wget zsh zshrc
Last synced: 2 days ago
JSON representation
Best way to download alias for fast setup (WIP)
- Host: GitHub
- URL: https://github.com/ra101/alias-alchemy
- Owner: ra101
- License: mit
- Created: 2023-12-01T14:45:19.000Z (about 1 year ago)
- Default Branch: core
- Last Pushed: 2023-12-25T14:11:20.000Z (about 1 year ago)
- Last Synced: 2023-12-26T09:46:30.708Z (about 1 year ago)
- Topics: alias, aliases, bash, bashrc, cli, cmd, curl, deno, gnu, gnu-linux, httpie, javascript, linux, nodejs, powershell, productivity, utility, wget, zsh, zshrc
- Language: TypeScript
- Homepage: https://alias-alchemy.ra101.dev
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Alias Alchemy
The best way to download alias for fast setup.
Usage
Step 1: Using any of the following tools, send a
GET
request to alias alchemy domain with/withoutq (default all)
andsys (default: linux)
query parameters to download the composite alias file.
- Linux Path:
~/.alias.sh
- Windows Path:
%USERPROFILE%\\.alias.cmd
Using cURL
```bash
curl -L "alias-alchemy.ra101.dev?q=py,dj,docker&sys=linux" > ~/.alias.sh
```
Using Wget
```bash
wget "alias-alchemy.ra101.dev?q=py,dj,docker&sys=win" -O %USERPROFILE%\.alias.cmd
```
Other supported tools
HTTPie http -d [url] > [filepath]
Invoke-WebRequest Invoke-WebRequest [url] -O [filepath]
aria2 aria2c -c [url] > [filepath]
Postman GET [url] | Save to File
Any Tool [tool] [header: {'User-Agent': 'alal'}] [url] > [filepath]
Mirrors:
Step 2: Configure our system to auto-run the alias file whenever a terminal is launched. (This is just a first-time setup)
Linux Setup
Assuming we saved the file at ~/.alias.sh
, run the following command
```bash
# Append `Executing Command (source)` in the shell's configuration profile.
## Bash
grep -qxF 'source ~/.alias.sh' ~/.bashrc || echo 'source ~/.alias.sh' >> ~/.bashrc
## ZSH
grep -qxF 'source ~/.alias.sh' ~/.zshrc || echo 'source ~/.alias.sh' >> ~/.zshrc
```
Windows Setup
Assuming we saved the file at %USERPROFILE%\\.alias.cmd
, run the following command in Administrator Mode
```batch
REM Adding `AutoRun` key (string) in Windows registry and setting the value to the file path.
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor" /f /v "AutoRun" /t REG_SZ /d "%USERPROFILE%\.alias.cmd"
```
Step 3: After creating the alias file and configuring our system, another operation that can be performed is appending the alias file using the >>
operator. It is perhaps the reason why this project exists.
```bash
# Using Direct Command
curl -L "alias-alchemy.ra101.dev?q=kubernetes" >> ~/.alias.sh
# Using Alias
fetch-alias kubernetes >> ~/.alias.sh
```
Alias Details
Python (py) Aliases
Linux Aliases (
.python.alias.sh
) ```bash
# Python Aliases
```
Windows Aliases (
.python.alias.cmd
) ```bash
# Python Aliases
```
Docker (dc) Aliases
Linux Aliases (
.docker.alias.sh
) ```bash
# Docker Aliases
```
Windows Aliases (
.docker.alias.cmd
) ```bash
# Docker Aliases
```
Django (dj) Aliases
Linux Aliases (
.django.alias.sh
) ```bash
# Django Aliases
```
Windows Aliases (
.django.alias.cmd
) ```bash
# Django Aliases
```