Cron Sense
Hover tooltips that translate cron schedules into human-readable English. Inspired by tumido/cron-explained (Tom Coufal).
How to install
With Forge Super installed, the button above opens the app on this extension, where you press Install. Nothing is installed until you do.
You can also open the Extensions panel in the app and search for Cron Sense. The extension's id is cron-sense-lsp.
Don't have Forge Super yet? Download it here.
README
From the extension's repository, written by its authors and not by Mentenaz. See the source.
Cron Sense
Translate cron-like schedules into human-readable English inside Zed.
Extension ID: cron-sense-lsp
Inspired by the VS Code extension Cron Explained by Tom Coufal (@tumido) (VS Marketplace, Open VSX).
This is an independent, from-scratch reimplementation for Zed. It is not a fork of the original source and is not affiliated with the original author beyond credit for the concept and UX.
Features
Hover tooltips
Hover a cron expression in supported languages and get a plain-English explanation powered by cronstrue.
Supported language contexts include Shell Script, YAML, TOML, JSON, Dockerfile, JavaScript/TypeScript, Python, Ruby, Go, Rust, Markdown, and Plain Text.
Code action: insert as comment
Open the code actions menu on a cron expression (default: cmd-. / ctrl-.) and choose Insert cron explanation to append a comment on that line. Running it again replaces the previous explanation (no stacked comments).
Install (dev extension)
- Clone or open this repository.
- In Zed: Extensions → Install Dev Extension…
- Select the
cron-sensedirectory.
On first use, the extension installs the language server from npm as
cron-sense-lsp. That package
bundles the server script and its dependencies (cronstrue,
vscode-languageserver, …).
Settings
Optional LSP settings in your Zed settings.json:
{
"lsp": {
"cron-sense-lsp": {
"settings": {
"use24HourTimeFormat": true,
"verbose": true,
"dayOfWeekStartIndexZero": true,
"monthStartIndexZero": false,
"locale": "en"
}
}
}
}
| Setting | Description | Default |
|---|---|---|
use24HourTimeFormat | Use 24-hour clock in descriptions | true |
verbose | Prefer verbose descriptions | true |
dayOfWeekStartIndexZero | Day-of-week 1 = Monday (true) or Sunday (false, e.g. AWS) | true |
monthStartIndexZero | January as 0 vs 1 | false |
locale | Force a cronstrue locale | (unset) |
How it works
| Piece | Implementation |
|---|---|
| Extension (Wasm) | Resolves Node, installs cron-sense-lsp from npm via Zed APIs |
| Language server | Node package cron-sense-lsp (server/server.cjs + deps) |
The language server is not embedded in the extension package (Zed publishing
requirement). Source lives in server/ and is published to the public npm
registry.
Development
Requirements: Rust (with wasm32-wasip2 via rustup), Node, Zed.
# Typecheck / test the extension crate
cargo test --lib
cargo check --target wasm32-wasip2
# Smoke-test the language server locally
cd server && npm install && npm test
# or speak LSP over stdio:
npm start
Publishing the language server (npm)
cd server
npm login # once
npm version patch # or set version in package.json
npm publish --access public
Keep server/package.json version aligned with the extension when cutting a
release that depends on new server behavior.
Cutting an extension release
- Bump
versioninextension.tomlandCargo.toml(keep them equal). - Ensure the matching
cron-sense-lspversion is on npm (or rely on latest). - Tag
vX.Y.Zon this repo. - Open/update a PR on
zed-industries/extensionswith submoduleextensions/cron-sense-lspand matchingversioninextensions.toml.
Credits & acknowledgements
Inspiration
Cron Explained for VS Code / Open VSX
Author: Tom Coufal (@tumido)
License: GPL-3.0-or-later
Please support and star the original if you find the concept useful.
Libraries
- Translations:
cronstrueby Brady Holt - LSP stack:
vscode-languageserver
License
This repository is licensed under the MIT License.
That applies to this project’s code only. The original tumido/cron-explained project remains GPL-3.0-or-later under its own license.