wk is a simple commandline tool to automatically set up a workspace. Instead of maintaining global environment variables in a complex .bashrc
, wk allows you to create a .wk
script in a workspace directory that sets only the necessary environment variables.
To install wk copy the script to any directory in your PATH
. It's a relatively simple Bash script.
For any workspace that needs workspace specific scripts run, create a an executable script named .wk
in the root directory of the workspace. For instance, to set your GOPATH you would add the following .wk
file in the root directory of a Go workspace:
#!/bin/bash
export GOPATH=$PWD
To use wk, simply prepend any command you normally run with wk
. It will execute the remaining command line arguments after it runs the setup scripts.
$ wk go build .
wk allows nested workspaces. All directories from root to your current working directory are inspected for .wk
files, and they are executed in order.
wk sets a special environment variable for .wk
scripts called WKDIR
. This variable provides a unique directory inside of the user's home directory to store workspace specific files.
- Set up a shell to automatically run
wk
by default. - Allow post-command cleanup actions in .wk scripts.
- World domination.