كودكس يشتغل بالسحابة وأنت نايم
معظم الناس يجلسون يراقبون الموديل وهو يكتب. كودكس يشتغل في السحابة بدونك.
كل أداة ذكاء اصطناعي للبرمجة جربتها حتى الآن تشتغل بنفس الطريقة: تكتب الطلب، يبدأ الموديل يولّد الكود، وأنت تقعد تراقب. مرتبط بالشاشة طول ما هو يشتغل. كودكس (Codex) من OpenAI جاء بمنطق مختلف كلياً: أنت تكتب المهمة، تمشي، وترجع تلاقي الشغل خلص.
🧩 إيش هو بالضبط
كودكس وكيل برمجة (coding agent) يشتغل في بيئة سحابية معزولة. مو مجرد موديل يكتب لك كود وتنسخه، بل هو أشبه بمبرمج عن بُعد تعطيه المهمة وتتركه: يفتح الريبو، يقرأ الملفات، يكتب الكود، يشغّل الاختبارات، يصلح اللي ينكسر، ويرجعلك بالنتيجة.
التشبيه المناسب: تخيّل إنك كلّفت مطوّر يعمل عن بُعد ما يحتاج تشرح له كل خطوة وهو يشتغل، ويسلّمك pull request لما يخلص. كودكس هو نفس الفكرة، بس في دقائق.
⚙️ كيف يشتغل
الآلية التقنية وراءه بسيطة في شكلها لكن قوية في تأثيرها:
1️⃣ تكتب المهمة: من واجهة ChatGPT أو عبر API بالتفصيل اللي تبغاه
2️⃣ يفتح بيئة معزولة: نسخة محمية من مشروعك في السحابة، أي خطأ ما يأثر على الأصل
3️⃣ يشتغل بشكل مستقل: يقرأ، يكتب، ينفّذ أوامر، يشغّل الاختبارات، ويصلح الأخطاء تلقائياً
4️⃣ يرجعلك بالنتيجة: ملفات جاهزة، أو branch في GitHub، أو تقرير كامل بكل اللي سواه
🔑 النقطة الجوهرية هنا هي التنفيذ غير المتزامن (asynchronous execution). ما تحتاج تكون موجوداً وهو يشتغل. تقدر تبدأ ثلاث مهام بنفس الوقت، تسكّر اللابتوب، وترجع تلاقيها جاهزة.
🌍 وين تشوفه في حياتك
الفائدة الحقيقية من كودكس مو إنه يكتب كود أذكى، بل إنه يلغي وقت المراقبة والانتظار:
🐛 تتبّع الأخطاء: بدل ما تقضي ساعة تبحث عن باق، تصفه لكودكس وترجع تلاقي الإصلاح
🔧 كتابة الاختبارات: أكثر مهام البرمجة تكراراً ومللاً، تقدر تفوّضها بالكامل
📝 توثيق الكود: يقرأ المشروع ويكتب documentation كاملة ما تحتاج تشرح له كل تفصيلة
🔄 إعادة الهيكلة: قوله "نظّف هذا الملف" أو "حوّل هذا الكود لـ TypeScript" ويتولى الأمر
🛠️ الأدوات اللي تستخدمها فعلاً
🔧 Codex في ChatGPT
أسهل طريقة للوصول لكودكس. متاحة لمشتركي ChatGPT Pro وPlus بدون إعداد معقد.
كيف تبدأ فيها:
1️⃣ افتح chatgpt.com وتأكد إن عندك اشتراك Pro أو Plus نشط
2️⃣ من الشريط الجانبي اختر قسم "Codex"
3️⃣ اربط حساب GitHub من الإعدادات إذا تبغى يشتغل على ريبو حقيقي
4️⃣ اكتب مهمتك بالتفصيل، اضغط إرسال، واغلق التاب وافعل أي شيء ثاني
🔧 Codex API
للمطورين اللي يبغون يدمجون كودكس في أدواتهم الخاصة أو في pipelines مؤتمتة.
كيف تبدأ فيها:
1️⃣ افتح platform.openai.com واحصل على API key من قسم API Keys
2️⃣ ثبّت المكتبة: pip install openai
3️⃣ استخدم الموديل codex-1 في طلباتك مع تحديد بيئة التشغيل والمهمة في جسم الطلب
💡 جرّب بنفسك: خطوة بخطوة
المهمة: خلّ كودكس يكتب لك سكريبت Python يحوّل ملف CSV إلى تقرير HTML منسّق.
1️⃣ افتح Codex في ChatGPT واكتب هذا الطلب بالضبط: "اكتب لي سكريبت Python يقرأ ملف CSV يحتوي أعمدة Name وSales وDate، ويولّد ملف HTML يعرض البيانات كجدول بتلوين الصفوف بشكل متبادل. أضف اختبارات pytest للدوال الرئيسية."
2️⃣ اضغط إرسال، أغلق التاب تماماً، واذهب تعمل أي شيء ثاني
3️⃣ ارجع بعد عشر دقائق تقريباً وستجد إن كودكس فتح بيئة، كتب الكود، نفّذ الاختبارات، صلّح ما انكسر، وأنتج الملفات النهائية
4️⃣ راجع ما أنتجه: سكريبت جاهز، ملف اختبارات، وصفحة HTML نموذجية، كلها جاهزة للاستخدام الفوري
المقارنة اللي تهم: ما كان بياخذ منك 45 دقيقة من التركيز أو 20 دقيقة مراقبة موديل تفاعلي، صار يكلفك فقرة واحدة وصفر وقت انتظار.
وش تسوي بعد ذا
✅ كلّف كودكس بمهمة حقيقية عندك هالأسبوع، حتى لو صغيرة، وشوف كيف يتعامل معها
✅ ابحث عن الفرق بين asynchronous agents والأدوات التفاعلية مثل Cursor وClaude Code
✅ فكّر: وين في روتينك اليومي تقضي وقت على مهام برمجية متكررة تقدر تفوّضها؟
الأداة الأفضل مو اللي تكتب أذكى، بل اللي تخلّيك تنتج بدون ما تكون موجوداً.
———— English ————
Codex works while you sleep
Most developers stare at the screen waiting for the model to finish. Codex does the work while you are somewhere else.
Every AI coding tool you have used so far shares the same design: you type a prompt, the model starts generating, and you sit there watching it write line by line. You are tied to that screen until it is done. Codex from OpenAI breaks that entirely. You describe the task, you leave, and you come back to finished work.
**What it actually is**
Codex is a cloud based coding agent that runs inside its own isolated environment. This is not a model that generates suggestions for you to paste somewhere. It is closer to a contractor you brief and then step away from: it opens your repository, reads the files, writes the code, runs the tests, fixes what breaks, and delivers the result.
A useful analogy: imagine a developer who works remotely, never needs to interrupt you mid-task, and drops a pull request in your inbox when finished. Codex is that shape of interaction, compressed into minutes.
**How it works**
The mechanism underneath is simple to describe but significant in what it enables.
1️⃣ You submit a task through the ChatGPT interface or via API, describing what you want in plain language
2️⃣ Codex spins up an isolated cloud environment with a sandboxed copy of your codebase or a fresh project
3️⃣ It works through the task on its own: reading files, writing code, executing commands, running tests, and correcting errors as they appear
4️⃣ It surfaces the result back to you as ready to use files, a GitHub branch, or a detailed log of everything it did
🔑 The key shift is asynchronous execution. You do not need to be present while it works. You can start three tasks in parallel, close the laptop, and come back to three completed results.
**Where you see it**
The real value of Codex is not that it writes slightly better code. It is that it removes an entire category of time spent waiting and watching.
🐛 Bug investigation: instead of spending an hour tracing a subtle error, you describe it and come back to a fix
🔧 Test writing: the most repetitive part of software development, fully offloadable to Codex in the background
📝 Documentation: it reads your codebase and produces thorough docs without you specifying every detail
🔄 Refactoring: tell it to clean up a module or convert it to TypeScript and it handles the whole thing
**🛠️ Tools you actually use**
🔧 Codex in ChatGPT
The easiest entry point. Available to ChatGPT Pro and Plus subscribers with no complex setup beyond connecting GitHub.
How to get started:
1️⃣ Go to chatgpt.com and confirm you have an active Pro or Plus subscription
2️⃣ Select "Codex" from the left sidebar in the ChatGPT interface
3️⃣ Connect your GitHub account from settings if you want Codex to work directly on a real repository
4️⃣ Write your task in detail, hit send, and close the tab
🔧 Codex API
For developers who want to integrate Codex into their own tools, pipelines, or automated workflows.
How to get started:
1️⃣ Go to platform.openai.com and generate an API key from the API Keys section
2️⃣ Install the client library with this command: pip install openai
3️⃣ Use the codex-1 model in your API calls and specify the environment and task parameters in the request body
**💡 Try it yourself: step by step**
Task: have Codex write you a small Python utility that converts a CSV file into a styled HTML report.
1️⃣ Open Codex in ChatGPT and write this exact task: "Write a Python script that reads a CSV file with columns Name, Sales, and Date, and generates an HTML file displaying the data as a styled table with alternating row colors. Include pytest tests for the main functions."
2️⃣ Hit send, close the tab completely, and go do something else
3️⃣ Come back in about ten minutes and find that Codex has spun up an environment, written the code, executed the tests, fixed any failures, and produced the final files
4️⃣ Review what it built: a working script, a test file, and a sample HTML output, all ready to copy and use immediately
The comparison that matters: what would have taken 45 minutes of focused work, or 20 minutes watching an interactive model type, now cost you one paragraph of text and zero waiting time.
**What to do next**
✅ Assign Codex a real task you have been putting off this week, even a small one, and watch how it handles it
✅ Read about the difference between asynchronous agents and interactive tools like Cursor or Claude Code
✅ Identify one recurring coding task in your daily workflow that you do not actually need to supervise
The best tool is not the one that writes the smartest code. It is the one that lets you produce without being there.