codex-rtl 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +111 -4
  2. package/package.json +10 -4
package/README.md CHANGED
@@ -1,13 +1,120 @@
1
1
  # codex-rtl
2
2
 
3
- This is a placeholder package for `codex-rtl`.
3
+ This CLI tool automatically injects a sophisticated RTL engine into Codex, adding support for Persian (Farsi), Arabic, Hebrew, and other RTL languages, along with a sleek UI to configure fonts and settings on the fly.
4
4
 
5
- It will be developed into a tool for handling RTL (Right-to-Left) formatting/conversions or similar operations for Codex.
5
+ ## Features
6
6
 
7
- ## Installation / Usage
7
+ - **Smart Auto-Direction**: Automatically detects if a paragraph is RTL or LTR and aligns it perfectly.
8
+ - **Force RTL Mode**: Want everything aligned to the right? Just toggle the switch.
9
+ - **Custom Typography**: Define different fonts for your RTL text, English text, and Code blocks!
10
+ - **Line Height Control**: A precise slider to adjust the line height for better readability.
11
+ - **Persian Keyboard Fix**: Maps `Shift + 2` to type `@` instead of `٬` on Persian keyboards.
12
+ - **Beautiful Settings Panel**: A floating, non-intrusive UI widget at the bottom right corner.
13
+ - **Vazirmatn Built-in**: Comes with the beautiful Vazirmatn variable font by default.
8
14
 
9
- You can run this package directly via `npx`:
15
+ ## Installation
10
16
 
17
+ You don't need to download any files. Just run the following command in your terminal:
18
+
19
+ ### macOS / Linux
20
+ Because the tool needs to modify the Codex application files, you must run it with `sudo`:
21
+ ```bash
22
+ sudo npx codex-rtl
23
+ ```
24
+ > **macOS Users:** If you get a "Permission Denied" error even with sudo, ensure your terminal (e.g. Terminal, iTerm2, VS Code) has **App Management** permissions enabled in `System Settings > Privacy & Security > App Management`.
25
+
26
+ ### Windows
27
+ Open **PowerShell** or **Command Prompt** as **Administrator** (Right-click -> Run as Administrator), then run:
11
28
  ```bash
12
29
  npx codex-rtl
13
30
  ```
