Wrk
wrk is a command-line interface (CLI) tool that offers an alternative to using Workspace Admin for managing workspace features.
The wrk tool can be utilized for creating workspace provisioning scripts, within Dockerfiles, and in Alnoda Hub app installation scripts.
id
Command: wrk id
Description: Display the workspace id
$ wrk id
dhfoeahbslahinbk
signin
Command:: wrk signin '[security token]'
Description: Authenticate workspace at alnoda.org
Parameters:
- token (str): personal security token from Alnoda Hub
$ wrk signin 'hf$HvypaBw&)U!^1Y%Kgp&$4TjT98dh^7))SMB79'
✨ Hello username!
Warning
Wrap your token with single quotes
signout
Command:: wrk signout
Description: Log out workspace from alnoda.org
$ wrk signout
👋 Goodbye!
descr
Command: wrk descr
Description: Edit interactively the workspace description using the command-line text editor, mcedit.
update
Command: wrk update [what] '[new value]'
Description: Update workspace meta (name, version, author or description)
Parameters:
- what (str): element of metadata to update. Allowed values: name, version, author, description (default)
- value (str): new value
$ wrk update name 'My awesome workspace'
✅ Done!
start
Command: wrk start [service name] '[start command]'
Description: Start persisten application or service (as a daemon).
Parameters:
- name (str) - service name
- cmd (str) - command to start a service
$ wrk start statichome 'cd /home/project/; python -m http.server 8026'
✅ Done!
❗ Service activation requires workspace reboot!
stop
Command: wrk stop [service name]
Description: Stop service.
Parameters:
- name (str) - service name
$ wrk stop statichome
✅ Done!
❗ Workspace reboot is required!
apps
Command: wrk apps
Description: Display installed apps from Alnoda Hub.
$ wrk apps
❇️ code-server
Name: Code-server
Version: 4.13.0
Description: VS Code IDE (code editor) in browser
❇️ poetry
Name: Poetry
Version: 1.4.0
Description: Python packaging and dependency management made easy
install
Command: wrk install [app name] [tab]
Description: Install an app from Alnoda Hub.
Parameters:
- application (str) - application name from Alnoda Hub
- tab (str) - workspace UI tab where the app shortcut will be placed, default - Home tab.
$ wrk install postgresql
✨ starting...
⚠️ Please DO NOT close this terminal window untill app is fully installed!
➡️ checking workspace compatibility...
➡️ checking app compatibility...
➡️ executing installation script...
✔️ app installed
➡️ setting startup configuration...
-------------------------------------------------------------
- ⚠️ application will start after workspace is restarted ⚠️ -
--- restart workspace with 'wrk kill' ---
-------------------------------------------------------------
➡️ adding workspace tags...
❗ Could not update workspace app history at alnoda.org: Not authenticated at alnoda.org
✍️ If app is not working try restarting terminal window or entire workspace
🚀 done
R E S T A R T T E R M I N A L N O W (CTRL+D) !!!!!!!!
***********************************************
psql
***********************************************
setvar
Command: wrk setvar [name] '[value]'
Description: Set terminal shell (zsh) environmental variable. Same as 'wrk env'.
Parameters:
- name (str) - name of the environmental variable
- value (str) - value of the environmental variable
$ wrk setvar MY_NEW_VAR 'my new environmental variable'
✅ Done!
❗ Terminal reload is required!
Warning
Wrap variable value with single quotes!
env
Command: wrk env [name] '[value]'
Description: Set terminal shell (zsh) environmental variable. Same as 'wrk setvar'.
Parameters:
- name (str) - name of the environmental variable
- value (str) - value of the environmental variable
$ wrk env MY_NEW_VAR 'my new environmental variable'
✅ Done!
❗ Terminal reload is required!
addpath
Command: wrk addpath '[folder]'
Description: Add a folder to PATH, only applies to terminal zsh shell.
Parameters:
- folder (str) - folder that should be added to PATH.
$ wrk addpath '/home/project/'
✅ Done!
❗ Workspace reboot is required!
alias
Command: wrk alias [name] '[cmd]'
Description: Set alias for zsh terminal shell (name='value').
Parameters:
- name (str) - alias
- cmd (str) - command
$ wrk alias ps 'ps axf'
✅ Done!
❗ Workspace reboot is required!
cheatsec
Command: wrk cheatsec '[name]'
Description: Add a section to the cheatsheet tab.
$ wrk cheatsec 'React'
✅ Done!
cheat
Command: wrk cheat '[section]' '[cmd]' '[description]'
Description: Add cheatsheet command to some section.
Parameters:
- section (str) - section to add note to
- cmd (str) - command
- description (str) - description
$ wrk cheat React 'npx create-react-app my-app' 'bootstrap a new React application in a directory named my-app.'
✅ Done!
linksec
Command: wrk linksec '[name]'
Description: Add a section to the links.
Parameters:
- name (str) - Name of a new section on the Links tab.
$ wrk linksec 'React'
✅ Done!
link
Command: wrk link '[section]' '[url]' '[name]' '[description]'
Description: Add new link to the existing link section.
Parameters:
- section (str) - section name
- url (str) - link URL
- name (str) - link name
- description (str) - description
$ wrk link 'React' 'https://react.dev/learn' 'React docs' 'React documentation'
✅ Done!
kill
Command: wrk kill
Description: Kill (and restart) the workspace.
$ wrk kill
⚠️ WARNING: this will stop the workspace.
Do you want to continue❓ [y/N]:
upgrade
Command: wrk upgrade
Description: Upgrade wrk version.
$ wrk upgrade
Current version 0.4.21
New version available 0.4.22. Do you want to upgrade❓ [y/N]:
help
Command: wrk --help
Description: Show the help documentation for wrk
tool in the terminal shell.