npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dchighs/dc-tools-cli

v0.1.0

Published

CLI tools for Dragon City assets, localization, and configuration

Readme

@dchighs/dc-tools-cli

A powerful, modular Command Line Interface (CLI) for downloading Dragon City game assets, searching localizations/translations, parsing asset metadata from URLs, and fetching game configurations.

╭──────────────────────────────────────────────────────────────────────╮
│                                                                      │
│   ██████╗   ██████╗  ████████╗ ██████╗  ██████╗ ██╗     ███████╗     │
│   ██╔══██╗ ██╔════╝  ╚══██╔══╝██╔═══██╗██╔═══██╗██║     ██╔════╝     │
│   ██║  ██║ ██║          ██║   ██║   ██║██║   ██║██║     ███████╗     │
│   ██║  ██║ ██║          ██║   ██║   ██║██║   ██║██║     ╚════██║     │
│   ██████╔╝ ╚██████╗     ██║   ╚██████╔╝╚██████╔╝███████╗███████║     │
│   ╚═════╝   ╚═════╝     ╚═╝    ╚═════╝  ╚═════╝ ╚══════╝╚══════╝     │
│                                                                      │
│   by DC HIGHS v0.1.0 • @dchighs/dc-tools-cli                         │
│                                                                      │
╰──────────────────────────────────────────────────────────────────────╯

⚡ Features

  • 📦 Asset Downloader: Download dragon sprites, thumbnails, SWF Flash animations, Spine 2D animations, building sprites, habitat sprites, decorations, chests, island packages, and background music.
  • 🐉 All-In-One Dragon Downloader: Download all assets across every dragon growth phase (phase0 through phase3) with a single command.
  • 🌐 Localization & Translation Engine: Query translations across 10 supported languages (en, pt, es, fr, de, it, ja, ru, ko, tr), lookup keys/values, fetch dragon names/descriptions by ID, and run interactive paginated searches in the terminal.
  • 🔍 URL Metadata Extractor: Instantly parse asset URLs (dragon:sprite, dragon:thumbnail, dragon-animation:flash, dragon-animation:spine) to extract dragon ID, image name, phase, quality, skin, and platform prefix (dci, dca, dcm).
  • ⚙️ Game Configuration Manager: Retrieve authenticated or raw game configuration data directly from Dragon City servers.

📦 Installation

npm install -g @dchighs/dc-tools-cli

Or execute directly using npx:

npx @dchighs/dc-tools-cli --help

🚀 Usage Guide

Run the root command to display the interactive help screen and CLI banner:

dc-tools-cli

📥 1. Downloading Game Assets (download)

Download All Dragon Assets (dragon:all)

Downloads all sprites, thumbnails, Flash animations, and Spine 2D animations across all growth phases (phase0 to phase3) for a dragon:

# Using positional argument
dc-tools-cli download dragon:all 1000_dragon_nature

# Using flags and specifying platform/output directory
dc-tools-cli download dragon:all -i 1000_dragon_nature --platform dci -o ./my-dragons

Individual Dragon Assets

Supports positional arguments or -i, --image-name flags, along with platform filtering (--platform <dci|dca|dcm>):

# Dragon Sprite
dc-tools-cli download dragon:sprite 1000_dragon_nature --phase 3 --platform dci

# Dragon Thumbnail
dc-tools-cli download dragon:thumbnail 1000_dragon_nature --phase 3

# Dragon Flash Animation (.swf)
dc-tools-cli download dragon-animation:flash 1000_dragon_nature --phase 3

# Dragon Spine 2D Animation (.zip)
dc-tools-cli download dragon-animation:spine 1000_dragon_nature --phase 3

Buildings, Habitats, Decorations & Chests

# Building Sprite
dc-tools-cli download building:sprite -i building_hatching_boost

# Habitat Sprite
dc-tools-cli download habitat:sprite -i habitat_nature_1

# Decoration Sprite
dc-tools-cli download decoration:sprite -i deco_flower_red

# Chest Sprite
dc-tools-cli download chest:sprite -i chest_gold_01

# Island Content Package (.zip)
dc-tools-cli download island-package -f heroicraces_islands_package -t heroicraces_islands

# Game Music (.mp3)
dc-tools-cli download music -k music_main_theme -o ./music.mp3

🌐 2. Localization & Translations (localization)

Fetch and search Dragon City translation strings across 10 supported languages.

Fetch Dragon Info by ID

dc-tools-cli localization get --dragon-id 1000 -l br

Terminal Output:

  📌 Dragon Localization Details (ID: 1000)
     ID          : 1000
     Name        : Dragão Natureza
     Description : Este dragão gosta de viver na floresta tropical...

Lookup Translation Key / Value

# Lookup value by key
dc-tools-cli localization get --key tid_new_expansionevent2_button -l br

# Lookup key by translation text
dc-tools-cli localization get --value "Dragão Natureza" -l br

Interactive Paginated Search (-s, --search)

Search translation keys and text strings with interactive terminal pagination:

dc-tools-cli localization get -l br -s natureza
  • Press Enter or n: Next Page
  • Press p: Previous Page
  • Press q: Quit search

Export Full Localization to JSON

dc-tools-cli localization get -l en -o localization_en.json

🔍 3. Extract Metadata from Asset URLs (extract)

Parse static asset URLs to extract structured dragon metadata (ID, Image Name, Phase, Skin, Platform, Quality):

Extract Dragon Sprite Metadata

dc-tools-cli extract dragon:sprite "https://dci-static-s1.socialpointgames.com/static/dragoncity/mobile/ui/dragons/[email protected]"

Terminal Output:

  📌 Extracted Dragon Sprite Metadata
     platformPrefix : dci (iOS)
     id             : 1000
     imageName      : 1000_dragon_nature
     phase          : 3 (Adult)
     skin           : (none)
     imageQuality   : @2x (large)

Extract Dragon Thumbnail, Flash & Spine

dc-tools-cli extract dragon:thumbnail <url>
dc-tools-cli extract dragon-animation:flash <url>
dc-tools-cli extract dragon-animation:spine <url>

⚙️ 4. Fetch Game Configuration (config)

Raw Configuration

Retrieve raw configuration JSON from a public/raw URL:

dc-tools-cli config raw -u "https://example.com/data.json" -o config.json

Authenticated Game Configuration

Retrieve configuration using active user credentials:

dc-tools-cli config fetch \
  --url "https://game-config.dragoncity.com/api" \
  --user-id "12345678" \
  --auth-token "your_auth_token" \
  -o game_config.json

🛠️ Development & Testing

# Clone the repository
git clone https://github.com/dc-highs/dc-tools-cli.git
cd dc-tools-cli

# Install dependencies
npm install

# Run in development mode
npm run dev -- download dragon:all 1000_dragon_nature

# Run unit tests
npm run test

# Build TypeScript output
npm run build

# Format codebase
npm run format

📜 License

Distributed under the MIT License.