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.
- Clone the Mod Repo
cd /mnt/c/Mods # Windows path mounted in WSL
git clone https://github.com/ArchipelagoMW-HollowKnight/Archipelago.HollowKnight
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/
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
โ ๏ธ 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.
Then we select the codebaseโs language (which in this case is C#)
Then I kept press enter to choose the default ouput file for for NanoAPI
I type โYโ, because I want to use the selected include patterns
I type Y again
I type Y again Because I want to use the code Metrics
Then I kept pressing enter to use the suggested default values of nanoAPI
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:
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.
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.
- ๐ Our website! nanoapi.io
- ๐ Our documentation docs.nanoapi.io -
- ๐ GitHub Repo โ star us โญ
- ๐ฌ Reach out via email โ weโre always happy to connect
- ๐พ Join our Discord community!
Troubleshooting Notes
I had an issue where it stated
Error: No .csproj files found.
so then I nano'd into .napirc and I manually included .csproj
{
"language": "c-sharp",
"project": {
"include": [
"**/*.cs",
"**/*.csproj" # Added this line
],
"exclude": [ ... ]
}
}
Top comments (0)