Command Line Tools
About Tools
Patchkit Tools is a set of scripts allowing for fast and convenient access to the most of Patchkit application-relevant features from the command line. It lets you create a new version without the need for uploading all files. It is possible thanks to the use of differential files mechanics.
Tools compare the new application files with the ones that already exist on the server and they create a lightweight file called a differential file (Diff), which contains all the changes occuring between the two versions. Such file has to be sent to the app as a new version and voilà! The server receives only the information about what has really been changed.
Installation
- Download PatchKit tools distribution for your operating system from GitHub.
- Unzip it to a suitable directory. On Windows, we recommend short paths without special characters, e.g.
C:\patchkit_tools
- Run StartTools file
Optionally, if you want to make your console more comfortable, you can set up your PATH variable to point to that directory. (Windows, OSX and Linux instructions) but it’ s not mandatory.
Upgrading
- Remove your previous installation directory.
- Unzip newly downloaded distribution from GitHub to the same place.
Usage
Prerequirements
You need to have at least basic knowledge of the command line (Windows) or bash (Mac OSX, Linux). If you don’t know how to work with these tools, please read the resources listed below:
- How to use the Windows command line
- How to use Terminal on Mac
- How to start Using the Linux Terminal
To use tools functionalities, you need to enter a specific tool in the command line or terminal. Some tools may require additional parameters. You may use patchkit-tools \--help
to list all of the available tools or patchkit-tools tool \--help
to display a list of parameters and description of a specific tool.
You may also find the information about these on this page.
Getting ApiKey and Secret
The API Key is needed to authenticate your PatchKit account from the PatchKit Tools. You can acquire it on your Account page.
The Secret is a unique identifier of your application. You may find it on your application’s page.
Basic usage
PatchKit Tools consist of several commands that are meant for advanced usage. In most cases, you won’t need to use more than one particular tool that does most of the work for you. That tool is called make-version
.
Make-version
tool creates a new version of your application (or overwrites a draft when asked to do so) by uploading your latest version delta files (diffs). It’s a clever mechanism that can significantly reduce the time needed to upload your data. Also, it can be easily implemented with your continuous integration toolset.
To use it just enter:
patchkit-tools make-version
You will be asked to provide multiple pieces of information required to upload your new version contents, including your secret, API key and data directory location. You may also provide all of these parameters as arguments, so make-version
tool will do its work without asking a single question. For more details, please see patchkit-tools make-version --help
.
Help syntax
Display information about tools and builtin commands.
patchkit-tools [tool_name] [tool_arguments]
Displaying help and tools list
patchkit-tools --help
Displaying specific tool help
patchkit-tools [tool_name] --help
Commands list
Learn more about commands on this page.