31
+
32
+ > **Note:** You must have [Node.js](https://nodejs.org) installed on your system to run this command.
33
+
34
+ > [!WARNING]
35
+ > **App Updates:** Since updating the Codex application overwrites its internal files, the RTL patch will be removed. You will need to run the installation command again after each update to re-apply the patch.
36
+
37
+ ## Restoring to Original (Uninstall)
38
+
39
+ If you ever want to revert Codex back to its original state (before the patch), simply run the command with the `--restore` flag:
40
+
41
+ ```bash
42
+ sudo npx codex-rtl --restore
43
+ ```
44
+ *(On Windows, run without `sudo` in an Administrator terminal)*
45
+
46
+ ## How it works
47
+
48
+ This CLI tool:
49
+ 1. Locates your Codex installation.
50
+ 2. Creates a safe backup of the original `app.asar` file.
51
+ 3. Extracts the application and safely injects the Smart RTL Engine into the core logic.
52
+ 4. Repacks the application so you can start using it immediately.
53
+
54
+ ## Contributing
55
+
56
+ Feel free to open issues or submit pull requests. Let's make Codex accessible and beautiful for everyone!
57
+
58
+ ---
59
+
60
+ <div dir="rtl">
61
+
62
+ # پروژه Codex Smart RTL
63
+
64
+ یک پچِ هوشمند و زیبا برای پشتیبانی از زبان‌های راست‌به‌چپ (RTL) در نرم‌افزار Codex.
65
+
66
+ این ابزارِ خط فرمان (CLI) به صورت کاملاً خودکار یک موتور پیشرفتهٔ RTL را به هستهٔ برنامهٔ Codex تزریق می‌کند تا از زبان‌های فارسی، عربی و عبری به بهترین شکل پشتیبانی شود. همچنین یک پنل تنظیماتِ (UI) برای تغییر زندهٔ فونت‌ها در اختیار شما قرار می‌دهد.
67
+
68
+ ## امکانات
69
+
70
+ - **راست‌چین هوشمند (Smart Auto-Direction)**: سیستم به طور خودکار تشخیص می‌دهد که پاراگراف شما با حرف انگلیسی شروع شده یا فارسی، و چیدمان را بر همان اساس تنظیم می‌کند.
71
+ - **حالت راست‌چینِ اجباری (Force RTL Mode)**: دوست دارید همه چیز (حتی پیام‌های انگلیسی) کاملاً در سمت راست قرار بگیرند؟ فقط کافیست سوئیچ را روشن کنید!
72
+ - **تنظیماتِ پیشرفتهِ فونت**: می‌توانید برای متون فارسی، متون انگلیسی و کدهای برنامه‌نویسیِ داخل چت، فونت‌های کاملاً جداگانه‌ای تعریف کنید.
73
+ - **کنترل فاصلهٔ خطوط (Line Height)**: با استفاده از اسلایدر می‌توانید فاصلهٔ خطوط را برای خوانایی بهتر متن تنظیم کنید.
74
+ - **حل مشکل کیبورد فارسی**: این ابزار کلید ترکیبی `Shift + 2` روی کیبورد فارسی را اصلاح می‌کند تا به جای «٬» علامت `@` تایپ شود.
75
+ - **پنل تنظیمات زیبا**: تمام این تنظیمات در یک ویجتِ کوچک، مدرن و شناور در پایینِ صفحه قرار گرفته‌اند.
76
+ - **فونت وزیرمتن**: فونت زیبای Vazirmatn Variable به صورت پیش‌فرض در این افزونه گنجانده شده است.
77
+
78
+ ## آموزش نصب
79
+
80
+ بدون نیاز به دانلود هیچ فایلی، فقط کافیست دستور زیر را در ترمینال سیستم خود اجرا کنید:
81
+
82
+ ### در مک (macOS) و لینوکس
83
+ از آنجایی که این ابزار قرار است فایل‌های سیستمی Codex را ویرایش کند، باید حتماً دسترسی `sudo` داشته باشد:
84
+ ```bash
85
+ sudo npx codex-rtl
86
+ ```
87
+ > **کاربران مک (macOS):** اگر با وجود استفاده از sudo باز هم خطای Permission Denied دریافت کردید، باید به ترمینال خود (مثل Terminal، iTerm2 یا VS Code) دسترسی **App Management** بدهید. برای این کار به مسیر `System Settings > Privacy & Security > App Management` بروید و دسترسی ترمینال خود را فعال کنید.
88
+
89
+ ### در ویندوز
90
+ برنامهٔ **PowerShell** یا **Command Prompt** را در حالت **Administrator** (راست‌کلیک -> Run as Administrator) باز کنید و دستور زیر را بنویسید:
91
+ ```bash
92
+ npx codex-rtl
93
+ ```
94
+
95
+ > **نکته:** برای اجرای این دستور باید حتماً [Node.js](https://nodejs.org) روی سیستم شما نصب باشد.
96
+
97
+ > [!WARNING]
98
+ > **به‌روزرسانی برنامه:** از آنجا که آپدیت کردنِ برنامهٔ Codex کدهای آن را بازنویسی می‌کند، پچِ اعمال‌شده از بین خواهد رفت و لازم است پس از هر بار آپدیت، دستور نصب را مجدداً اجرا کنید.
99
+
100
+ ## بازگردانی به حالت اولیه (Uninstall)
101
+
102
+ اگر زمانی خواستید Codex را به حالتِ اولیه (قبل از نصب این پچ) برگردانید، فقط کافیست دستور بالا را با فلگ `--restore` اجرا کنید:
103
+
104
+ ```bash
105
+ sudo npx codex-rtl --restore
106
+ ```
107
+ *(کاربران ویندوز این دستور را بدون `sudo` و در یک ترمینال ادمین اجرا کنند)*
108
+
109
+ ## این ابزار چگونه کار می‌کند؟
110
+
111
+ 1. ابزار به صورت خودکار محل نصب Codex را روی سیستم شما پیدا می‌کند.
112
+ 2. یک نسخهٔ پشتیبانِ امن از فایل اوریجینالِ `app.asar` تهیه می‌کند.
113
+ 3. فایل را استخراج کرده و کدهای موتورِ RTL را به ایمن‌ترین شکل ممکن به هستهٔ برنامه تزریق می‌کند.
114
+ 4. در نهایت برنامه را مجدداً بسته‌بندی می‌کند تا بتوانید بلافاصله از آن لذت ببرید.
115
+
116
+ ## مشارکت در توسعه
117
+
118
+ با کمال میل از نظرات، گزارشِ باگ‌ها و Pull Request های شما استقبال می‌شود.
119
+
120
+ </div>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "codex-rtl",
3
- "version": "0.0.1",
4
- "description": "Reserved name for codex-rtl command-line tool",
3
+ "version": "0.0.2",
4
+ "description": "A smart RTL (Right-to-Left) patcher with UI settings for the Codex application.",
5
5
  "main": "index.js",
6
6
  "bin": {
7
7
  "codex-rtl": "./bin/index.js"
@@ -19,9 +19,15 @@
19
19
  },
20
20
  "keywords": [
21
21
  "codex",
22
- "rtl"
22
+ "rtl",
23
+ "persian",
24
+ "arabic",
25
+ "hebrew",
26
+ "patcher",
27
+ "electron",
28
+ "asar"
23
29
  ],
24
- "author": "",
30
+ "author": "mmnaderi <mmnaderi.ir@gmail.com>",
25
31
  "license": "MIT",
26
32
  "bugs": {
27
33
  "url": "https://github.com/mmnaderi/codex-rtl/issues"