CyberCat is a small Nx workspace with:
- a Fastify service that discovers runnable script commands and streams output over Server-Sent Events
- a React web app that lets you filter, run, and watch those commands in a terminal-style UI
- a global shortcut selection speaker that captures selected text and asks an OpenAI-compatible qwen-omni model to speak it
- a global shortcut selection assistant that can capture selected text, call an OpenAI-compatible chat endpoint, stream the result into the web UI, and append an output-only Markdown log
- colocated command entrypoints under commands and a local
.envfile in theCyberCatroot
- apps/service contains the Fastify API and command execution backend
- apps/web contains the React UI and web assets
- commands/xgd contains the xgd test scripts
- commands/zixiCat contains the zixiCat helper scripts
Create a local environment file from .env.example and add your credentials before running the xgd commands.
Start the web app and service together:
npm startStart the service:
npx nx serve @cyber-cat/serviceStart the web app:
npx nx serve @cyber-cat/webBuild both apps:
npx nx build @cyber-cat/service
npx nx build @cyber-cat/webThe selection speaker listens for a global shortcut, reads the current Windows selection, requests audio from an OpenAI-compatible chat completions endpoint, writes a temporary WAV file, and plays it locally.
Configure it in .env.example through these variables:
SELECTION_SPEAKER_SHORTCUTto change the global shortcutSELECTION_SPEAKER_API_KEY,SELECTION_SPEAKER_BASE_URL, andSELECTION_SPEAKER_MODELfor the audio-capable LLM endpointSELECTION_SPEAKER_VOICEto choose among the currently supported qwen-omni voices:Ethan,Chelsie, orAidenSELECTION_SPEAKER_MAX_INPUT_LENGTHto cap the captured selection before sending it upstream
The selection assistant starts with the service on Windows, listens for a global shortcut, reads the current selection, sends it through the OpenAI JavaScript SDK to an OpenAI-compatible /chat/completions endpoint, shows the latest result in the web UI, and appends each output to a local Markdown log.
Configure it in .env.example through these variables:
SELECTION_ASSISTANT_SHORTCUTto change the global shortcutSELECTION_ASSISTANT_API_KEY,SELECTION_ASSISTANT_BASE_URL, andSELECTION_ASSISTANT_MODELfor the LLM endpointSELECTION_ASSISTANT_PROMPT_PATHto override the default prompt file at apps/service/src/assets/selection-assistant.prompt.mdSELECTION_ASSISTANT_LOG_PATHto choose the output-only Markdown log destination
CyberCat discovers shell scripts directly from commands/xgd and commands/zixiCat. They run from the repository root:
bash ./commands/xgd/qwen-chat-llm-test.bash
bash ./commands/xgd/qwen-embed-test.bash
bash ./commands/xgd/qwen-rerank-test.bash
bash ./commands/zixiCat/copy-command2run-remote-bashrc.bash