KD is a tool to run commands & mount your remote VM files on your local machine. With KD you can:
- Access your remote VM files and edit them using your favorite local IDE(s).
- Run commands on your remote VM
Table of Contents
- KD requirements
- Installing KD
- KD commands
- KD help
- Using KD
Please note that the below is required for successful installation of KD:
- sudo permission on your local machine is required
- works only on OSX and Linux
- KD is currently in beta
Click on STACKS from the left side bar to open your Dashboard, and go to Koding Utilities
Copy the kd install command then paste it in your local machine terminal & run..
[email protected]:~ $curl -sL https://kodi.ng/d/kd | bash -s 901f9a44 Hello, this is the Koding application (kd) installer. This installer requires sudo permissions, please input password if prompted... Password: Downloading kd... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 11.0M 100 11.0M 0 0 160k 0 0:01:10 0:01:10 --:--:-- 242k Created /usr/local/bin/kd Downloading... Created /opt/kite/klient/klient Authenticating you to the KD Daemon Authenticated successfully Created /etc/kite/kite.key Verifying installation... Successfully installed and started the KD Daemon! Success! kd has been successfully installed. Please run the following command for more information: kd -h [email protected]:~ $
KD full list of commands
You can get a list of KD commands using
[email protected]:~ $ kd help USAGE: kd command [command options] COMMANDS: list, ls List running machines for user. version Display version information. mount, m Mount a remote folder to a local folder. unmount, u Unmount previously mounted machine. remount, r Remount previously mounted machine using same settings. ssh, s SSH into the machine. run Run command on remote or local machine. repair Repair the given mount status Check status of the KD Daemon. update Update KD Daemon to latest version. restart Restart the KD Daemon. start Start the KD Daemon. stop Stop the KD Daemon. uninstall Uninstall the KD Daemon. install Install the KD Daemon. metrics Internal use only. autocompletion Enable autocompletion support for bash and fish shells cp Copy a file from one one machine to another log Display logs. open Open the given file(s) on the Koding UI help, h Shows a list of commands or help for one command
To know how to use a particular KD command, you can get help simply by running
kd help <command>
For example, to learn more on using the command
kd mount we would run
kd help mount
[email protected]:~ $ kd help mount USAGE: kd mount [optional args] <alias:remote path> <local folder> DESCRIPTION Mount folder from remote machine to local folder. Alias is the local identifer for machine in 'kd list'. Local folder can be relative or absolute path, if folder doesn't exit, it'll be created. By default this uses FUSE to mount remote folders. For best I/O performance, especially with commands that does a lot of filesystem operations like git, use --oneway-sync.
Here’s a list of the common KD commands
kd list to view all your Koding cloud VMs:
[email protected]:~ $ kd list TEAM LABEL IP ALIAS MOUNTED PATHS 1. bloom example_1 126.96.36.199 grape
kd mount < vm alias > < local mount folder >
kd mount to mount your cloud VM(s) to a local folder and start editing your files using your favorite local editors. You can use the ALIAS name to mount your VM:
You have now mounted the cloud VM on a local folder called ‘grape’. You can mount your VM on any folder name. All changes within your mounted folder are actually happening on your cloud VM.
kd mountif you have a slow connection. It will force kd to retrieve only top level folder/files. Rest is fetched on request (fastest to mount). For more options run
kd help mount
kd run < command >
kd run is very useful as you can use it to run commands on your remote VM.
kd update will update kd to the newest version
[email protected]:~ $ sudo kd update Password: Updating... Stopping KD Daemon... Successfully updated to latest version of kd.
kd version will show the installed kd version
[email protected]:~ $ kd version Installed Version: 0.1.74 Latest Version: 0.1.74 Environment: production Kite Query ID: a7e1e03f-7f01-47a3-b4ac-2566b5256564
sudo kd uninstall will uninstall kd from your local machine.