### Run Specific Backend Rust Test Example Source: https://github.com/nyakang/nyaterm/blob/main/AGENTS.md An example command to run a single, specifically named Rust test for the backend. ```bash cargo test --manifest-path src-tauri/Cargo.toml normalizes_trailing_slashes_without_breaking_roots ``` -------------------------------- ### Clone and develop NyaTerm Source: https://github.com/nyakang/nyaterm/blob/main/README.md Clone the NyaTerm repository, install dependencies with pnpm, and start the development server using Tauri. ```bash git clone https://github.com/nyakang/nyaterm.git cd nyaterm pnpm install pnpm tauri dev ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/nyakang/nyaterm/blob/main/docs-site/i18n/en/docusaurus-plugin-content-docs/current/development/setup.md Installs all necessary Node.js dependencies using pnpm, as defined in the project's package.json. ```bash pnpm install ``` -------------------------------- ### Install Rust using rustup Source: https://github.com/nyakang/nyaterm/blob/main/docs-site/i18n/en/docusaurus-plugin-content-docs/current/development/setup.md Installs the latest stable Rust version using the official rustup script. Recommended for Linux and macOS. ```bash curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` -------------------------------- ### WindTerm Quickbar Configuration Path Source: https://github.com/nyakang/nyaterm/blob/main/docs-site/i18n/en/docusaurus-plugin-content-docs/current/guide/quick-commands.md These are example file paths for WindTerm's quickbar configuration file, used for importing commands into NyaTerm. The paths differ based on the operating system. ```text ~/.wind/profiles/default.v10/terminal/quickbar.config ``` ```text C:\Users\\.wind\profiles\default.v10\terminal\quickbar.config ``` -------------------------------- ### Install Linux Dependencies (Ubuntu/Debian) Source: https://github.com/nyakang/nyaterm/blob/main/docs-site/i18n/en/docusaurus-plugin-content-docs/current/development/setup.md Installs necessary development packages on Ubuntu/Debian-based Linux distributions for building Nyaterm. ```bash sudo apt update sudo apt install libwebkit2gtk-4.1-dev build-essential curl wget file \ libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev ``` -------------------------------- ### Start Development Server Source: https://github.com/nyakang/nyaterm/blob/main/docs-site/i18n/en/docusaurus-plugin-content-docs/current/development/setup.md Launches the Tauri development server, which includes a Vite dev server for the frontend and the Tauri application window. Enables hot-reloading for frontend and recompilation for Rust changes. ```bash pnpm tauri dev ``` -------------------------------- ### Install NyaTerm from AUR using yay Source: https://github.com/nyakang/nyaterm/blob/main/README.md Use this command to install the NyaTerm binary package from the Arch User Repository (AUR) with the `yay` helper. ```bash yay -S nyaterm-bin ``` -------------------------------- ### Conventional Commit Examples Source: https://github.com/nyakang/nyaterm/blob/main/docs-site/i18n/en/docusaurus-plugin-content-docs/current/development/contributing.md Examples of valid conventional commit messages for different types of changes. ```bash feat(sftp): add batch file download support ``` ```bash fix(ssh): handle connection timeout correctly ``` ```bash docs: update installation guide ``` -------------------------------- ### Install macOS Command Line Tools Source: https://github.com/nyakang/nyaterm/blob/main/docs-site/i18n/en/docusaurus-plugin-content-docs/current/development/setup.md Installs essential command-line developer tools on macOS, required for Rust and other development tasks. ```bash xcode-select --install ``` -------------------------------- ### Install NyaTerm from AUR using paru Source: https://github.com/nyakang/nyaterm/blob/main/README.md Use this command to install the NyaTerm binary package from the Arch User Repository (AUR) with the `paru` helper. ```bash paru -S nyaterm-bin ``` -------------------------------- ### NyaTerm JSON Import Example Source: https://github.com/nyakang/nyaterm/blob/main/docs-site/i18n/en/docusaurus-plugin-content-docs/current/guide/quick-commands.md This JSON structure defines categories and commands for importing into NyaTerm. It includes examples of 'execute' and 'append' execution modes, along with optional fields like description, color, icon, and pinning. ```json { "categories": [ { "id": "general", "name": "General" }, { "id": "k8s", "name": "Kubernetes" } ], "commands": [ { "id": "cmd-list-files", "label": "List files", "command": "ls -la", "category_id": "general", "description": "List files with details", "color_tag": "blue", "icon_tag": "terminal", "pinned": true, "execution_mode": "execute", "source": "manual", "risk_level": "low" }, { "label": "Kubernetes pods", "command": "kubectl get pods -A", "category": "Kubernetes", "execution_mode": "append", "risk_level": "low" } ] } ``` -------------------------------- ### ZFILE Frame Pathname Example Source: https://github.com/nyakang/nyaterm/blob/main/src-tauri/vendor/zmodem2/docs/zmodem.txt Provides an assembly language example of how a null-terminated ASCII string is used for the pathname field within a ZFILE frame. This format is compatible with MSDOS and C library fopen functions. ```assembly DB 'foo.bar',0 ``` -------------------------------- ### Serve Docs Site Locally (All Locales) Source: https://github.com/nyakang/nyaterm/blob/main/AGENTS.md Builds and serves the documentation site locally, including all locales. ```bash pnpm --dir docs-site start ``` -------------------------------- ### Build Docs Site Source: https://github.com/nyakang/nyaterm/blob/main/AGENTS.md Builds the documentation site for deployment. ```bash pnpm --dir docs-site build ``` -------------------------------- ### Serve English Docs Site Locally Source: https://github.com/nyakang/nyaterm/blob/main/AGENTS.md Runs the English documentation site development server with hot reload functionality. ```bash pnpm --dir docs-site start:en ``` -------------------------------- ### Run Demo Script for Action Links and Keyword Highlighting Source: https://github.com/nyakang/nyaterm/blob/main/docs-site/i18n/en/docusaurus-plugin-content-docs/current/guide/terminal.md Execute these scripts to generate demos for action links and keyword highlighting. Ensure action links and keyword highlighting are enabled in Settings → Terminal before running. ```bash scripts/demo-terminal-output.sh ``` ```bash scripts/demo-action-links.sh ``` -------------------------------- ### Serve Chinese Docs Site Locally Source: https://github.com/nyakang/nyaterm/blob/main/AGENTS.md Runs the Chinese (zh-CN) documentation site development server with hot reload functionality. ```bash pnpm --dir docs-site start:zh ``` -------------------------------- ### ZMODEM Session Startup - Sending 'rz\r' Source: https://github.com/nyakang/nyaterm/blob/main/src-tauri/vendor/zmodem2/docs/zmodem.txt Demonstrates the initial command sequence to invoke a ZMODEM receiving program from a sending program. The 'rz\r' string activates the receiver. ```text rz ``` -------------------------------- ### Build NyaTerm from AUR source Source: https://github.com/nyakang/nyaterm/blob/main/README.md Clone the AUR repository, navigate to the directory, and build the package locally using `makepkg`. ```bash git clone https://aur.archlinux.org/nyaterm-bin.git cd nyaterm-bin makepkg -si ``` -------------------------------- ### Bash Variable Prompt Example Source: https://github.com/nyakang/nyaterm/blob/main/docs-site/i18n/en/docusaurus-plugin-content-docs/current/guide/quick-commands.md This bash script demonstrates how to use variable placeholders like {{variableName}} within a command script. NyaTerm will prompt the user to fill in these variables before executing the command. ```bash docker exec -it {{container_name}} bash ``` -------------------------------- ### ZMODEM Session Startup - Receiver Sends ZRINIT or ZCHALLENGE Source: https://github.com/nyakang/nyaterm/blob/main/src-tauri/vendor/zmodem2/docs/zmodem.txt Details the initial headers sent by the ZMODEM receiving program upon starting: ZRINIT to initiate ZMODEM transfers or ZCHALLENGE for sender verification. ```text ZRINIT ``` ```text ZCHALLENGE ``` -------------------------------- ### Build with GitHub Gist Client ID Source: https://github.com/nyakang/nyaterm/blob/main/docs-site/i18n/en/docusaurus-plugin-content-docs/current/development/setup.md Builds the production version of Nyaterm, setting the GitHub OAuth App device flow Client ID for cloud sync authorization. This example shows how to set the environment variable before building. ```bash NYATERM_GITHUB_GIST_CLIENT_ID=your_client_id pnpm tauri build ``` -------------------------------- ### Release Application Source: https://github.com/nyakang/nyaterm/blob/main/AGENTS.md Performs version synchronization, frontend build, and Tauri build for releasing the application. ```bash pnpm release ``` -------------------------------- ### Build for Production Source: https://github.com/nyakang/nyaterm/blob/main/docs-site/i18n/en/docusaurus-plugin-content-docs/current/development/setup.md Creates a production-ready build of the Nyaterm application. Artifacts are located in `src-tauri/target/release/bundle/`. ```bash pnpm tauri build ``` -------------------------------- ### ZMODEM Session Startup - Sender Responds to ZCHALLENGE Source: https://github.com/nyakang/nyaterm/blob/main/src-tauri/vendor/zmodem2/docs/zmodem.txt Explains how the sending program responds to a ZCHALLENGE header by placing the received data into ZP0...ZP3 and sending an answering ZACK header. ```text ZCHALLENGE ``` ```text ZP0 ``` ```text ZP1 ``` ```text ZP2 ``` ```text ZP3 ``` ```text ZACK ``` -------------------------------- ### ZMODEM Session Startup - ZRQINIT Header Source: https://github.com/nyakang/nyaterm/blob/main/src-tauri/vendor/zmodem2/docs/zmodem.txt Shows the ZRQINIT header used by the sender to prompt the receiver to send its ZRINIT header. This is part of the ZMODEM session initiation sequence. ```text ZRQINIT ``` -------------------------------- ### ZMODEM Session Startup - Handling XMODEM/YMODEM Invitation Source: https://github.com/nyakang/nyaterm/blob/main/src-tauri/vendor/zmodem2/docs/zmodem.txt Explains how the sender interprets received characters ('C', 'G', or NAK) as an indication to use XMODEM or YMODEM protocols for file transfer. ```text C ``` ```text G ``` ```text NAK ``` -------------------------------- ### Challenge and Command Download Session Source: https://github.com/nyakang/nyaterm/blob/main/src-tauri/vendor/zmodem2/docs/zmodem.txt Demonstrates a ZMODEM session involving a challenge-response mechanism for command download. This sequence includes frames for challenge, acknowledgment, command execution, and completion. ```text Sender Receiver "rz\r" ZRQINIT(ZCOMMAND) ZCHALLENGE(random-number) ZACK(same-number) ZRINIT ZCOMMAND, ZDATA (Performs Command) ZCOMPL ZFIN ZFIN OO ``` -------------------------------- ### Backend Runtime Entry Point Source: https://github.com/nyakang/nyaterm/blob/main/docs-site/docs/development/architecture.md The entry point for the backend, responsible for building and injecting shared states like SessionManager and registering Tauri commands. ```rust // src-tauri/src/lib.rs // Initializes shared states and registers all Tauri commands. ``` -------------------------------- ### Run Vite Frontend Source: https://github.com/nyakang/nyaterm/blob/main/AGENTS.md Runs the Vite frontend development server. ```bash pnpm dev ```