Skip to content

nurefexc/env-craft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

EnvCraft — Zsh theme for developers

EnvCraft is a modular zsh theme designed for developers. It surfaces relevant context at a glance: git branch/status, remote tracking, stash count, language/tool indicators (Python, Node, Go, Ruby, Docker, Terraform, k8s, etc.), background job count, command timer and exit status. Icons use Nerd Fonts.

Features

  • Git: branch, short hash, dirty markers (modified, staged, untracked), stash count, ahead/behind.
  • Environment indicators: Conda/venv, Python/Node/Go/Ruby versions.
  • Project symbols: detects common files (Dockerfile, Terraform, package.json, Cargo.toml, etc.) and shows icons.
  • Path display adapts to terminal width (tiny / narrow / normal / wide).
  • Read-only directory marker.
  • Background jobs count.
  • Command timer (measures command runtime) and exit status shown in right prompt (RPROMPT).
  • Periodic prompt updates while long-running commands execute.

Requirements

  • zsh (recommended 5.0+)
  • git (for repository info)
  • Optional: docker, terraform, node, python, go, ruby — for richer indicators.
  • Nerd Fonts or another patched font to display icons correctly.

Installation

Manual (single-user)

# copy the theme somewhere (e.g. ~/.envcraft.zsh-theme)
cp envcraft.zsh-theme ~/.envcraft.zsh-theme

# source it from your ~/.zshrc (add this line)
source ~/.envcraft.zsh-theme

# start a new shell or run
source ~/.zshrc

Oh My Zsh

# copy to your Oh My Zsh themes directory
cp envcraft.zsh-theme $ZSH/themes/envcraft.zsh-theme

# set theme in ~/.zshrc
ZSH_THEME="envcraft"

Antigen / Zgen / zplug

  • Add the file to your dotfiles and source it in your plugin/theme loading step, or wrap as appropriate for your plugin manager.

Configuration & Environment

  • Update interval: __ENVCRAFT_UPDATE_INTERVAL (default 1 second). Export or set before sourcing if you want different behavior.
  • Internal globals: __ENVCRAFT_START_TIME, __ENVCRAFT_UPDATE_INTERVAL, LAST_EXIT_CODE — you normally don't need to change these.

Example: set a slower update interval

export __ENVCRAFT_UPDATE_INTERVAL=2
source ~/.envcraft.zsh-theme

Troubleshooting

  • Missing or garbled icons: install a Nerd Font and configure your terminal to use it.
  • Slow prompt: disable optional detections you don't need (e.g., heavy find calls) or reduce periodic updates by increasing __ENVCRAFT_UPDATE_INTERVAL.
  • If git calls are slow in very large repos, consider disabling portions of the git prompt or using a shallower status check.

License

EnvCraft is released under the MIT License. See the included LICENSE file at the repository root for full terms: ./LICENSE

About

EnvCraft is a modular zsh theme for developers that shows git branch/status, remote tracking, stash, language/tool indicators (Python, Node, Go, Ruby, Docker, Terraform, k8s), background job count, command timer and exit status — optimized for Nerd Fonts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages