DEV Community

Cover image for Using NanoAPI on Game Mods
Thea for NanoAPI

Posted on

1 1 1 1 1

Using NanoAPI on Game Mods

Why This Matters

Game mods often evolve into monolithic codebases over time. With the industry shifting toward cloud-native and serverless architectures, tools like NanoAPI help developers to discover dependencies and can help to guide developers to improve these without full rewrites. Hereโ€™s how we applied it to the Archipelago Hollow Knight mod.

Note: NanoAPI is compatible with Windows by running it on WSL (Windows Linux Subsystem) at the moment.

  1. Clone the Mod Repo
cd /mnt/c/Mods  # Windows path mounted in WSL
git clone https://github.com/ArchipelagoMW-HollowKnight/Archipelago.HollowKnight
Enter fullscreen mode Exit fullscreen mode

I downloaded the mods into a folder on my Windows partition called C:/Mods, and then in my WSL terminal I am going to the correct directory cd Archipelago.HollowKnight-main/

Screenshot of Terminal

napi works out of the box on both mac and Linux systems. To use this tool on Windows, you will need to install WSL (Windows Subsystem for Linux) and run the CLI commands from there.
Make sure that Node.js (>=22) and npm are installed https://nodejs.org/en.
Then the command we run is npm install -g @nanoapi.io/napi

Showing the installing process

โš ๏ธ These warning are to be expected, no worries!

Then we are going to run napi init in the terminal.

Give the backend a minute on first run; C# reflection is ๐Ÿขโ€‘slow on big projects.

Image description

Then we select the codebaseโ€™s language (which in this case is C#)

Image description

Then I kept press enter to choose the default ouput file for for NanoAPI

Image description

I type โ€œYโ€, because I want to use the selected include patterns

Image description

I type Y again

Image description

I type Y again Because I want to use the code Metrics

Image description

Then I kept pressing enter to use the suggested default values of nanoAPI

Image description

Image description

Now that we have the configuration configured, weโ€™ll run napi audit view

Then there will be a link to a localhost port which we can view in the web browser.

Set up complete

Now this is what our website looks like:
Image description

Once set up, you can:

  • Open the web viewer.
  • Use the sidebar to explore extracted symbols.
  • Investigate how each symbol is traced and annotated.
  • Review warnings such as dependency overloads and decide what to address or ignore.

Image description
Image description

Finished!

For more information - read the docs: for advanced configs and API extraction.

Want More Information or Help Get Involved?

Weโ€™d love your feedback, ideas, and contributions.

Troubleshooting Notes

I had an issue where it stated
Error: No .csproj files found.

Image description

so then I nano'd into .napirc and I manually included .csproj

{
  "language": "c-sharp",
  "project": {
    "include": [
      "**/*.cs",
      "**/*.csproj"  # Added this line
    ],
    "exclude": [ ... ]
  }
}
Enter fullscreen mode Exit fullscreen mode

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

Top comments (0)

DEV Launches and Announcements

๐Ÿฏ ๐Ÿš€ Timescale is now TigerData: Building the Modern PostgreSQL for the Analytical and Agentic Era

TL;DR: Eight years ago, we launched Timescale to bring time-series to PostgreSQL. Our mission was simple: help developers building time-series applications.

Check out the challenge

DEV is bringing live events to the community. Dismiss if you're not interested. โค๏ธ