__ _______ _ _ _____ __ _
\ \ / / ____| | /\ | | / ____| / _(_)
\ \ /\ / / (___ | | / \ _ _| |_ ___ | | ___ _ __ | |_ _ __ _
\ \/ \/ / \___ \| | / /\ \| | | | __/ _ \| | / _ \| _ \| _| |/ _ |
\ /\ / ____) | |____ / ____ \ |_| | || (_) | |___| (_) | | | | | | | (_| |
\/ \/ |_____/|______| /_/ \_\__,_|\__\___/ \_____\___/|_| |_|_| |_|\__, |
__/ |
|___/
Autoconfig is an opinionated configuration of Dev Environment on Windows Subsystem for Linux 2 (WSL2). It if fully automated, customisable if needed, and reversible way of doing on WSL2.
Originally created for my personal use, I decided to share Autoconfig with others who may find it beneficial.
It draws inspiration from Omakub, a script that configures the Ubuntu OS.
Autoconfig is an opinionated collection of configuration that I used and find beneficial to my workflow. Some of these include:
Installs and configures Oh My Posh and initialises customised version of quick-term
theme out of the box that is uncluttered and doesn't show useless information such as time, time to execute, weather, etc.
Configures the WSL in a way that you're VSCode terminal is slightly modified to show if the current git
folder is dirty
. Again clutter free and distraction free that provides only the information you need.
I've never had a problem typing cd ..
in less than half a second so that's not an alias I build. Instead, the aliases are such that it help understand the information in one glance such as
a. lsl
: Shows list of all files and directories in the current folder (without hidden .files) with visual cues about which is a directory by appending /
or an executable by appending *
. It is an alias for ls -lF
b. lsa
: Shows everything that lsl
does + hidden files. It is an alias for ls -AlF
c. c
opens up VSCode in current folder. Alias for code .'
Handy shortcuts for working with git. Divided in two components
a. gs
: Shortcut for git status
b. ga
: Shortcut for git add
c. gcm {flag} "<commit message>
: Shortcut for git commit -m
, but you also need to pass a flag. The flag is the type of commit with choices from the following
- FEAT (f) => "โจ FEAT: "
- FIX (b) => "๐ FIX: "
- REFACTOR (r) => "โป๏ธ REFACTOR: "
- DOCS (d) => "๐ DOCS: "
- STYLE (s) => "๐ STYLE: "
- PERF (p) => "โก๏ธ PERF: "
- TEST (t) => "๐ฌ TEST: "
- CHORE (c) => "๐ง CHORE: "
d. gcam {flag} "<commit message>
: Shortcut for git commit -am
.
e. gp
: Shortcut for git push
An example is show below of committing this readme changes.
Technically
gcm
andgcam
aren't aliases, but methods.
- Langauges and Version management
Autoconfig uses mise
for environment, dotfile, and version management. Autoconfig uses it to configured Node@LTS
, [email protected]
and npm@latest
at the global level. Per project you can always use mise
to specify which versions you need.
- AWS Developer Tools
Autoconfig not just installs AWS CLI
, AWS CDK
, and AWS SAM CLI
, but it also symlinks your Windows .aws
credentials if they exist so you don't have to redo the configuration in either place.
Tested on the following distributions:
- Ubuntu 22.04 (Windows 11 + WSL2)
- Ubuntu 24.04 (Windows 11 + WSL2)
It may work on other distributions, but it has not been tested.
To use you can clone this repositorya and run autoconfig.sh
from the root directory.
git clone https://github.com/rehanhaider/autoconfig.git
cd autoconfig
./autoconfig.sh
By default the script will run in silent mode.
You can run the script in interactive mode by passing the -i
flag.
./autoconfig.sh -i
You will need to install nerd fonts and configure them in your Microsoft Terminal settings. A font is included in the font
directory.
Please note that Windows configuration is not currently supported, but may be added in future updates.