kode.sh
is a bash utility that simplifies opening projects with your preferred Integrated Development Environment (IDE). It allows you to quickly navigate to your project directories and launch them with your chosen IDE, all from the command line.
- Quickly open projects with your preferred IDE
- Support for multiple IDEs (Zed, VS Code, IntelliJ IDEA)
- Easily set and manage default project directories
- Add custom project locations
- Remembers your IDE preference for each project
- Simple command-line interface
-
Clone this repository:
git clone https://github.com/mambucodev/kode-script.git
-
Add the following line to your
.bashrc
or.zshrc
:source /path/to/kodesh/kode.sh
-
Reload your shell configuration:
source ~/.bashrc # or source ~/.zshrc if you're using Zsh
kode [OPTIONS] [PROJECT] [IDE]
--help
: Show the help message--set-default-dir DIR
: Set the default projects directory--add-project DIR
: Add a project directory manuallycat
: Display the contents of the config filels
: List projects in the default directory and manual projects
PROJECT
: Name of the project directoryIDE
: (Optional) IDE to use (z: Zed, vs: VS Code, id: IntelliJ IDEA)
kode myproject vs # Open 'myproject' with VS Code and set it as the preferred IDE
kode myproject # Open 'myproject' with the last used IDE
kode --set-default-dir ~/work
kode --add-project ~/documents/project
The script uses two JSON configuration files stored in ~/.config/kodesh/
(or $XDG_CONFIG_HOME/kodesh/
if set):
config.json
: Stores the default project directory, manually added projects, and IDE paths.ide_preferences.json
: Stores the preferred IDE for each project.
You can edit these files manually, but it's recommended to use the script's commands for making changes.
jq
: For JSON parsing (must be installed separately)- Bash 4.0 or later
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any problems or have any questions, please open an issue on the GitHub repository.