Summary
The Smart Terminal provides an intuitive interface to send commands to a connected device. It intelligently generates and proposes commands based on your natural language input, allows you to review and adjust them, and execute them individually or as a script. You can also view detailed results, manage administrator access, and control autoplay settings.
Page Access
You can access this page by navigating to: /devices_configure
Page Functionalities
Command Input & Execution
- Input Field: Type your commands or natural language requests here.
- Send Button: Submits your input for processing.
- Command History Navigation: Use the Up ↑ and Down ↓ arrow keys on your keyboard to cycle through previously entered commands in the input field.
Terminal Session Controls
- Intelligent Terminal Label: An informative label indicating that the system will assist in generating commands based on your input.
- Activate/Deactivate Administrator User Button (Shield icon): Toggles elevated privileges (
sudo) for commands. This is required for actions that modify system-level files or settings. Use with caution.
- Disconnect Terminal Session Button (Exit icon): Safely closes your active SSH connection to the device.
- Show SSH Console Button (Console icon): Switches the view to a raw SSH terminal interface, allowing for direct command-line interaction without intelligent assistance.
Command Review and Management (when commands are proposed)
When you enter a natural language request, the system may propose a list of commands for you to review before execution.
- Proposed Commands Section: Displays a list of commands that the intelligent terminal has generated based on your input.
- Warning Indicators: Visual alerts will appear if proposed commands:
- Require Administrator Access (Root Required).
- Need Manual User Input during execution.
- Involve potentially destructive Delete Operations.
- Individual Command Field: An editable text field where you can modify each proposed command directly before executing it.
- Remove Command Button (Trash icon): Clears an individual proposed command from the list, effectively removing it from the current set of commands to be reviewed or executed.
- Play Command Button (Play icon): Executes a single proposed command immediately.
- Save as script Button (Save icon): Saves all currently displayed proposed commands into a shell script (
.sh) file on the connected device.
- Play all commands Button (Playlist Play icon): Executes all proposed commands sequentially, one after another. The sequence will stop if any command encounters an error.
- Additional Change Requests Field: A text field where you can type in further instructions or modifications you want the system to apply to the proposed commands. For example, specify a different version for an installation.
- Review and update commands Button (Update icon): Submits your changes or additional requests to the intelligent terminal for re-evaluation, causing it to generate a revised set of commands.
Result Display
- Executed Command Display: Shows the exact command that was successfully run.
- Progress Indicators: Messages like "Wait for result from device" (with a percentage) and "Processing result" will appear during the execution and analysis of commands.
- Result Summary: A brief overview of the command's outcome is displayed.
- Expand/Collapse Details Button: Toggles a detailed, structured view (often in JSON format) of the command's output, providing more in-depth information.
Autoplay Status Indicator
This section informs you whether the system is automatically executing received commands. Clicking this indicator opens the Terminal Options to adjust settings related to autoplay and other terminal behaviors.
Scenario Executions
Possible usage steps within this page
- Executing a Simple Command:
- Type
list all files into the Command Input Field.
- Click the Send button.
- Review the proposed command (e.g.,
ls -l).
- Click the Play button next to the proposed command.
- Observe the command's output appearing in the chat history.
- Modifying a Proposed Command:
- Type
create a new directory called "mydata" into the Command Input Field.
- Click the Send button.
- The system proposes a command like
mkdir mydata.
- Edit the text in the command field to
mkdir mydata_folder.
- Click the Play button next to the modified command.
- Verify that the new directory
mydata_folder has been created on the device.
- Using Keyboard History:
- Enter several different commands or prompts into the Command Input Field.
- Press the ↑ (Up arrow) key repeatedly to cycle back through your previously entered commands.
- Press the ↓ (Down arrow) key repeatedly to cycle forward through your command history.
- Saving Generated Commands as a Script:
- Enter a complex prompt such as
setup a web server with apache and install php into the Command Input Field.
- Review the series of proposed commands generated by the system.
- Click the Save as script button (floppy disk icon).
- In the pop-up dialog, enter a filename (e.g.,
web_setup.sh) for your script.
- Confirm the saving action.
- Receive a confirmation message indicating that the script has been successfully saved to your device.
- Executing All Proposed Commands:
- Follow the steps for "Saving Generated Commands as a Script" up to reviewing the commands.
- Click the Play all commands button (playlist play icon).
- Observe each command being executed in sequence within the chat history.
- Refining Proposed Commands with Additional Requests:
- Enter
install nodejs into the Command Input Field.
- Review the proposed commands (e.g., for Ubuntu).
- In the "Enter additional change requests" field below the proposed commands, type
use version 18.
- Click the Review and update commands button (update icon).
- Observe the system generating new commands specifically tailored for installing Node.js version 18.
- Switching to Raw SSH Console:
- Click the Show SSH console button (console icon) in the header.
- The view will change to a traditional SSH terminal interface where you can type commands directly.
- To return, click the Show Intelligent Terminal button.
- Managing Administrator (Sudo) Access:
- Click the Activate / deactivate administrator user button (shield icon).
- If prompted, provide your device's credentials to enable elevated privileges.
- Observe commands requiring administrator access now executing successfully.
- Click the button again to deactivate administrator access when no longer needed.
Possible errors which may occur on this page
- Command Execution Failure:
- Error: A command you executed fails, and an error message appears in the chat history.
- Why it happens: The command might be incorrect, the device may not have the necessary software installed, or there could be permission issues preventing the command from running successfully.
- Troubleshooting: Carefully check the command for typos or syntax errors. Ensure the device is properly configured with all required components. If it's a permission issue, try activating administrator user mode.
- Session Disconnection:
- Error: The terminal unexpectedly disconnects, and you see a message indicating that the SSH session is no longer active.
- Why it happens: This can occur due to inactivity timeouts, network connection problems between your device and the connected system, or the remote device going offline.
- Troubleshooting: Attempt to reconnect to the device. Verify your internet or local network connection is stable.
- "Root Required" Warning:
- Error: A warning message appears stating "Root Required" when you attempt to execute certain commands.
- Why it happens: The command you are trying to run requires elevated administrative privileges (root or sudo access) which are not currently active for your session.
- Troubleshooting: Click the Activate / deactivate administrator user button (shield icon) and provide your credentials if prompted to enable sudo mode.
- "User Input Required" Warning:
- Error: A warning message appears indicating "User Input Required".
- Why it happens: The command needs you to manually enter information (such as a 'yes/no' confirmation or a password) during its execution. The intelligent terminal cannot automate this type of interaction.
- Troubleshooting: Switch to the raw SSH console view using the Show SSH console button and execute the command there to provide the necessary manual input directly.
- "Delete Operations" Warning:
- Error: A warning message appears highlighting that the proposed commands involve "Delete Operations".
- Why it happens: The commands generated by the system include actions that will remove files or directories from your device. This can lead to irreversible data loss.
- Troubleshooting: Carefully review the commands listed. Ensure that you genuinely intend to delete the specified items. Modify or remove any delete commands if they are not desired.
- Script Saving Failure:
- Error: You receive an error message after attempting to "Save as script".
- Why it happens: This could be due to network issues preventing the file upload to the device, or insufficient permissions on the connected device to write files to the chosen location.
- Troubleshooting: Check your network connection. Ensure that the connected device has write permissions in the target directory (your home directory on the device is often a safe and accessible default).