-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Add ray-tools extension #30450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
buhaistrikalo
wants to merge
5
commits into
raycast:main
Choose a base branch
from
buhaistrikalo:ext/ray-tools
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+8,174
−0
Open
Add ray-tools extension #30450
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f6deac2
Add ray-tools extension
buhaistrikalo 9a8c443
chore: add ray-tools changelog
buhaistrikalo f767495
fix ray-tools review findings
buhaistrikalo b127491
fix metadata image dimensions
buhaistrikalo bf0ca66
fix metadata image padding
buhaistrikalo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| root = true | ||
|
|
||
| [*] | ||
| charset = utf-8 | ||
| end_of_line = lf | ||
| insert_final_newline = true | ||
| indent_style = space | ||
| indent_size = 2 | ||
|
|
||
| [*.md] | ||
| trim_trailing_whitespace = false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| * text=auto eol=lf | ||
| *.png binary |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # Dependencies and generated output | ||
| node_modules/ | ||
| dist/ | ||
| coverage/ | ||
|
|
||
| # Local configuration and secrets | ||
| .env | ||
| .env.* | ||
| !.env.example | ||
| .npmrc | ||
| !.npmrc.example | ||
| credentials*.json | ||
| secrets*.json | ||
| *.pem | ||
| *.key | ||
| *.p12 | ||
| *.pfx | ||
| id_rsa* | ||
| id_dsa* | ||
| id_ecdsa* | ||
| id_ed25519* | ||
|
|
||
| # macOS and editor files | ||
| .DS_Store | ||
| .idea/ | ||
| .vscode/ | ||
| *.log | ||
| *.swp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # ray-tools Changelog | ||
|
|
||
| ## [Initial Version] - 2026-08-23 | ||
|
|
||
| - Add Translate Text for Russian and English. | ||
| - Add Proofread Russian Text for spelling and punctuation checks. | ||
| - Add Clean Markdown for local plain-text cleanup of copied Markdown. | ||
| - Add Ping for network diagnostics. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # Contributing | ||
|
|
||
| Thanks for helping improve Ray Tools. | ||
|
|
||
| ## Development setup | ||
|
|
||
| 1. Install Node.js 22.22.2 or newer. | ||
| 2. Install dependencies with `npm ci`. | ||
| 3. Run the complete local quality gate: | ||
|
|
||
| ```bash | ||
| npm run check | ||
| ``` | ||
|
|
||
| 4. Run `npm run dev` to load the extension in Raycast while developing. | ||
|
|
||
| ## Project conventions | ||
|
|
||
| - Keep tools independent under `src/tools/<tool-name>`. | ||
| - Keep domain logic free of Raycast imports. | ||
| - Put external integrations behind a small provider interface. | ||
| - Add or update unit tests for behavior changes. | ||
| - Do not commit `.env` files, credentials, private keys, personal data, or confidential translation samples. | ||
|
|
||
| ## Pull requests | ||
|
|
||
| - Explain what changed and why. | ||
| - Keep changes focused and avoid unrelated reformatting. | ||
| - Include the commands used to verify the change, normally `npm run check`. | ||
| - Make sure the CI checks pass before requesting review. | ||
|
|
||
| For security issues, follow [SECURITY.md](SECURITY.md) instead of opening a public issue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # Ideas | ||
|
|
||
| Ray Tools is a collection of small Raycast tools for everyday work. | ||
|
|
||
| Ideas should stay independent where possible: each tool should have a focused command, a small domain layer, and replaceable external providers. | ||
|
|
||
| Possible next steps: | ||
|
|
||
| - add a second translation provider, including an authenticated or self-hosted option; | ||
| - add more focused productivity tools without coupling them to the translator; | ||
| - improve error states and provider diagnostics; | ||
| - document privacy and provider trade-offs for every network-backed tool. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) 2026 Kirill | ||
|
|
||
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| # Ray Tools | ||
|
|
||
| A small Raycast extension for focused, independent tools that make everyday work faster. | ||
|
|
||
| > Early-stage project. The extension is useful today, but the API and feature set may evolve. | ||
|
|
||
| ## Features | ||
|
|
||
| ### Translate Text | ||
|
|
||
| Translate selected text, clipboard contents, or text entered directly in Raycast. Russian and English are detected automatically and the direction is switched: | ||
|
|
||
| - `ru → en` | ||
| - `en → ru` | ||
|
|
||
| ### Proofread Russian Text | ||
|
|
||
| Check Russian spelling and punctuation in selected text, clipboard contents, or text entered directly in Raycast. The command shows each suggestion and a corrected version that can be copied or pasted. | ||
|
|
||
| ### Clean Markdown | ||
|
|
||
| Remove common Markdown formatting from selected text, clipboard contents, or text entered directly in Raycast. Bold and italic markers, links, headings, quotes, lists, task markers, code fences, and inline code are converted into readable plain text that can be copied or pasted. | ||
|
|
||
| ### Ping | ||
|
|
||
| Keep a menu-bar network status visible with a background check every 60 seconds. Ping checks the local router (macOS default gateway), packet loss to the internet host behind Google's HTTP 204 connectivity endpoint, a configurable HTTPS remote endpoint (default: `https://example.com`), and detectable macOS VPN activity. Its diagnosis is deliberately layered: it distinguishes likely local-network, ISP/internet-path, remote-server, and VPN problems, while showing `Inconclusive` when the probes do not prove a layer. A separate action runs macOS `networkQuality` for an explicit download-speed test of up to 8 seconds. | ||
|
|
||
| ## Privacy and configuration | ||
|
|
||
| - Translation text is sent over HTTPS to Google's public translation endpoint. | ||
| - Russian proofreading text is sent over HTTPS to LanguageTool's public API. | ||
| - Markdown cleaning runs locally and does not send text to a provider. | ||
| - Ping sends only connectivity requests: five ICMP echoes to the local default gateway, five ICMP echoes to the internet host, and HTTPS requests to the configured public endpoints. The optional speed test uses macOS `networkQuality` and transfers test traffic. It does not send user text, credentials, or request data to those endpoints. | ||
| - The extension does not persist translation history or store user text locally. | ||
| - Ping keeps its current result in Raycast's running menu-bar command only; it does not persist the local gateway address or probe history. | ||
| - The current providers do not require an API key or any environment variables. | ||
| - Do not put credentials into source code or a `.env` file and assume they are hidden. A Raycast extension is client-side code, so a secret bundled into it can be extracted. An authenticated provider should use Raycast keychain-backed preferences or a server-side proxy instead. | ||
|
|
||
| Do not send confidential or regulated data through the current public providers. | ||
|
|
||
| ## Requirements | ||
|
|
||
| - macOS | ||
| - [Raycast](https://www.raycast.com/) | ||
| - Node.js 22.22.2+ and npm for development | ||
|
|
||
| ## Local development | ||
|
|
||
| ```bash | ||
| npm ci | ||
| npm run check | ||
| ``` | ||
|
|
||
| Run the extension in Raycast while developing: | ||
|
|
||
| ```bash | ||
| npm run dev | ||
| ``` | ||
|
|
||
| The `check` script runs the complete local quality gate: | ||
|
|
||
| 1. unit tests; | ||
| 2. TypeScript type checking; | ||
| 3. ESLint and Prettier through Raycast's linter; | ||
| 4. a production extension build. | ||
|
|
||
| ## Architecture | ||
|
|
||
| Each tool lives under `src/tools/<tool-name>` and is split into: | ||
|
|
||
| - **domain** — pure language and request/response rules, with no Raycast imports; | ||
| - **providers** — external integrations behind a small interface; | ||
| - **UI command** — the Raycast adapter in `src/commands`. | ||
|
|
||
| Shared infrastructure belongs in `src/shared`. New tools should add their own directory and manifest command without importing another tool's UI or provider. This keeps tools independently replaceable and makes it possible to add another translation backend without changing the user flow. | ||
|
|
||
| ## Translation backend | ||
|
|
||
| The first version uses Google's public translation endpoint with automatic source-language detection. The endpoint is isolated behind `TranslationProvider`, so it can be replaced with an authenticated or self-hosted provider later without changing the user flow. | ||
|
|
||
| The public endpoint may be rate-limited or change without notice. It is intentionally treated as a replaceable provider rather than a guaranteed production API. | ||
|
|
||
| ## Russian proofreading backend | ||
|
|
||
| The Russian proofreading command uses LanguageTool's public `/v2/check` endpoint with the `ru-RU` language. It checks spelling, punctuation, grammar, and style rules, then applies the first suggestion for each non-overlapping issue to create the copyable corrected text. A small local Russian rule supplements the provider for context-sensitive spelling such as `не интересно` → `неинтересно` when there is no explicit negation or contrast. | ||
|
|
||
| The public endpoint may be rate-limited or change without notice. Text sent to it should not contain confidential or regulated data. | ||
|
|
||
| ## Contributing | ||
|
|
||
| See [CONTRIBUTING.md](CONTRIBUTING.md) for the development workflow and pull request expectations. Ideas and planned improvements are tracked in [IDEA.md](IDEA.md). | ||
|
|
||
| ## Security | ||
|
|
||
| Please read [SECURITY.md](SECURITY.md) before reporting a vulnerability. Never publish credentials, private keys, personal data, or confidential translation samples in an issue. | ||
|
|
||
| ## License | ||
|
|
||
| This project is released under the [MIT License](LICENSE). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Security Policy | ||
|
|
||
| ## Supported versions | ||
|
|
||
| The latest state of the default branch is the only actively supported version while the project is in early development. | ||
|
|
||
| ## Reporting a vulnerability | ||
|
|
||
| Please use GitHub's private vulnerability reporting or a private Security Advisory. Do not open a public issue for a suspected vulnerability. | ||
|
|
||
| If private reporting is not enabled on the repository, contact the maintainer through a private channel listed on the maintainer's GitHub profile. Please include: | ||
|
|
||
| - a concise description of the issue; | ||
| - affected files or versions; | ||
| - reproduction steps that do not contain real credentials or personal data; | ||
| - an assessment of potential impact. | ||
|
|
||
| Please allow reasonable time for investigation and a fix before public disclosure. | ||
|
|
||
| ## Secret handling | ||
|
|
||
| The current extension does not require API keys or environment variables. Translation text is sent to Google's public endpoint and Russian proofreading text is sent to LanguageTool's public API, so confidential data should not be submitted through either provider. | ||
|
|
||
| If a credential is ever committed accidentally, revoke or rotate it first. Removing the file does not invalidate a secret that is already present in Git history. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| module.exports = require("@raycast/eslint-config"); | ||
|
greptile-apps[bot] marked this conversation as resolved.
Outdated
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.