A POSIX-like shell & environment for the Nintendo DS.
Click here to get the latest GitHub Actions build. Check the issues tab to see all currently known issues. Report new issues there if you find any.
Join the Discord server!
Although it may seem like it, the scope of this project is not to be an operating system. That has been attempted several times before, not to mention the existence of DSLinux, which has been long abandoned. Thanks to the devkitPro team, turning the DS into a general-purpose computer is a lot easier than it was back then. That's what this project aims to do: make the work of libnds fully interactive, while adding some fun features on top!
sh
-like features: cursor navigation, I/O redirection, environment variables, variable substitution, command history- Command history is now saved to your sdcard at
/.ndsh_history
! - Like
.bashrc
for Bash,.ndshrc
at the root of your sdcard is automatically run upon shell startup
- Command history is now saved to your sdcard at
- Filesystem manipulation using typical POSIX shell commands:
ls
,cd
,cat
, etc - Networking commands:
wifi
,dns
,tcp
,curl
,ssh
,telnet
,ws
- Lua interpreter, with an API to make your scripts feel just like builtin commands!
- HTTPS/SSL support with cURL and MbedTLS!
- HUGE thanks to this blogpost for figuring out the CMake quirks
- libnds (my console rework fork), dswifi and libfat
- MbedTLS (my fork with CMake changes)
- libcurl (my fork with CMake changes)
- Lua (CMake compatible repo by @walterschell)
- sol2
- libssh2 (my fork with CMake changes)
- libtelnet (my fork with CMake changes)
- Download the latest version of the devkitPro installer and select the
nds
option during installation - Open the
MSys2
shell from your start menu after installation and uninstalllibnds
withpacman -Rdd libnds
note: if you already have msys2 installed make sure you open the one that is exactly calledMSys2
, this is the one installed by devkitPro - Clone, build and install my libnds fork:
git clone https://github.com/trustytrojan/libnds -b console-rework cd libnds make install -j$(nproc)
- Clone this repo and build with
$DEVKITPRO/tools/bin/catnip -Tnds
- Get devkitPro pacman on your system
- Install the
nds-dev
metapackage (explained in the link above) - Uninstall
libnds
withsudo (dkp-)pacman -Rdd libnds
- Clone, build, and install my libnds fork:
git clone https://github.com/trustytrojan/libnds -b console-rework cd libnds sudo -E make install -j$(nproc)
- Clone this repo and build with
$DEVKITPRO/tools/bin/catnip -Tnds -j$(nproc)
- Do NOT run CMake. You MUST run
catnip
.
- For JSON support, I recommend rxi/json.lua. It's extremely lightweight.
- Remember that the
lua
command runs under a shell's thread. In your scripts when performing work in a loop, you should calllibnds.threadYield()
to yield the current thread so others can run.- The Lua standard library for coroutines is available for use, however Lua coroutines are NOT the same as system-level threads. They all exist inside the Lua interpreter itself with no connection to the system thread running the
lua
command running your script.
- The Lua standard library for coroutines is available for use, however Lua coroutines are NOT the same as system-level threads. They all exist inside the Lua interpreter itself with no connection to the system thread running the