wks - the workspace organizer
Manage your codebase like a boss!
wks (WorKSpace) is a tool to manage your codebase organization & configuration across computers
Please note that wks is currently under heavy development. Do no expect stable features before 1.0.0 is reached.
Pull requests & issues are welcomed!
Tired of having to clone & configure the git repositories you'll work on each time you use a different computer?
Well, I am. From the fork I made to contribute, my personal projects, my work projects, etc... I have many repositories in my computer with special git configuration (i.e using work email in work related repositories)
When I move to a new computer, I need to pull them again and configure everything. This is really error prone.
Let me introduce you wks the tool that will change that bad habit, and increase your productivity.
With wks, you only need to setup your workspace one time, and then you'll be able to clone it to every computers you'll ever use. The layout & repositories configuration will be applied automatically. You'll have a consistent workspace layout across all your computers.
Create a workspace
The first thing you'll need to do is to create a workspace to work on it. A workspace is location where you'll store your git repositories and their configuration.
Initialize new workspace
Creating a new workspace can be done in a single command:
wks init [<path>]
Where path is the workspace emplacement (Default is current directory). Remote may be set using the --remote flag.
Clone existing workspace
If you already have a workspace and intend to restore it locally, this can be done using a single command too:
wks clone <repo> [<path>]
Where repo is the url of the workspace git repository, and path the workspace emplacement. If path is omitted the workspace will be created in current directory.
Restoring a workspace will create automatically all repositories, and configure them using their settings.
Add a repository
Once you have a workspace, you can add repository into them. This is done by running the add command:
wks add <repo> [<dir>]
Where repo is the url of the git repository to add, and dir the folder to save repository into.
wks add https://github.com/creekorful/wks Github
Will import the wks repository inside the Github directory. The repository will be stored at: Github/wks
You can also override repository settings directly when adding them:
wks add --branch develop --config email@example.com --config user.name="John Doe" https://github.com/creekorful/wks Github
Will import the wks repository inside the Github directory. The repository will be stored at: Github/wks. The branch cloned will be develop (instead of master), and the user.email git configuration will be set to firstname.lastname@example.org and the user.name will be set to John Doe.
When you clone a workspace, each repository configuration will be applied automatically, thus preventing you from having to do it again.
For more help, issue the command
wks help add
In order to retrieve latest changes from remote, you can issue the following command:
In order to update remote configuration, you can issue the following command: