### Install Dependencies
Source: https://github.com/drolu/sensor/blob/main/CLAUDE.md
Use this command to install all necessary project dependencies.
```bash
npm install
```
--------------------------------
### Clone and Install Dependencies for Sensor Development
Source: https://github.com/drolu/sensor/blob/main/README.md
This snippet shows the basic commands to clone the Sensor repository, navigate into the directory, and install the necessary npm dependencies to start development.
```bash
git clone https://github.com/DrOlu/Sensor.git
cd Sensor
npm install
```
--------------------------------
### Start Development Server
Source: https://github.com/drolu/sensor/blob/main/CLAUDE.md
Starts the development server, which includes linting before launching Vite and Electron concurrently.
```bash
npm run dev
```
--------------------------------
### AsidePanel Basic Usage Example
Source: https://github.com/drolu/sensor/blob/main/AGENTS.md
Demonstrates the basic structure and common props for the AsidePanel component, including title, subtitle, back button, and actions.
```tsx
Duplicate
Delete
}
>
{/* Your scrollable content here */}
```
--------------------------------
### Start a Long-Running Job
Source: https://github.com/drolu/sensor/blob/main/skills/netcatty-tool-cli/references/exec.md
For tasks expected to exceed 60 seconds or stream output, use `job-start` instead of `exec`. This initiates a job that can be polled later.
```bash
job-start --session --chat-session --json --
```
--------------------------------
### Get Runtime Diagnostics
Source: https://github.com/drolu/sensor/blob/main/skills/netcatty-tool-cli/references/control-commands.md
Use this command to retrieve current runtime diagnostics for the Sensor CLI. It outputs information in JSON format.
```bash
status --json
```
--------------------------------
### CSS Variables and Font Face
Source: https://github.com/drolu/sensor/blob/main/index.html
Defines custom fonts and CSS variables for theming, including light and dark mode color schemes, border-radius, and accent colors. This setup allows for dynamic theme adjustments.
```css
/* Load extended Unicode ranges for terminal box drawing characters */ @font-face { font-family: 'JetBrains Mono Extended'; src: local('JetBrains Mono'), local('JetBrainsMono-Regular'); unicode-range: U+2500-257F, U+2580-259F, U+25A0-25FF, U+2700-27BF; }
:root { --background: 216 33% 96%; --foreground: 222 47% 12%; --card: 0 0% 100%; --card-foreground: 222 47% 12%; --popover: 0 0% 100%; --popover-foreground: 222 47% 12%; --primary: 208 100% 50%; --primary-foreground: 0 0% 100%; --secondary: 220 16% 90%; --secondary-foreground: 222 47% 12%; --muted: 220 16% 90%; --muted-foreground: 220 10% 45%; --accent: var(--primary); --accent-foreground: 222 47% 12%; --destructive: 0 70% 50%; --destructive-foreground: 0 0% 100%; --border: 220 16% 82%; --input: 220 16% 82%; --ring: 208 100% 50%; --radius: 0.65rem; }
.dark { --background: 220 28% 8%; --foreground: 210 40% 95%; --card: 220 22% 12%; --card-foreground: 210 40% 95%; --popover: 220 22% 12%; --popover-foreground: 210 40% 95%; --primary: 200 100% 61%; --primary-foreground: 220 40% 96%; --secondary: 220 16% 16%; --secondary-foreground: 210 40% 90%; --muted: 220 16% 16%; --muted-foreground: 220 10% 70%; --accent: var(--primary); --accent-foreground: 220 40% 96%; --destructive: 0 70% 50%; --destructive-foreground: 210 40% 96%; --border: 220 22% 18%; --input: 220 22% 18%; --ring: 200 100% 61%; --radius: 0.65rem; }
body { font-family: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; margin: 0; background: hsl(var(--background)); color: hsl(var(--foreground)); }
```
--------------------------------
### Poll a Long-Running Job
Source: https://github.com/drolu/sensor/blob/main/skills/netcatty-tool-cli/references/exec.md
Periodically check the status and output of a started job using its job ID. Adjust the offset for incremental output retrieval.
```bash
job-poll --job --chat-session --offset --json
```
--------------------------------
### Build Renderer Process
Source: https://github.com/drolu/sensor/blob/main/CLAUDE.md
Builds the React renderer process for production.
```bash
npm run build
```
--------------------------------
### Package for Current Platform
Source: https://github.com/drolu/sensor/blob/main/CLAUDE.md
Packages the application for the current operating system.
```bash
npm run pack
```
--------------------------------
### Migration from Manual Panel Implementation
Source: https://github.com/drolu/sensor/blob/main/AGENTS.md
Compares the old manual implementation of a side panel with the new approach using AsidePanel components. This highlights the benefits of using the component library for consistency and ease of use.
```tsx
// OLD: Manual implementation
{/* header content */}
{/* content */}
// NEW: Using AsidePanel components (header via props)
{/* content */}
```
--------------------------------
### Reproduce Mosh Binaries Locally (Linux)
Source: https://github.com/drolu/sensor/blob/main/resources/mosh/README.md
This command uses Docker to build the mosh-client binary for Linux within a manylinux2014 environment. It specifies the Mosh reference version, architecture, and output directory.
```shell
docker run --rm -v $PWD:/workspace -w /workspace \
-e MOSH_REF=mosh-1.4.0 -e ARCH=x64 -e OUT_DIR=/workspace/out \
quay.io/pypa/manylinux2014_x86_64 \
bash scripts/build-mosh/build-linux.sh
```
--------------------------------
### Execute Command with Selected Session
Source: https://github.com/drolu/sensor/blob/main/skills/netcatty-tool-cli/references/exec.md
Use this when a default session is not available. First, retrieve environment variables to find a connected session, then execute the command.
```bash
env --json --chat-session
```
```bash
session --session --json --chat-session
```
```bash
exec --session --json --chat-session --
```
--------------------------------
### Package for Specific Platforms
Source: https://github.com/drolu/sensor/blob/main/CLAUDE.md
Packages the application for specific platforms like macOS, Windows, or Linux.
```bash
npm run pack:mac
```
```bash
npm run pack:win
```
```bash
npm run pack:linux
```
--------------------------------
### Run All Tests
Source: https://github.com/drolu/sensor/blob/main/CLAUDE.md
Executes all tests within the project.
```bash
npm test
```
--------------------------------
### Execute Command with Default Session
Source: https://github.com/drolu/sensor/blob/main/skills/netcatty-tool-cli/references/exec.md
Use this when a connected default target session is available. Ensure to include session and chat session IDs.
```bash
exec --session --json --chat-session --
```
--------------------------------
### List a remote directory using SFTP
Source: https://github.com/drolu/sensor/blob/main/skills/netcatty-tool-cli/references/sftp.md
Use this command to list the contents of a directory on the remote host. Ensure you provide valid session and chat session IDs.
```bash
sftp list --session --remote-path --json --chat-session
```
--------------------------------
### Run Single Test File
Source: https://github.com/drolu/sensor/blob/main/CLAUDE.md
Executes a specific test file using Node.js with the 'tsx' import.
```bash
node --test --import tsx path/to/file.test.ts
```
--------------------------------
### Contributing Workflow
Source: https://github.com/drolu/sensor/blob/main/README.md
Follow these steps to contribute to the Sensor project, including forking, branching, committing, and submitting a pull request.
```bash
git checkout -b feature/amazing-feature
```
```bash
git commit -m 'Add some amazing feature'
```
```bash
git push origin feature/amazing-feature
```
--------------------------------
### Import Aside Panel Components
Source: https://github.com/drolu/sensor/blob/main/AGENTS.md
Import core components for the aside panel design system from the specified module. Ensure these components are available in your project.
```tsx
import {
AsidePanel,
AsidePanelHeader,
AsidePanelContent,
AsidePanelFooter,
AsideActionMenu,
AsideActionMenuItem
} from "./ui/aside-panel";
```
--------------------------------
### Download a remote file to a local path using SFTP
Source: https://github.com/drolu/sensor/blob/main/skills/netcatty-tool-cli/references/sftp.md
Use this command to download a file from the remote host to a specified local path. This is appropriate when the user explicitly requests a download to the local filesystem.
```bash
sftp download --session --remote-path --local-path --json --chat-session
```
--------------------------------
### JavaScript Theme and Accent Color Management
Source: https://github.com/drolu/sensor/blob/main/index.html
Initializes theme (light/dark/system), accent color, and UI language based on localStorage settings. It applies classes to the root element for theming and sets CSS custom properties for accent colors.
```javascript
(function () { try { var theme = localStorage.getItem('netcatty_theme_v1'); var accentMode = localStorage.getItem('netcatty_accent_mode_v1'); var accentColor = localStorage.getItem('netcatty_color_v1'); var lang = localStorage.getItem('netcatty_ui_language_v1'); var root = document.documentElement; // Resolve 'system' (or absent — default is 'system') via OS preference var resolved = theme; if (!theme || theme === 'system') { resolved = (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) ? 'dark' : 'light'; } if (resolved === 'dark' || resolved === 'light') { root.classList.remove('light', 'dark'); root.classList.add(resolved); } if (accentMode === 'custom' && accentColor) { root.style.setProperty('--primary', accentColor); root.style.setProperty('--accent', accentColor); root.style.setProperty('--ring', accentColor); var parts = accentColor.split(/\s+/); var lightness = parseFloat((parts[2] || '').replace('%', '')); var accentForeground = resolved === 'dark' ? '220 40% 96%' : (!isNaN(lightness) && lightness < 55 ? '0 0% 98%' : '222 47% 12%'); root.style.setProperty('--accent-foreground', accentForeground); root.style.setProperty('--primary-foreground', accentForeground); } if (lang) root.lang = lang; } catch (e) { // ignore } })();
```
--------------------------------
### Upload a local file to a remote path using SFTP
Source: https://github.com/drolu/sensor/blob/main/skills/netcatty-tool-cli/references/sftp.md
Use this command to upload an existing local file to a specified path on the remote host. This is intended for transferring files that already exist locally.
```bash
sftp upload --session --local-path --remote-path --json --chat-session
```
--------------------------------
### Read a remote file using SFTP
Source: https://github.com/drolu/sensor/blob/main/skills/netcatty-tool-cli/references/sftp.md
Use this command to read the content of a file on the remote host. Provide the necessary session and chat session identifiers.
```bash
sftp read --session --remote-path --json --chat-session
```
--------------------------------
### Write File
Source: https://github.com/drolu/sensor/blob/main/skills/netcatty-tool-cli/references/sftp.md
Writes content to a small text file on the remote host.
```APIDOC
## SFTP Write File
### Description
Writes content to a small text file on the remote host. Use this for creating or updating small text files with known content.
### Method
SFTP
### Endpoint
sftp write
### Parameters
#### Path Parameters
- **session** (string) - Required - The session ID for the SFTP connection.
- **remote-path** (string) - Required - The path to the file on the remote host.
- **content** (string) - Required - The text content to write to the file.
- **chat-session** (string) - Required - The chat session ID.
#### Query Parameters
- **json** - Optional - Flag to output in JSON format.
```
--------------------------------
### Write content to a remote file using SFTP
Source: https://github.com/drolu/sensor/blob/main/skills/netcatty-tool-cli/references/sftp.md
Use this command to write specified text content to a file on the remote host. This is suitable for small text files with known content. Ensure session IDs are correctly provided.
```bash
sftp write --session --remote-path --content --json --chat-session
```
--------------------------------
### List Directory
Source: https://github.com/drolu/sensor/blob/main/skills/netcatty-tool-cli/references/sftp.md
Lists the contents of a remote directory.
```APIDOC
## SFTP List Directory
### Description
Lists the contents of a remote directory.
### Method
SFTP
### Endpoint
sftp list
### Parameters
#### Path Parameters
- **session** (string) - Required - The session ID for the SFTP connection.
- **remote-path** (string) - Required - The path to the directory on the remote host.
- **chat-session** (string) - Required - The chat session ID.
#### Query Parameters
- **json** - Optional - Flag to output in JSON format.
```
--------------------------------
### Upload File
Source: https://github.com/drolu/sensor/blob/main/skills/netcatty-tool-cli/references/sftp.md
Uploads an existing local file to a remote path.
```APIDOC
## SFTP Upload File
### Description
Uploads an existing local file to a remote path. Use this only when a real local file already exists and must be transferred.
### Method
SFTP
### Endpoint
sftp upload
### Parameters
#### Path Parameters
- **session** (string) - Required - The session ID for the SFTP connection.
- **local-path** (string) - Required - The path to the existing file on the local machine.
- **remote-path** (string) - Required - The path on the remote host where the file will be uploaded.
- **chat-session** (string) - Required - The chat session ID.
#### Query Parameters
- **json** - Optional - Flag to output in JSON format.
```
--------------------------------
### Splash Screen Styles
Source: https://github.com/drolu/sensor/blob/main/index.html
Defines styles for a fixed splash screen, including centering content, background, z-index, and transitions for fading out. Also includes styles for a spinning loader.
```css
/* Splash screen styles */ .splash-screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: hsl(var(--background)); z-index: 9999; transition: opacity 0.2s ease-out; }
.splash-screen.fade-out { opacity: 0; pointer-events: none; }
.splash-content { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.splash-logo { width: 64px; height: 64px; border-radius: 14px; }
.splash-spinner { width: 24px; height: 24px; border: 2px solid hsl(var(--muted)); border-top-color: hsl(var(--primary)); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
```
--------------------------------
### Download File
Source: https://github.com/drolu/sensor/blob/main/skills/netcatty-tool-cli/references/sftp.md
Downloads a remote file to a specified local path.
```APIDOC
## SFTP Download File
### Description
Downloads a remote file to an existing local path. Use this when the result must be saved to the local filesystem.
### Method
SFTP
### Endpoint
sftp download
### Parameters
#### Path Parameters
- **session** (string) - Required - The session ID for the SFTP connection.
- **remote-path** (string) - Required - The path to the file on the remote host.
- **local-path** (string) - Required - The path on the local machine where the file will be saved.
- **chat-session** (string) - Required - The chat session ID.
#### Query Parameters
- **json** - Optional - Flag to output in JSON format.
```
--------------------------------
### Re-enable Execution for a Chat Scope
Source: https://github.com/drolu/sensor/blob/main/skills/netcatty-tool-cli/references/control-commands.md
Use this command to re-enable execution for a chat scope after it has been cancelled. This allows subsequent exec calls to proceed. The output is in JSON format.
```bash
resume --chat-session --json
```
--------------------------------
### Lint Code
Source: https://github.com/drolu/sensor/blob/main/CLAUDE.md
Runs the linter to check for code style issues. Use `lint:fix` to automatically resolve fixable issues.
```bash
npm run lint
```
```bash
npm run lint:fix
```
--------------------------------
### Read File
Source: https://github.com/drolu/sensor/blob/main/skills/netcatty-tool-cli/references/sftp.md
Reads the content of a remote file.
```APIDOC
## SFTP Read File
### Description
Reads the content of a remote file.
### Method
SFTP
### Endpoint
sftp read
### Parameters
#### Path Parameters
- **session** (string) - Required - The session ID for the SFTP connection.
- **remote-path** (string) - Required - The path to the file on the remote host.
- **chat-session** (string) - Required - The chat session ID.
#### Query Parameters
- **json** - Optional - Flag to output in JSON format.
```
--------------------------------
### Delete Path
Source: https://github.com/drolu/sensor/blob/main/skills/netcatty-tool-cli/references/sftp.md
Deletes a remote file or directory.
```APIDOC
## SFTP Delete Path
### Description
Deletes a remote file or directory.
### Method
SFTP
### Endpoint
sftp delete
### Parameters
#### Path Parameters
- **session** (string) - Required - The session ID for the SFTP connection.
- **remote-path** (string) - Required - The path to the file or directory on the remote host to delete.
- **chat-session** (string) - Required - The chat session ID.
#### Query Parameters
- **json** - Optional - Flag to output in JSON format.
```
--------------------------------
### Delete a remote path using SFTP
Source: https://github.com/drolu/sensor/blob/main/skills/netcatty-tool-cli/references/sftp.md
Use this command to delete a file or directory at the specified remote path. Ensure you provide valid session and chat session IDs.
```bash
sftp delete --session --remote-path --json --chat-session
```
--------------------------------
### MIT License Text
Source: https://github.com/drolu/sensor/blob/main/public/ai/providers/NOTICE.md
The MIT License text as provided in the source. This license applies to icons sourced from lobehub/lobe-icons.
```plaintext
MIT License
Copyright (c) 2023 LobeHub
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
--------------------------------
### Modern Scrollbar Styling
Source: https://github.com/drolu/sensor/blob/main/index.html
Applies a modern, minimalist scrollbar style using WebKit pseudo-elements. It ensures a consistent look across browsers that support these properties.
```css
/* Global Modern Scrollbar */ ::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: hsl(var(--muted-foreground) / 0.3); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: hsl(var(--muted-foreground) / 0.5); background-clip: content-box; }
::-webkit-scrollbar-corner { background: transparent; }
/* Utility to hide scrollbar */ .scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
```
--------------------------------
### Cancel Outstanding Sensor Work
Source: https://github.com/drolu/sensor/blob/main/skills/netcatty-tool-cli/references/control-commands.md
This command cancels all outstanding Sensor work for a specified chat session, including in-flight exec, SFTP transfers, and job-start tasks. The output is in JSON format.
```bash
cancel --chat-session --json
```
--------------------------------
### Stop a Long-Running Job
Source: https://github.com/drolu/sensor/blob/main/skills/netcatty-tool-cli/references/exec.md
If a user requests to terminate a long-running job, use this command with the job ID.
```bash
job-stop --job --chat-session --json
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.