{"id":44620959,"url":"https://github.com/adifyr/shadow-code","last_synced_at":"2026-03-02T10:06:06.576Z","repository":{"id":336632693,"uuid":"1150484291","full_name":"adifyr/shadow-code","owner":"adifyr","description":"A novel approach to coding with AI","archived":false,"fork":false,"pushed_at":"2026-02-23T04:28:02.000Z","size":274,"stargazers_count":64,"open_issues_count":2,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-02-23T12:40:58.534Z","etag":null,"topics":["ai","ai-coding","ai-development","code","coding","dart","extension","flutter","go","java","javascript","language","programming","python","typescript","vscode","vscode-extension","zed"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adifyr.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-05T10:33:49.000Z","updated_at":"2026-02-23T04:28:28.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/adifyr/shadow-code","commit_stats":null,"previous_names":["adifyr/shadow-code"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/adifyr/shadow-code","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adifyr%2Fshadow-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adifyr%2Fshadow-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adifyr%2Fshadow-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adifyr%2Fshadow-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adifyr","download_url":"https://codeload.github.com/adifyr/shadow-code/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adifyr%2Fshadow-code/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29998154,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T09:59:02.300Z","status":"ssl_error","status_checked_at":"2026-03-02T09:59:02.001Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","ai-coding","ai-development","code","coding","dart","extension","flutter","go","java","javascript","language","programming","python","typescript","vscode","vscode-extension","zed"],"created_at":"2026-02-14T14:10:37.364Z","updated_at":"2026-03-02T10:06:06.568Z","avatar_url":"https://github.com/adifyr.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\u003cimg width=\"640\" alt=\"shadow_code_logo\" src=\"https://github.com/user-attachments/assets/4b379b0b-c711-4735-a9bd-9a8230979da3\"/\u003e\u003c/p\u003e\n\u003cp align=\"center\"\u003e\u003ci\u003e\u003cb\u003e\u003ccode\u003e\"Developers think in code, not paragraphs.\"\u003cbr/\u003e\u003c/code\u003e\u003c/b\u003e\u003c/i\u003e\u003c/p\u003e\n\n# YouTube Video\n\nClick on the thumbnail below to watch the YouTube Video. Or [click here](https://youtu.be/ZoNDQYYpl7E).\n\n[\u003cimg width=\"1440\" height=\"900\" alt=\"thumbnail_link\" src=\"https://github.com/user-attachments/assets/089edef0-0f1e-42c2-9e7d-751b2015c0f0\" /\u003e](https://youtu.be/ZoNDQYYpl7E)\n\n# About Shadow Code\n\nShadow Coding\u003csup\u003eTM\u003c/sup\u003e is an AI coding technique that involves transforming human-written pseudocode to clean, accurate \u0026 production-ready code in the target language. _(At least, that's what I've told the AI to do in the system prompt.)_\n\nIn Shadow Coding, since users prompt using pseudocode instead of plain english, the input that the AI receives is much closer in nature to the intended output. As a result, compared to vibe coding, Shadow Coding can:\n\n- Produce consistently high-quality code,\n- That is closer to what the developer intends,\n- Faster and with less tokens,\n- Using cheaper/open-source models.\n\nMost importantly, Shadow Coding puts developers back in the driver's seat. With Shadow Coding, developers can control how predictable they want their AI-generated code to be based on the detail \u0026 expressiveness of their pseudocode.\n\n**But, that's not all. Check out the [Features](#features) section below to know more.**\n\n# Installation\n\nShadow Code is currently available as a free \u0026 open-source VS Code Extension and Cursor. Go ahead and install it from the Extensions Marketplace of either editor.\n\n# Instructions\n\n## 1. Open Shadow Mode\n\nThere are 3 ways to open Shadow Mode:\n\n1. Right-click on the file tab in the editor. In the context menu that opens, click on \"Open In Shadow Mode\".\n2. Click on the Shadow Code Icon located at the end of the editor tabs line, in the top-right corner.\n3. Press Ctrl+Alt+S (Windows) or Cmd+Ctrl+S (Mac) with your preferred code file active in the editor.\n\n![shadowcode_screencapture1](https://github.com/user-attachments/assets/14fbec67-586c-4350-b338-7b3d1289af04)\n\nShadow Mode opens up a parallel tab in your editor in split-view where you enter your pseudocode. You'll notice that it also creates a `.shadow` file as well. These \"shadow\" files live inside a `.shadows/` folder at the root of your workspace - within a path that mirrors the location of your original code file.\n\n\u003e [!NOTE]\n\u003e If you're in a shared workspace, you should ideally include the `.shadows/` folder in your `.gitignore`. This will ensure your shadow files don't mess with those of your collaborators.\n\n## 2. Write Your \"Shadow\" Code\n\nIn the `.shadow` file, You are now free to write pseudocode as you see fit. Forget about syntax and lint errors - think of it as your own personal coding language.\n\n## 3. Transform Into Code\n\nOnce you're done writing your \"shadow\" code, there's 2 ways you can convert it to your target code:\n\n1. Click on the sparkles ✨ icon at the end of the editor tabs line, in the top-right corner.\n2. Press Ctrl+Alt+Enter (Windows) or Cmd+Opt+Enter (Mac) with your shadow file active in the editor.\n\nThe first time you trigger this command, you may be asked to choose an AI model to generate the code. Go ahead and select your preferred model.\n\n\u003e [!IMPORTANT]\n\u003e Shadow Code integrates with VS Code's native Language Models API. As such, a model provider (such as Github Copilot) is required for Shadow Code to work.\n\nShadow Code will generate the target code in your original code file:\n\nhttps://github.com/user-attachments/assets/f654a0f9-d216-4ccf-ac7b-d3024cf4b636\n\n_The above code was generated using Gemini 2.5 Flash._\n\n\u003e [!WARNING]\n\u003e If you experience an error along the lines of `Failed To Stream AI Response: Response got filtered`, you need to go into your [Copilot settings on the GitHub website](https://github.com/settings/copilot/features) and - under Privacy - set **\"Suggestions matching public code\"** to **Allowed**.\n\u003e\n\u003e This is assuming you have GitHub Copilot as your model provider in VS Code.\n\n# Features\n\n## Extends Language Syntax\n\nIf you think about it, Shadow Coding is essentially interpreting one syntax and converting it to another. This can lead to some interesting use-cases. For example, if you find yourself writing the same set of boilerplate code in nearly every project, it may be prudent to \"teach\" the AI a specific \"shadow syntax\" that can consistently generate that boilerplate code for you. **This way, you can extend the syntax of your target programming language and even add features that your language doesn't have.**\n\nA good case-study for this is data classes in [Dart](https://dart.dev). Dart, the programming language powering [Flutter](https://flutter.dev/), very famously lacks data classes. And though [the feature has been heavily requested since 2017](https://github.com/dart-lang/language/issues/314), there hasn't been much progress made on that front.\n\n**Shadow Coding to the rescue! 🎉**\n\nIn this case, we can prompt the AI model to treat our shadow code in a certain way. Here's an example of such a \"shadow syntax\" that instructs the AI model to generate a Dart class that serves as an ORM for Firestore:\n\n```\nfirestore class Payment {\n\tid?: string,\n\tpayer_id: string,\n\tpayer_name: string,\n\tmerchant_id: string,\n\tmethod: enum(cash, card, online),\n\tamount: double,\n\treversible: boolean,\n\tcreated_at: DateTime,\n\tupdated_at: DateTime,\n}\n```\n\nHere's what the AI generates:\n\n![shadowcode_screencapture3](https://github.com/user-attachments/assets/c1c6bacf-e808-4bf4-b00d-9d59fda44d74)\n\n_The above code was generated using Open AI's GPT-OSS 20B Model._\n\nDid you notice something? The AI didn't just generate something \"close\" to what we wanted - it generated EXACTLY the code we wanted. With shadow coding, you will find that your output code is often **more consistent and deterministic than what vibe coding would have given you.**\n\n## Accepts Selective Context\n\nThe only dedicated syntax in a shadow file is the `import()` function. Unlike vibe coding, where you would be compelled to index your entire codebase and hope for the best, shadow coding lets you control exactly what code files the AI should be aware of to generate your target code.\n\nThe `import()` function goes at the top of your shadow file:\n\n```javascript\nimport(\"lib/models/user.dart\", \"lib/screens/home.dart\");\n\n// Your pseudocode goes here...\n```\n\nBy picking exactly what the model sees, you stop it from guessing or hallucinating based on unrelated files. It keeps the output sharp and doesn't waste tokens on code that doesn't matter.\n\n\u003e [!TIP]\n\u003e Shadow Code automatically picks up your `pubspec.yaml` (Dart) or `package.json` (JS/TS) config file to know what libraries you're using. So, no need to include them in your import function.\n\n## Automatically Installs Dependencies\n\nIf the generated code makes use of dependencies that haven't been installed yet, Shadow Code goes the extra mile and installs those dependencies for you automatically. 🙂\n\n# Performance\n\n| Category        | Usage                                                       |\n| --------------- | ----------------------------------------------------------- |\n| Input Tokens    | 5k-8k tokens on average. _10k-12k tokens on the upper end._ |\n| Output Tokens   | As big as your output code. _800-2000 tokens on average._   |\n| Generation Time | Depends on the model. _~10 seconds on average._             |\n\n# Language Support\n\nTechnically, Shadow Code supports any language via its `DefaultHandler`, but dedicated support currently exists for 6 languages:\n\n- Dart\n- JavaScript + jsx\n- TypeScript + tsx\n- Java\n- Python\n- Rust\n\n# Contributions\n\nWe'd appreciate all the help we can get in expanding our support to more languages and editors. Please have a look at our [Contributing Guide](https://github.com/adifyr/shadow-code/blob/main/CONTRIBUTING.md) if you would like to contribute.\n\n# Roadmap\n\n| **Feature / Language**   | **Goal**                                                     | **Status**                |\n| ------------------------ | ------------------------------------------------------------ | ------------------------- |\n| **Lua Support**          | Dedicated prompt \u0026 config support for the Lua Language.      | 🏗️ In Progress            |\n| **Inline Insertions**    | Insert code at a specific place without creating a new file. | 🕐 Pending                |\n| **Inline Modifications** | Modify code at a specific place without creating a new file. | 🕐 Pending                |\n\n---\n\n### **Made with ❤️ and ☕ for Developers, by Developers**\n","funding_links":[],"categories":["Code Generation \u0026 Automation"],"sub_categories":["Other IDEs"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadifyr%2Fshadow-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadifyr%2Fshadow-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadifyr%2Fshadow-code/lists"}