zs: One Command to Rule Your Zed Setup
TL;DR: Tired of manually configuring Zed for every project? Just run zs
. It auto-detects your project type, installs debug dependencies, creates tasks, and sets up git hooks. Zero configuration required.
curl -sSL https://raw.githubusercontent.com/AnjanJ/zs/main/install.sh | bash
cd any-project
zs
β
Rails project ready (15 tasks, debugging enabled)
The Problem
Every time I switched projects in Zed, I found myself:
- π§ Manually creating
.zed/tasks.json
for that specific framework - π Setting up debug configurations (that never quite worked)
- π¦ Installing language-specific debug adapters
- π Configuring different git hooks for work vs personal projects
- π€ Googling the same configurations over and over
Multiply this by switching between Rails, React, Python, and Elixir projects daily... you get the idea.
The Solution: zs
After one too many manual setups, I decided to automate everything. The goal? Zero cognitive load.
cd ~/work/canvas-lti-app
zs
β
Rails project ready (21 tasks, debugging enabled)
β Work project: commits need 'Refs: JIRA-XXXX'
That's it. No flags. No options. No decisions.
How It Works
zs
is built on a simple philosophy: The best interface is no interface.
When you run zs
, it:
-
Detects your project type automatically
- Rails? β (Gemfile + config/application.rb)
- React? β (package.json with react dependency)
- Python? β (requirements.txt)
- Elixir? β (mix.exs)
-
Installs only what Zed needs
- Ruby:
debug
gem (provides rdbg) - Python:
debugpy
- Elixir:
elixir-ls
- Nothing else - no
bundle install
ornpm install
- Ruby:
-
Creates proper configurations
-
.zed/tasks.json
with framework-specific tasks -
.zed/debug.json
with working debug configs (using Zed's format, not VS Code's!)
-
-
Configures smart git hooks
- Work projects: Reminds about JIRA tickets
- Personal projects: Standard format
- Never blocks, just reminds
-
Reports success in one line
β Project ready (15 tasks)
β οΈ Note on Debugging Support
Debugging in Zed is still evolving, and we're actively testing configurations:
-
Ruby: Experimental support via
debug
gem -
Python: Full support with
debugpy
- JavaScript/TypeScript: Full support
- Elixir: Not yet supported in Zed
We're updating configurations as Zed's debugging capabilities mature. Your mileage may vary!
Real-World Examples
Rails Project
// Auto-generated .zed/tasks.json includes:
{
"label": "π Rails Server",
"command": "bundle",
"args": ["exec", "rails", "server"]
},
{
"label": "π§ͺ Run Current Test File",
"command": "bundle",
"args": ["exec", "rspec", "$ZED_FILE"]
},
// ... 13 more tasks
Work vs Personal Context
# Personal project
cd ~/code/my-app
zs
β
Rails project ready (15 tasks, debugging enabled)
# Work project (auto-detected from path)
cd ~/work/enterprise-app
zs
β
Rails project ready (21 tasks, debugging enabled)
β Work project: commits need 'Refs: JIRA-XXXX'
Smart Caching
# First run
zs
β
React project ready (16 tasks, debugging enabled)
# Run again
zs
β
Already configured (react project)
The Hidden Power
While the interface is minimal, zs
packs some smart features:
- 30-day refresh: Automatically updates stale configs
- Docker awareness: Adjusts commands for containerized environments
-
.nohooks
file: Disable git hooks when needed -
Force refresh:
zs force
(hidden feature for power users)
Performance
Setup time: < 100ms β‘
That's faster than opening the tasks menu in most editors.
Installation
# One-time install
curl -sSL https://raw.githubusercontent.com/AnjanJ/zs/main/install.sh | bash
source ~/.zshrc
# Then forever
cd any-project
zs
The Philosophy
After building increasingly complex configurations, I realized the best solution was radical simplification:
- β 10+ commands β β 1 command
- β Multiple flags β β 0 flags
- β Verbose output β β 1 line
- β Manual validation β β Automatic
- β Decision fatigue β β Zero decisions
As Antoine de Saint-ExupΓ©ry said: "Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away."
Open Source
zs
is MIT licensed and open for contributions. The entire brain is just 231 lines of shell script.
π GitHub: AnjanJ/zs
Special features for contributors:
- Plugin system for custom project types
- Team configurations via
.zsrc
- CI/CD ready with GitHub Actions
What's Next?
Currently, zs
supports:
- Rails / Ruby
- React / Node.js
- Python
- Elixir
- LTI projects
- Docker environments
Want support for your stack? PRs welcome!
Try It Now
If you use Zed and switch between projects, give zs
a try:
curl -sSL https://raw.githubusercontent.com/AnjanJ/zs/main/install.sh | bash
Then just run zs
in any project. That's it.
One command. Zero configuration. Pure productivity.
If zs
saves you time, give it a star on GitHub. If you have ideas for improvement, I'd love to hear them!
What repetitive tasks do you automate in your development workflow? Let me know in the comments!
Anjan Jagirdar is a developer who believes the best tools get out of your way. When not automating workflows, he's probably debugging why his automation isn't working.
Top comments (0)