Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatNX

An AI chat client for the Nintendo Switch (homebrew). A native .nro app written in C++ with SDL2 and libcurl that talks to Puter's AI gateway over HTTPS, directly from the console.

Unofficial homebrew project, not affiliated with Nintendo.

Features

  • Chat with multiple AI models (Claude, GPT, and more)
  • Generate images from a prompt, with a built-in gallery and full-screen zoom/pan viewer
  • Analyze a Switch screenshot by attaching it to your question
  • Voice dictation with a USB microphone
  • Live usage and quota tracking, with a per-model cost breakdown
  • Full interface and AI responses in 28 languages

Screenshots

Chat and image generation Screenshot analysis
Options Usage and quota

Requirements

Installation

Copy ChatNX.nro into the /switch/ folder on the SD card, or send it over the network with nxlink:

nxlink ChatNX.nro -a <switch-ip>

On first launch the app creates sdmc:/config/ChatNX/config.json. You can enter the token from inside the app (Y on the config screen) or edit that file directly:

{
  "puter_token": "<your token>",
  "model": "claude-haiku-4-5",
  "image_driver": "cloudflare-image-generation",
  "language": "en"
}

On a first launch the app picks the console's own system language (falling back to English); language only pins it to one of the 28 supported codes.

The token is never displayed or written to logs, and config.json is git-ignored.

Controls

Button Action
A Write a message / confirm
B Back
X New conversation
Y Enter the token (config screen) / manage a conversation (sidebar)
+ Options
Show/hide the sidebar
L Analyze a screenshot (pick one from the album)
R (hold) Voice dictation
ZL / ZR Zoom out / in (image viewer)
↑ / ↓ Scroll / navigate

In handheld mode the touchscreen works: tap the buttons, scroll the chat with a finger.

Building

Requires devkitPro with switch-dev and the portlibs switch-sdl2, switch-sdl2_ttf, switch-curl. From the devkitPro shell:

make            # or: ./scripts/build.sh

The .nro is produced at the project root.

Code layout

Headers live in include/, implementations in source/:

  • main — initialization, main loop, input (pad + touch)
  • ui — screen rendering and touch hit-tests (geometry in theme.h)
  • gfx — drawing primitives (text, anti-aliased rounded rectangles)
  • net — Puter client (chat and quota, on detached threads)
  • store — persistence of conversations and config on the SD card
  • i18n — translations (full UI and AI responses in 28 languages)
  • util, json, album, keyboard — helpers (strings, parsing, screenshots, keyboard)

Notes

  • The Puter quota is shared across all models.
  • Conversations are saved on the SD card (custom .cnx format).
  • The on-screen keyboard behaves better in handheld mode than docked.
  • Responses are shown as plain text (any Markdown is stripped).

Acknowledgements

  • Puter — the AI gateway behind chat and image generation
  • devkitPro / libnx — the Switch toolchain and SDK
  • SDL2, SDL2_ttf, libcurl, HarfBuzz and FreeType — rendering, networking, text shaping
  • Noto Sans fonts and stb_image

License

Code under the MIT license (see LICENSE). Bundled third-party assets keep their own licenses: the Noto Sans fonts under the SIL Open Font License 1.1 (see romfs/NOTO-OFL-LICENSE.txt) and stb_image (public domain / MIT).

About

AI chat client for the Nintendo Switch - chat with multiple AI models, generate images, and analyze screenshots, right from the console

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages