dsh is a personal Bash shell configuration focused on fast day-to-day
operations, short Unix-style aliases, Kubernetes workflows, Git shortcuts,
network diagnostics, and a few convenience functions for development and
infrastructure work.
The main file is intended to be sourced into an interactive shell as ~/.dsh.
source ~/.dshDownload the Dunix Darkshell Operator Primer 2990
- Compact aliases for common Unix commands
- Git aliases and formatted
git logviews - Kubernetes aliases for
kubectl,kubectx, andkubens - Helper functions for pods, images, volumes, labels, events, resources, and node capacity
- TLS certificate inspection helpers using
openssl - Network helpers for
ping,curl,mtr, DNS, and routing - Simple dice RPG aliases using
shuf - Light/dark terminal-aware theme choices for
batand Git log colors - Bash completion wiring for custom Kubernetes aliases
Clone the repository or download the .dsh file:
git clone https://github.com/akosela/dsh.git
cp dsh/.dsh ~/.dshcurl -fsSL https://raw.githubusercontent.com/akosela/dsh/master/.dsh -o ~/.dshThen source it from your Bash startup file.
For Bash login shells, add this to ~/.bash_profile:
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fiFor interactive Bash shells, add this to ~/.bashrc:
if [ -f ~/.dsh ]; then
. ~/.dsh
fiReload your shell:
source ~/.bashrcor:
source ~/.bash_profileSet the terminal background mode near the top of .dsh:
terminal_background=light # light|darkThis controls theme choices for aliases such as b, glg, and lg.
For example, the bat alias uses a light theme when terminal_background=light and a dark theme otherwise.
If you use multiple Kubernetes config files, export KUBECONFIG before or inside .dsh:
export KUBECONFIG="$HOME/.kube/config-minikube:$HOME/.kube/config-rke:$HOME/.kube/config"Then verify contexts:
ctldsh defines short aliases for common shell tools:
alias l='ls'
alias ll='ls -Fl'
alias llh='ls -Flh'
alias c='cat '
alias g='grep'
alias gc='grep --color'
alias h='head'
alias t='tail'
alias m='man'
alias v='vi'
alias x='exit'It also provides dice RPG helpers using shuf:
alias d6='shuf -i 1-6 -n 1'
alias 2d6='shuf -i 1-12 -n 1'
alias d20='shuf -i 1-20 -n 1'
alias d100='shuf -i 1-100 -n 1'Common Git operations are shortened:
alias st='git status'
alias add='git add'
alias co='git checkout'
alias cm='git commit -am'
alias dif='git diff'
alias br='git branch -vv'
alias psh='git push'
alias pull='git pull'
alias rebase='git rebase'
alias stash='git stash'Formatted log aliases are also included:
glg
lgglg shows a graph log, while lg limits the output to the latest 10 commits.
dsh is heavily optimized for Kubernetes work.
Examples:
alias get='kubectl get'
alias des='kubectl describe'
alias app='kubectl apply'
alias del='kubectl delete'
alias log='kubectl logs'
alias exe='kubectl exec'
alias deb='kubectl debug'
alias ns='kubens'
alias ctl='kubectx'Short resource helpers include:
, # get pod
,e # get pod (with errors only)
gp # get pod
gpw # get pod -o wide
gn # get node
gs # get svc
gi # get ingress
gse # get secret
gcm # get configmap
gpv # get pv
gpvc # get pvcA wrapper around kubectl get that formats common resource types with awk and column.
get pod
get node
get svc
get deployment
get pvcShows Kubernetes events globally, by namespace, or for a pod.
eve
eve my-pod
eve my-pod -n my-namespace
eve -n my-namespaceLists container images used by pods.
img # current namespace
img -a # all namespaces
img my-pod # selected podShows pod volumes and volume mounts in a readable format.
vol my-podShows current resource usage and configured requests/limits for a pod.
res my-podShows recent container last-state information from kubectl describe pod.
laststate my-poddsh includes several OpenSSL wrappers:
tls host # print certificate details
tlsend host # print certificate expiration
tlspem host # print PEM certificate
tlsv host # verbose s_client output
tlscheck cert.pem cert.key # check whether an X.509 certificate and RSA private key match.Example:
tlsend example.compng host # short ping output
cu host # curl HTTPS headers and TLS summary
mtr host # report-mode mtr
mtr -t host # terminal mtr modeDNS and network-related aliases include:
alias a='ansible'
alias ap='ansible-playbook'
alias n='netstat -pant'
alias i='ip -br a'
alias r='ip r'Symmetric GPG encryption and decryption helpers:
enc file
dec file.gpgenc uses AES-256 and ASCII armor output.
The configuration works best with the following tools installed:
bashcoreutilsgitkubectlkubectxkubensbash-completionbatjqopensslgpgmtrcurlwatch
On macOS with MacPorts, some GNU tools are expected under:
/opt/local/libexec/gnubin
/opt/local/bindsh, or darkshell, is a small Unix-style shell environment imagined as
a fragment of a much older future: the command interface of Civilization
Y — Yotta.
In the twenty-first century, a nuclear world war destroyed most of human civilization. Nation-states vanished, global networks collapsed, and the accumulated machinery of the old world became either radioactive debris or half-understood myth. The few surviving groups endured in sealed shelters, underground facilities, mountain enclaves, and isolated technical colonies. Over centuries, one of these settlements grew into the City — known simply by that name because, for its inhabitants, there was no other city left.
The City became the last organized human colony on Earth.
Outside its walls lay the cold zones, the ruins, the contaminated industrial belts, and the territories of those who lived beyond civic order. Inside, humanity survived through discipline, rationing, technical continuity, and an almost religious respect for working systems. The old graphical interfaces of the pre-war world were gradually abandoned. They required too much power, too much visual complexity, too many opaque layers. The City’s engineers returned to the most durable interface humanity had ever built: text.
By the year 2990, the universal operating system of Civilization Y is Dunix — a distant descendant of Unix, Linux, BSD, and countless forgotten post-war operating systems. It is not a museum copy of the old systems, but their cultural and technical heir. Its philosophy is old and severe: small tools, clear text, pipes, files, permissions, processes, terminals. What survived was what could be repaired, transmitted, typed, audited, and understood.
dsh is the shell of that world.
It is not meant to be a large replacement for Bash, Zsh, or any modern shell. Instead, it is a fictionalized shell layer: a compact command environment that tries to evoke what a late-third-millennium terminal might feel like if it still carried the DNA of classic Unix. It favors short commands, aliases, terse status views, direct inspection, and fast movement through systems. It treats the command line not as a fallback for experts, but as the primary human-machine interface of a civilization rebuilt around terminals.
In Civilization Y, terminals are everywhere. They are embedded in maintenance corridors, archive rooms, reactor control panels, medical stations, hydroponic farms, transit gates, military bunkers, and personal workstations. A citizen of the City does not “open an app”; they enter a command. A technician does not click through dashboards; they query logs, inspect processes, trace routes, check certificates, list pods, tail events, and move through contexts. The terminal is both instrument and language.
The name darkshell reflects that setting. It is the shell used in a dark age after the old world: a command language for dim rooms, sealed habitats, emergency consoles, and surviving networks. It belongs to a future where computing has become more austere, not more decorative. Text is durable. Text can be copied by hand. Text can be transmitted over degraded links. Text can survive when every richer interface fails.
The project also has a retro-computing spirit. It deliberately leans
into the vocabulary of classic Unix: cat, grep, sed, awk, sort,
uniq, ps, df, du, strings, touch, tar, nc, dig, mtr,
and dozens of small operational commands. The aliases are not just shortcuts;
they are part of the imagined ergonomics of a future operator who lives in the
shell all day.
dsh therefore exists in two layers.
On the practical layer, it is a personal shell configuration: aliases, functions, prompt behavior, Kubernetes helpers, Git shortcuts, TLS inspection helpers, and small conveniences for daily Unix-like work.
On the fictional layer, it is a recovered interface artifact from Civilization
Y: a glimpse of the operating culture of the City in the year 2990, when
Dunix runs the remaining human infrastructure known as YANS (Yotta
Advanced Network System) and dsh is the shell through which operators speak
to machines.
The premise is inspired by old European post-apocalyptic science fiction,
especially stories of sealed cities, frozen zones, forgotten wars, and
humanity surviving inside the technical remains of a destroyed world. In
that tradition, dsh imagines a future where the most advanced interface is
not holographic or neural, but textual: a prompt, a command, and a response.
Civilization Y did not preserve everything.
It preserved enough.
And at the center of that survival is the terminal.
Andy Kosela andy.kosela@gmail.com
Project URL: https://github.com/akosela/dsh