Skip to content
Henrique Santana edited this page Mar 6, 2021 · 5 revisions

As already mentioned, YGOFabrica is a command line tool. So, in order to use it, the terminal (command prompt, cmd.exe, or whatever) will be your best friend. Also, it was designed to be as textual as possible, so your workflow during card making can be unified: all you need is a terminal and a text editor. Ideally, you wouldn't have to open any SQLite client to edit cards, nor any image editor to assemble card pics, nor your file manager to copy your data to your game folder. A recommended setup is using VS Code with a good Lua and TOML language extensions, along with an autocomplete extension for EDOPro scripting API.

In order to achieve this, YGOFabrica provides a set of commands to perform each of those tasks for you. Each command is described in a separate page, which can be found in the sidebar. The remainder of this page contains a brief guide about using a command line interface, and some conventions about how to read this Wiki. If you already know how to use a terminal, skip to Conventions.

Using a command line interface

For those unfamiliar with using a command line interface, here's a brief introduction that will probably cover all the basics you need to know. For the sake of simplicity, let's call Linux terminal or Windows command prompt (cmd.exe) just terminal.

First, a common task is to open the terminal in a specific folder. A Linux user is probably already familiarized with this, just right-click a folder and click Open in Terminal. For Windows, a quick trick for that is to open a folder in Windows Explorer as you normally would, then type cmd in its address bar and press Enter.

Now that it's open, there are three things in your brand new terminal window: the current directory, a special character, and a blinking cursor. For Linux, that special character is a dollar sign ($), and for Windows, a greater-than sign (>). Whatever comes before that character is the folder you currently are (in Linux, your username is also shown), and whatever comes after that character, is the command you're typing. E.g. if you opened the terminal in your personal Documents folder, this is how it will look like:

Linux Windows
user@pcname:~/Documents$   C:\Users\YourName\Documents>  

Regardless of which operating system is being used, commands are denoted by a preceding dollar sign. However, the dollar sign is not typed as part of the command.

If you need to change the current folder, use the command cd, which stands for change directory. Some examples:

Changing to a specific folder:

$ cd C:\Users\YourName\AppData

Changing to a subfolder (a folder inside the current directory) called projects:

$ cd projects

Changing to the parent folder (.. always means parent folder):

$ cd ..

This is also a very common task, e.g., when you create a new project with YGOFabrica, a new folder is created with the name you choose, and you should access that folder in your terminal using cd. It's important to know in what folder you currently are, because the paths you type and the commands you run usually work relative to the current directory, as shown in the last two examples.

Two other features that will help a lot: completion and history browsing. Whenever you're typing a path (i.e., the name of a folder, like C:\Users\YourName\Documents or /home/yourname/), you can hit Tab and the terminal will try to complete the name of the folder for you. Also, if you want to reuse a command, use the up and down arrow keys to navigate your command history. Both of these features will save you some typing. Unfortunately though, Windows does not save your command history after you close the terminal.

That should be enough for now, but if you're interested, here's another helpful guide.

Conventions

In this usage guide, when part of a command is enclosed in angle brackets, <like-this>, that means it must be replace by some value (without the brackets), otherwise the command won't work. And when part of a command is enclosed in square brackets, [like-this], that means whatever is inside the brackets is optional. If some parts are separated with a |, it means that they are mutually exclusive, i.e., you have to choose which one to write. See the examples.

To create a new YGOFabrica project:

$ ygofab new <project-name>

If you type a folder path, the current directory is changed to that path, but if you don't type anything, it won't change:

$ cd [<folder-path>]

To check YGOFabrica info or version:

$ ygofab [-v | --version]
Clone this wiki locally