Releases: fmatsos/shellkit
Release list
shellkit v1.1.0
Added
-
Six built-in blocks, all in the default format. Each one shows only when it has something to say.
{ticket}: the ticket id in the branch name (feature/SHOP-42_cart→SHOP-42), as a link to your tracker. It needsSHKIT_TICKET_URL, with{id}standing for the id.SHKIT_TICKET_PATTERNsets how the id is found.{review}: the approvals and unresolved threads of the branch's open merge / pull request, on GitLab (glab) and GitHub (gh). It is fetched in the background, like{mr}.{stack}: the health of one docker compose project, set withSHKIT_STACK. It showsshop ✓,shop 2 ✗ db,weborshop off.{duration}: how long the last command ran, fromSHKIT_DURATION_MINseconds (3 by default):12s,1m05s,2h03m.{status}: why the last command failed:✗ 2, or✗ INTfor a signal.{host}:user@host, but only over SSH or as root.
-
Notifications for long commands. When a command has run for
SHKIT_NOTIFY_AFTERseconds (30 by default), a desktop notification fromshellkitcomes when it ends. It shows a green check or a red error icon, the time taken and the full path. It usesnotify-sendon Linux andosascripton macOS. Over SSH, or on Linux without a display, it rings the terminal bell instead.- The notification holds only the command's name, never its full line.
- Interactive commands are skipped (
SHKIT_NOTIFY_IGNORE): editors, pagers,ssh,top, database shells,fgand the like, even behindsudo -Eor after&&. So are commands stopped with Ctrl+C or Ctrl+Z. SHKIT_NOTIFY=falseturns it off, andSHKIT_NOTIFY_TIMEOUTsets how long it stays on screen, in ms.
-
shkit doctorchecks the setup, one line per item:- versions, the locale and the Nerd Font;
jq,glab/ghand their logins, and docker;- the permissions of
~/.config/shkitandsecrets.sh, and settings still using the old names; - the update state, the theme and the plugins.
It exits with
1when something is broken.
Changed
- The settings are now named
SHKIT_*(SHKIT_FORMAT,SHKIT_COLOR_ACCENT,SHKIT_SHOW_MR…), instead ofPROMPT_*.- The old names still work everywhere: the environment,
settings.sh,theme.zsh, project files, plugin themes, and blocks that read$PROMPT_…as they render. shkit setrenames them in the file it edits.~/shellkit/shell/install-local.shrenames them in all your files at once, and keeps a.bakof each.shkit doctortells you which files still use them.- bash's and zsh's own
PROMPT_COMMAND,PROMPT_DIRTRIMandPROMPT_EOL_MARKare left alone.
- The old names still work everywhere: the environment,
- The default
SHKIT_FORMATis now'{host} · {dir} · {git} · {ticket} · {mr} {review} · {stack} · {docker} · {duration} · {status}'.- Until you set a ticket URL or a stack, the new things you may see are
user@hostover SSH, a long run's duration, a failure's status and a review. - Desktop notifications, or the bell over SSH, are on by default.
- Until you set a ticket URL or a stack, the new things you may see are
- If you already wrote your own
{ticket},{review},{stack},{duration},{status}or{host}block, inprompt.d/or in a plugin, it still wins over the built-in one. It now also shows in the default format. Remove it to get the built-in version.
Updating
Clones update on their own at the next shell start, at most once a day. To update now, run shkit update, then exec zsh in the shells that are already open. Then run shkit doctor.
Full changelog: v1.0.0...v1.1.0
shellkit v1.0.0
The first release of shellkit: a plain zsh / bash setup for Linux and macOS, with an async, themeable prompt that keeps every fact on one line and never makes you wait for the network.
Highlights
- Async prompt. Local facts are shown right away.
git fetch, the merge / pull request and its CI (GitLab viaglab, GitHub viagh) and unhealthy containers are fetched in the background, and the prompt redraws in place when they arrive. - Git at a glance. Branch, worktree, ahead / behind, changed files with a
+added −removedline count, and a rebase / merge / cherry-pick / revert / bisect in progress with its conflicts. - One info line. The right part (
{agents} · {quota}by default) ends the info line at the terminal's width, and the input line holds only the$. - Themes and blocks. The layout is a format string (
'{dir} · {git} · {mr}'), colors are roles and icons are variables. A block is a small zsh function, and slow data goes through a background cache. - Per-project settings. Another format or palette for one repository and everything below it.
- Plugins. Blocks and themes shared as git repositories. Each is checked against a JSON schema, and nothing is fetched or run until you confirm.
shkit plugin newscaffolds one. shkit. One command to change settings, create project files, manage plugins and update shellkit. Every change applies at once.- Self-updating. At shell startup, at most once a day, a clone fast-forwards to the latest release. Only versions that passed CI are installed, and local changes are never touched. Turn it off with
SHKIT_AUTO_UPDATE=false. - Shell comforts. Jump to a visited directory by its name, Esc Esc to toggle
sudo, an unlimited shared history with prefix search, and coloredman. - Bash fallback. The same options and aliases, with a deliberately minimal prompt.
- Secrets stay out. Machine settings, secrets, local aliases and themes live in
~/.config/shkit/, never in the repository.
Requirements
- Linux or macOS, zsh 5.8+ and git 2.31+.
jqfor{mr}on GitLab and for plugins.- Optionally
glab/ghanddocker, and bash 5.1+ for the fallback. - A Nerd Font (or Symbols Nerd Font as a fallback font) for the icons.
Install
git clone https://github.com/fmatsos/shellkit.git ~/shellkit
~/shellkit/zsh/install.sh
exec zshSee the documentation.