https://github.com/callensm/wksp
CLI to create templated workspaces using user-configured JSON files
https://github.com/callensm/wksp
cli templates workflow workspaces
Last synced: 4 months ago
JSON representation
CLI to create templated workspaces using user-configured JSON files
- Host: GitHub
- URL: https://github.com/callensm/wksp
- Owner: callensm
- License: mit
- Created: 2019-01-23T02:41:41.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-06-06T18:34:49.000Z (over 3 years ago)
- Last Synced: 2025-07-24T18:13:57.426Z (7 months ago)
- Topics: cli, templates, workflow, workspaces
- Language: Rust
- Size: 21.5 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# wksp
## Usage
Create the configuration directory for `wksp` to look for template files in:
```sh
# Windows -> C:\Users\{USER}\.wksp
# Linux -> /home/{USER}/.wksp
# MacOS -> ~/.wksp OR /Users/{USER}/.wksp
```
Inside of the `wksp` configuration directory, each template is a JSON file using the following schema:
```json
{
"folders": [
{
"name": "myfolder",
"template": {
"folders": ["..."],
"files": ["..."]
}
}
],
"files": ["file1.rs", "file2.js", "file3.go"]
}
```
> `folder` and `files` fields do not need to be defined if they will be empty
## Example
Running the command:
```sh
wksp --name new_workspace --template example
```
Will look for a template file `$HOME/.wksp/example.json` and build the template in the current directory named whatever you passed to the `-n/--name` argument.
Given a template defined as:
```json
# javascript_git.json
{
"folders": [
{
"name": "src",
"template": {
"folders": [{ "name": "lib" }],
"files": ["index.js"]
}
},
{
"name": "tests",
"template": {
"files": ["index.test.js"]
}
}
],
"files": [".gitignore", "README.md", "LICENSE"]
}
```
Running the command `wksp -n js-project -t javascript_git` will produce the following file tree:
```
js-project
├── .gitignore
├── LICENSE
├── README.md
├── src
│ ├── index.js
│ └── lib
└── tests
└── index.test.js
3 directories, 5 files
```