Skip to main content

Terminal

Learn how to use the built-in terminal feature in SrcNexus Code Editor to run commands directly in your projects.

Overview

The Terminal feature in SrcNexus Code Editor allows you to run command-line tools and scripts directly from your mobile device.

Prerequisites

Before you can use the terminal feature in SrcNexus Code Editor, you need to set up a few things on your device:

  1. Termux - A terminal emulator for Android
  2. Terminal Server - A bridge that connects SrcNexus Code Editor to Termux

Part 1: Installing Termux

Termux is a powerful terminal emulator that brings Linux command-line tools to your Android device.

How to Install Termux

Option 1: Download from F-Droid (Recommended)

  1. Open your mobile browser
  2. Visit: https://f-droid.org/en/packages/com.termux/
  3. Scroll down and there will be a stable version with "Download APK" text. Click on that to download.
  4. Open the downloaded APK file to install

Option 2: Download from GitHub

  1. Open your mobile browser
  2. Visit: https://github.com/termux/termux-app/releases
  3. Scroll down to the "Assets" section of the latest release
  4. Download the APK file (it will be named something like termux-app_v*.apk)
  5. Open the downloaded APK file to install
  6. You may need to allow installation from unknown sources in your device settings
warning

Do NOT download Termux from the Google Play Store!

The Play Store version is outdated and no longer maintained. Using it will cause problems later. Always download from F-Droid or GitHub instead.

Update Termux Packages

Once Termux is installed, open it and run this command to update all packages:

apt update && apt upgrade

Part 2: Setting Up Storage Access

For SrcNexus Code Editor and Termux to work together seamlessly, they need to access the same files on your device.

Enable Termux Storage

Run this command in Termux:

termux-setup-storage

When the permission prompt appears, tap "Allow".

Verify Storage Access

Check if storage is accessible:

ls

What you should see: A list of folders, including one called storage. This confirms Termux can now access your device's files!

Part 3: Installing the Terminal Server

The Terminal Server is a small program that allows SrcNexus Code Editor to communicate with Termux and run commands on your behalf.

Install the Server

Run this command in Termux:

curl -sL https://srcnexus.com/term/install.sh | bash

What this does: This downloads and installs the terminal server that bridges SrcNexus Code Editor and Termux.

If the installation fails, try running the command again. If the problem persists, contact us at [email protected].

Part 4: Starting the Terminal Server

Before using the terminal in SrcNexus Code Editor, make sure that Termux is running on your device. You also need to start the server in Termux first.

Start the Server

In Termux, run:

term

What this does: This starts the terminal server. SrcNexus Code Editor will connect to it to execute commands.

What you should see: When you run term for the first time, it will display an authentication key in the terminal. You'll need this key in the next step.

Keep Termux Running

Keep Termux running in the background while you work in SrcNexus Code Editor. If you close Termux or the server stops, the terminal feature in SrcNexus Code Editor will stop working.

You'll need to run term every time you restart Termux or your device.

Part 5: Connecting SrcNexus Code Editor to the Server

Now that the server is running, let's connect SrcNexus Code Editor to it.

Enter the Authentication Key

  1. Open the SrcNexus Code Editor app
  2. Go to the terminal section — a popup will appear asking for the authentication key
  3. Copy the key shown in Termux when you ran term
  4. Paste the key into the popup
  5. Tap Connect
Need a new key?

Stop the server in Termux (press Ctrl+C) and run term --reset to generate a new authentication key.

Using Terminal in SrcNexus Code Editor

Once connected, you can open the terminal:

  1. Open the SrcNexus Code Editor app
  2. Go to the home screen
  3. Tap the tools icon at the bottom (looks like a wrench or settings icon)
  4. Select "Open Terminal"

Opening the Terminal in a Project

  1. Open any project in SrcNexus Code Editor
  2. Tap the terminal icon in the top toolbar above editor