Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions extensions/ray-tools/.editorconfig
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
2 changes: 2 additions & 0 deletions extensions/ray-tools/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* text=auto eol=lf
*.png binary
28 changes: 28 additions & 0 deletions extensions/ray-tools/.gitignore
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
8 changes: 8 additions & 0 deletions extensions/ray-tools/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# ray-tools Changelog

## [Initial Version] - 2026-08-23
Comment thread
greptile-apps[bot] marked this conversation as resolved.
Outdated

- 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.
32 changes: 32 additions & 0 deletions extensions/ray-tools/CONTRIBUTING.md
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.
12 changes: 12 additions & 0 deletions extensions/ray-tools/IDEA.md
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.
21 changes: 21 additions & 0 deletions extensions/ray-tools/LICENSE
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.
99 changes: 99 additions & 0 deletions extensions/ray-tools/README.md
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).
24 changes: 24 additions & 0 deletions extensions/ray-tools/SECURITY.md
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.
Binary file added extensions/ray-tools/assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions extensions/ray-tools/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("@raycast/eslint-config");
Comment thread
greptile-apps[bot] marked this conversation as resolved.
Outdated
Loading
Loading