A high-performance, type-safe Command Line Interface for managing PalDefender REST API servers. pd-cli features a "Hybrid" input system, allowing you to use simple space-separated lists or complex JSON for administrative actions.
npm install -g paldefender-cliDownload pre-compiled binaries for Windows, Linux, or MacOS.
Note for Unix (Linux/Mac): You must run
chmod +x pd-clibefore executing.
Clone this repo and prep (You must have git, node, and npm installed on your machine)
git clone https://github.com/PalLink/pd-cli-ts.git
cd pd-cli-ts
npm install
# build
# Linux:
./build-bins.sh
# Windows (Powershell):
.\build-bins.ps1
# Windows (CMD):
build-bins.batYou now have a "build" directory with the bins inside. Open it and run the correct one for your system.
- Interactive Setup: Run
pd-cli configureto save your host and admin token. - Connectivity Check: Run
pd-cli test-connectionto verify your credentials and server status. - Reset: Run
pd-cli clear-configto wipe stored credentials.
| Command | Description | Example |
|---|---|---|
getPlayers |
List all players | pd-cli getPlayers |
getGuilds |
List all guilds | pd-cli getGuilds |
getPlayer |
Detailed player profile | pd-cli getPlayer "ID" |
getPals |
List a player's Pals | pd-cli getPals "ID" |
getItems |
View player inventory | pd-cli getItems "ID" |
findPlayerByName |
Search by exact name | pd-cli findPlayerByName "Glitch" |
These commands support Hybrid Logic: pass a list of names for quantity 1, or a JSON string for specific counts.
# List format (Quantity 1 each)
pd-cli giveItems "ID" Stone Wood
# JSON format (Specific counts) - Requires "ItemID"
pd-cli giveItems "ID" '[{"ItemID": "Stone", "Count": 100}]'# List format (Level 1)
pd-cli givePals "ID" Anubis Lamball
# JSON format (Specific Level)
pd-cli givePals "ID" '{"PalName": "Anubis", "Level": 50}'# You must supply EggID AND either PalID or PalTemplate
# List format
pd-cli givePalEggs "ID" PalEgg_Dark_01 PalEgg_Fire_05
# JSON format
pd-cli givePalEggs "ID" '["PalEgg_Dark_05"]'| Command | Example |
|---|---|
giveProgression |
pd-cli giveProgression "ID" '{"EXP": 5000, "Lifmunks": 10, "AncientTechnologyPoints": 2, "TechnologyPoints": 4}' |
giveRecipeMaterials |
pd-cli giveRecipeMaterials "ID" PalSphere 5 |
learnTech |
pd-cli learnTech "ID" Unlock_Sphere_Tier_01 |
forgetTech |
pd-cli forgetTech "ID" All (Resets tree) |
Windows CMD does not support single quotes (') for JSON. You must use double quotes and escape the internal quotes with a backslash (\").
CMD Usage:
pd-cli.exe giveItems "ID" "[{\"ItemID\": \"Stone\", \"Count\": 10}]"PowerShell / Linux / MacOS Usage:
pd-cli giveItems "ID" '[{"ItemID": "Stone", "Count": 10}]'- Hybrid Input: Choose between simple string lists or structured JSON.
- Auto-Discovery: CLI stays in sync with the
paldefender-rest-clientlibrary. - Formatted Output: Results are displayed in clean, readable boxes with status spinners.
- No-Node Binaries: Use the standalone executables if you don't want to install Node.js.
MIT © PalLink