Command Line Interface (CLI)
Most of Charon functionality could be accessed via CLI commands. The application itself uses the getops syntax. You should be familiar with terminal on your OS to fully tap potential of CLI.
Installation
Manual Download
The Charon.exe
package can be downloaded from Nuget and extracted as a ZIP archive, containing the application located in the tools/
directory.
Nuget Client
Or use Nuget client to download and unpack package:
nuget install GameDevWare.Charon -ExcludeVersion -PackageSaveMode nupkg -PreRelease -OutputDirectory ./
Bootstrap scripts (recommended)
Alternatively, you can use one of two bootstrap scripts:
Both scripts require the dotnet tool to be available in PATH
and mono installed for Linux and MacOS.
mkdir Charon
cd Charon
curl -O https://raw.githubusercontent.com/gamedevware/charon/main/scripts/bootstrap/RunCharon.bat
RunCharon.bat DATA EXPORT --help
# ^
# your command goes here
mkdir Charon
cd Charon
curl -O https://raw.githubusercontent.com/gamedevware/charon/main/scripts/bootstrap/RunCharon.bat
chmod +x RunCharon.sh
./RunCharon.sh DATA EXPORT --help
# ^
# your command goes here
Command Syntax
Commands have the following syntax:
Charon.exe COMMAND --parameterName <parameter-value>
# parameters can have more than one value.
# Use space to separate values
Charon.exe EXPORT --schemas Item Armor "Project Settings" Quest
# if your value contains a space, put it inside the quotation marks.
# Escape characters and other rules depend on the OS you are running.
Charon.exe SERVE --dataBase "c:\my application\my path.txt"
# some parameters don't require a value (e.g. flag).
Charon.exe VERSION --verbose
Linux and MacOS
To run Charon.exe
on non-Windows systems, you need to have the mono
runtime installed, which can be
either a global one from $PATH
or a local installation.
# for globally installed mono
mono Charon.exe VERSION
# for non-brew installed mono on MacOS
/Library/Frameworks/Mono.framework/Commands/mono Charon.exe VERSION
# for some linux installations
/usr/bin/mono Charon.exe VERSION
# or use bootstrap script
./RunCharon.sh VERSION
Absolute and relative paths
When running commands, it’s crucial to be aware of whether you are using absolute or relative paths to files.
Absolute Path: An absolute path defines a file or directory’s location in relation to the root directory. In Linux and macOS, it starts from the root
/
, while in Windows, it begins with a drive letter (likeC:\\
).Example for Linux/macOS:
/usr/local/bin
Example for Windows:
C:\\Program Files\\mono
Relative Path: A relative path references a file or directory in relation to the current working directory, without starting with a root slash or drive letter.
Example: If currently in
/home/user/Documents
, a file in/home/user/Documents/Projects
would have the relative pathProjects/FileName
.
Windows Command Prompt: Paths use backslashes (
\\
). Absolute paths start with a drive letter (likeC:\\Users\\Name
), while relative paths use the file name or paths likesubfolder\\file.txt
.macOS/Linux Terminal: Paths are denoted with forward slashes (
/
). Absolute paths begin from the root (/
), and relative paths use./
for the current directory or../
to go up one level.
Getting Help Text
To display list of available commands add –help or /?.
Charon.exe --help
#> Usage: Charon.exe <action> [--<param> || (--<param> <paramValue> ...) ...]
#>
#> Verbs:
#> DATA Data manipulation actions.
#> GENERATE Code generation actions.
#> VERSION Print version.
Charon.exe DATA EXPORT --help
#> Usage:
#> DATA EXPORT --dataBase <URI> [--schemas [<TEXT>]] [--properties [<TEXT>]] [--languages [<TEXT>]] [--output <TEXT>
#> ] [--outputFormat <TEXT>] [--outputFormattingOptions [<TEXT>]] [--mode <EXPORTMODE>] [--credentials [<
#> TEXT>]]
- Apply Patch
- Create Backup
- Create Document
- Create Patch
- Delete Document
- Export Data
- Find Document
- Export Translated Data
- Importing Translated Data
- List Translation Languages
- Import Data
- List Documents
- Restore from Backup
- Update Document
- Validate Game Data
- Generate C# Source Code
- Generate Haxe Source Code
- Export Code Generation Templates
- Generate Text from Templates
- Generate TypeScript Source Code
- Generate Unreal Engine C++ Source Code
- URL input/output parameters
- Start in Standalone Mode
- Universal parameters
- Environment variables
- Get Charon Version