{"id":31849155,"url":"https://github.com/themaster1127/htvm-marketplace","last_synced_at":"2026-06-21T01:33:08.986Z","repository":{"id":315968824,"uuid":"1061424312","full_name":"TheMaster1127/htvm-marketplace","owner":"TheMaster1127","description":"htvm-marketplace is a HTVM plugins marketplace for the HT-IDE","archived":false,"fork":false,"pushed_at":"2026-02-04T14:52:09.000Z","size":73,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-21T01:33:05.227Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/TheMaster1127.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"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":"2025-09-21T21:51:29.000Z","updated_at":"2026-02-04T14:56:51.000Z","dependencies_parsed_at":"2025-09-21T23:36:34.458Z","dependency_job_id":"9ff9a16a-9255-4455-99d5-d4eada19a993","html_url":"https://github.com/TheMaster1127/htvm-marketplace","commit_stats":null,"previous_names":["themaster1127/htvm-marketplace"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TheMaster1127/htvm-marketplace","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheMaster1127%2Fhtvm-marketplace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheMaster1127%2Fhtvm-marketplace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheMaster1127%2Fhtvm-marketplace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheMaster1127%2Fhtvm-marketplace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheMaster1127","download_url":"https://codeload.github.com/TheMaster1127/htvm-marketplace/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheMaster1127%2Fhtvm-marketplace/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34591166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-10-12T10:56:57.207Z","updated_at":"2026-06-21T01:33:08.980Z","avatar_url":"https://github.com/TheMaster1127.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HTVM Plugin Marketplace\n\nThis is the official community hub for discovering, sharing, and installing plugins for the **HT-IDE**. These plugins leverage the **HTVM Hook API (\"The Freedom API\")** to extend and even redefine the HTVM language itself.\n\n---\n\n## How to Contribute a Plugin\n\nFollow these steps to get your plugin added to the official marketplace.\n\n1.  **Fork the Repository:** Click the \"Fork\" button at the top-right of this page to create your own copy of the marketplace repository.\n\n2.  **Clone Your Fork:** Clone your forked repository to your local machine.\n    ```bash\n    git clone https://github.com/YOUR-USERNAME/htvm-marketplace.git\n    ```\n\n3.  **Navigate to the `main` Folder:** All plugins live inside the `main` directory.\n    ```bash\n    cd htvm-marketplace/main/\n    ```\n\n4.  **Create Your Plugin Folder:** Create a new folder for your plugin. The name should be unique and use `kebab-case`.\n    ```bash\n    mkdir my-cool-plugin\n    cd my-cool-plugin\n    ```\n\n5. **Create a Version Folder:** Inside your plugin’s folder, create a folder for your plugin version (e.g., `1.0.0`). Each version lives in its own folder.\n\n   ```bash\n   mkdir 1.0.0\n   cd 1.0.0\n   ```\n\n6. **Create the Required Files:** Inside the version folder, you **must** create two files:\n\n   * `plugin.json` (The manifest that describes your plugin).\n   * `index.js` (The JavaScript code for your plugin).\n\n7.  **Commit and Push:** Add your new folder and files, commit them, and push them to your forked repository.\n    ```bash\n    git add .\n    git commit -m \"feat: Add My Cool Plugin\"\n    git push origin main\n    ```\n    \n8.  **Submit a Pull Request:** Go to your forked repository on GitHub. You will see a prompt to \"Compare \u0026 pull request\". Click it, describe your plugin, and submit the pull request. Once it is reviewed and approved, it will be merged and will appear in the HT-IDE marketplace for everyone.\n\n### Example `plugin.json`\n\nThis file is the \"ID card\" for your plugin. The IDE uses it to display your plugin in the marketplace.\n\n```json\n{\n  \"name\": \"Keyword Expander\",\n  \"version\": \"1.0.0\",\n  \"author\": \"TheMaster1127\",\n  \"description\": \"Expands the standalone keywords like 'hello' into a print statement.\",\n  \"main\": \"index.js\",\n  \"hooks\": [\"htvm_hook1, htvm_hook2, htvm_hook3\"]\n}\n```\n\n### Example `index.js`\n\nThis is where your logic lives. Your JavaScript code must redefine one or more of the global `htvm_hook...` functions.\n\n```javascript\n// This plugin redefines the global htvm_hook1, htvm_hook2 and htvm_hook3 functions.\nhtvm_hook1 = function(code) {\n    // This regex finds any line containing ONLY the word \"hello\"\n    const helloRegex = /^\\s*hello\\s*$/gm;\n    // It replaces that line with a full HTVM print command.\n    const modifiedCode = code.replace(helloRegex, 'print(\"Hello from my plugin!\")');\n    return modifiedCode;\n};\n\nhtvm_hook2 = function(code) {\n    // This regex finds any line containing ONLY the word \"hi\"\n    const hiRegex = /^\\s*hi\\s*$/gm;\n    // It replaces that line with a full HTVM print command.\n    const modifiedCode = code.replace(hiRegex, 'print(\"Hi from my plugin!\")');\n    return modifiedCode;\n};\n\nhtvm_hook3 = function(code) {\n    // This regex finds any line containing ONLY the word \"hey\"\n    const heyRegex = /^\\s*hey\\s*$/gm;\n    // It replaces that line with a full HTVM print command.\n    const modifiedCode = code.replace(heyRegex, 'print(\"Hey from my plugin!\")');\n    return modifiedCode;\n};\n```\n\n### Pro Tip: Developing Plugins *in* HTVM\n\nYou can write your plugin's logic in a `.htvm` file and then transpile it to JavaScript. This allows you to leverage the full power of HTVM to create plugins for HTVM. Once you have the generated JavaScript, simply copy and paste it into your plugin's `index.js` file.\n\n---\n\n## The Hook API\n\nThe API consists of a series of \"hooks\"—globally available functions that the HTVM engine calls at specific points during its transpilation pipeline. Your plugin works by redefining these empty default functions with your own logic. In the HTVM language created by TheMaster1127, `;` is used for comments and `:=` is used for assignment.\n\n**Plugin Error Handling:** If something goes wrong during transpilation, **blame the plugin first.** Disable your active plugin and try again. If the issue persists, then blame your code, then the HTVM engine. Hooks can introduce breaking changes, so be mindful.\n\n### A Full Example: The Transformation Process\n\nTo understand how hooks work, let's trace the \"Keyword Expander\" plugin from start to finish.\n\n**1. The Original HTVM Code**\nA user writes this code in the IDE:\n```\n; This is a normal line\nvar x := 10\n\n; This is the line our plugin will target\nhello\n\n; This is another normal line\nprint(\"The value is: \" + x)\n```\n\n**2. What the Hook Receives**\nThe HTVM engine first processes strings, comments, and imports. Then, it calls `htvm_hook1`. The code your plugin's hook actually receives will look like this, with strings replaced by placeholders:\n```\n;HTVM--cnavisdofbuvsesdivdidufg79wregwewaeosd8ges7dfdftuawdiHTVMv2yerheyziberlasduci6syiq--AA0AA\nvar x := 10\n;HTVM--cnavisdofbuvsesdivdidufg79wregwewaeosd8ges7dfdftuawdiHTVMv2yerheyziberlasduci6syiq--AA1AA\nhello\n;HTVM--cnavisdofbuvsesdivdidufg79wregwewaeosd8ges7dfdftuawdiHTVMv2yerheyziberlasduci6syiq--AA2AA\nprint(ihuiuuhuuhtheidFor--asdsas--theuhturtyphoutr--AA1AA + x)\n```\n\n**3. The Plugin Logic**\nThe plugin's `index.js` file contains this code:\n```javascript\nhtvm_hook1 = function(code) {\n    const helloRegex = /^\\s*hello\\s*$/gm;\n    const modifiedCode = code.replace(helloRegex, 'print(\"Hello, World!\")');\n    return modifiedCode;\n};\n```\nThis logic finds the standalone `hello` on its own line and replaces it.\n\n**4. What the Hook Returns**\nThe hook function returns the modified code back to the HTVM engine.\n```\n;HTVM--cnavisdofbuvsesdivdidufg79wregwewaeosd8ges7dfdftuawdiHTVMv2yerheyziberlasduci6syiq--AA0AA\nvar x := 10\n;HTVM--cnavisdofbuvsesdivdidufg79wregwewaeosd8ges7dfdftuawdiHTVMv2yerheyziberlasduci6syiq--AA1AA\nprint(\"Hello, World!\")\n;HTVM--cnavisdofbuvsesdivdidufg79wregwewaeosd8ges7dfdftuawdiHTVMv2yerheyziberlasduci6syiq--AA2AA\nprint(ihuiuuhuuhtheidFor--asdsas--theuhturtyphoutr--AA1AA + x)\n```\n\n**5. The Final Transpiled Result**\nThe HTVM engine then completes its transpilation on this new code, correctly restoring the original string placeholder. The final JavaScript output is exactly what we want:\n```javascript\nfunction print(value) {\n    console.log(value)\n}\n\nasync function main() {\n    // This is a normal line\n    var x = 10;\n    // This is the lines our plugin will target\n    print(\"Hello, World!\");\n    // This is another normal line\n    print(\"The value is: \" + x);\n}\nmain();\n```\n\n### Available Hooks\n\nThe hooks are called in numerical order. Here is a detailed breakdown of each available hook point:\n\n*   `htvm_hook1(code)` **[Code → Code]**\n    *   **When:** Runs **AFTER** the initial processing of strings, comments, imports, and programming blocks.\n    *   **What it does:** It receives the source code as a single string and must return a modified string. It is perfect for structural changes and token-based manipulations.\n    *   **CRITICAL WARNING:** At this stage, all literal strings in the code have been replaced with unique placeholders.\n\n*   `htvm_hook2(code)` **[Code → Code]**\n    *   **When:** Runs after `hook1` and after the engine has handled pattern matching (the `when` keyword).\n    *   **Use Case:** Ideal for transformations that need to happen after basic pattern matching is resolved but before more complex structures are parsed.\n\n*   `htvm_hook3(code)` **[Code → Code]**\n    *   **When:** Runs after `hook2` and before GUI and backend commands are processed.\n    *   **Use Case:** Useful for manipulating code before it's interpreted as a GUI or backend instruction.\n\n*   `htvm_hook4(code)` **[Code → Code]**\n    *   **When:** Runs after `hook3` but before the main transpilation loop begins. This is the last chance to modify the code block as a whole before it's broken down line-by-line.\n    *   **Use Case:** Final structural cleanups or complex, multi-line macro expansions.\n\n*   `htvm_hook5(code)` **[Code → Code]**\n    *   **When:** Runs right before the main line-by-line transpilation loop starts.\n    *   **Use Case:** Advanced manipulations that rely on the entire code block being in its near-final state.\n\n*   `htvm_hook6(code)` **[Code → Code]**\n    *   **When:** Runs immediately before the very first line of the main transpilation loop.\n    *   **Use Case:** Injecting setup code or headers at the top of the script's logic.\n\n*   `htvm_hook7(code)` **[Code → Code]**\n    *   **When:** Runs at a specific point in the transpilation pipeline where string replacement is safe and effective.\n    *   **Use Case:** This is the ideal hook for safe string manipulations or transformations that require a partially-processed code state.\n\n*   `htvm_hook8(code)` **[Code → Code]**\n    *   **When:** Runs right before the original string values are restored from their placeholders.\n    *   **Use Case:** A last-chance hook to interact with the code while it still has placeholders. Useful for logic that analyzes code structure without being confused by complex string content.\n\n*   `htvm_hook9(finalCode)` **[Code → Code]**\n    *   **When:** A **DANGEROUS** hook. Runs **LAST**, after all transpilation is complete and all string placeholders have been restored. The `finalCode` is the almost-finished product.\n    *   **Use Case:** Post-processing the fully generated code, such as adding banners, comments, or performing final cleanup.\n\n*   `htvm_hook10(\"\")` **[nothing BUT adding extra Build-in funcs]**\n    *   **When:** Runs after the instruction file has been parsed and before it's used by the compiler.\n    *   **Receives:** Nothing.\n    *   **Returns:** A string with New Build-In functions. Read more on how to structure them here: [Adding Built-in Functions](https://github.com/TheMaster1127/HTVM?tab=readme-ov-file#-adding-built-in-functions).\n    *   **Use Case:** Adding new built-in functions.\n\n*   `htvm_hook11(code)` **[Code → Code]**\n    *   **When:** A **DANGEROUS** hook. It runs **FIRST**, before absolutely everything, including the string protector.\n    *   **Receives:** The raw, untouched user source code.\n    *   **Returns:** A modified `string`.\n    *   **Use Case:** The ultimate pre-processor. This hook can perform raw text replacements on the original file, including string content.\n    *   **EXTREME WARNING:** This hook is incredibly powerful and dangerous. Logic here can easily break the compiler if it's not written carefully. It is highly recommended to use other hooks unless you absolutely need to modify string literals.\n\n* `htvm_hook12(code)` **[Code → Code]**\n\n  * **When:** Called at the very end of the `expressionParserTranspiler` function. At this stage, the HTVM engine has already parsed and converted expressions into their intermediate form. Your plugin sees the “post-processed” expressions before they’re fully locked in.\n\n  * **Plugin Developer Use Case:**\n\n    * **Custom Operators:** Define brand-new inline operators that HTVM itself doesn’t recognize (e.g., `a %% b` → customModulo(a, b)).\n    * **Expression Rewrites:** Convert shorthand or domain-specific math into expanded code (e.g., `deg(45)` → `(45 * Math.PI / 180)`).\n    * **Optimizations:** Collapse trivial math like `x + 0`, `y * 1`, or `!!z`.\n    * **Regex Power:** Perform large-scale transformations across every expression in the file (great for DSL-like plugins).\n    * **Safety Tools:** Wrap every division in a safe-division function to avoid runtime errors.\n    * **Experimentation:** Add things like “pipe” operators (`value |\u003e func`) or inline macros.\n\n  * **Pro Tip:** Since this runs *after* HTVM has already structured the expressions, you don’t have to worry about breaking its parsing logic — but you **can** override and mutate it to add brand-new expression-level behavior that feels native to the language.\n\n### Help Variables\n\nlangToConvertTo\n\nlangFileExtension\n\ncommands\n\nkeyWordAlliance\n\nkeyWordCrew\n\nkeyWordProc\n\nkeyWordStruct\n\nkeyWordProp\n\nkeyWordThis\n\nkeyWordInclude\n\nkeyWordCodeInTheTranspiledLangStart\n\nkeyWordCodeInTheTranspiledLangEnd\n\nkeyWordCodeInTheTranspiledLangStartCPP\n\nkeyWordCodeInTheTranspiledLangEndCPP\n\nkeyWordCodeInTheTranspiledLangStartPY\n\nkeyWordCodeInTheTranspiledLangEndPY\n\nkeyWordCodeInTheTranspiledLangStartJS\n\nkeyWordCodeInTheTranspiledLangEndJS\n\nkeyWordCodeInTheTranspiledLangStartGO\n\nkeyWordCodeInTheTranspiledLangEndGO\n\nkeyWordCodeInTheTranspiledLangStartLUA\n\nkeyWordCodeInTheTranspiledLangEndLUA\n\nkeyWordCodeInTheTranspiledLangStartCS\n\nkeyWordCodeInTheTranspiledLangEndCS\n\nkeyWordCodeInTheTranspiledLangStartJAVA\n\nkeyWordCodeInTheTranspiledLangEndJAVA\n\nkeyWordCodeInTheTranspiledLangStartKT\n\nkeyWordCodeInTheTranspiledLangEndKT\n\nkeyWordCodeInTheTranspiledLangStartRB\n\nkeyWordCodeInTheTranspiledLangEndRB\n\nkeyWordCodeInTheTranspiledLangStartNIM\n\nkeyWordCodeInTheTranspiledLangEndNIM\n\nkeyWordCodeInTheTranspiledLangStartAHK\n\nkeyWordCodeInTheTranspiledLangEndAHK\n\nkeyWordCodeInTheTranspiledLangStartSWIFT\n\nkeyWordCodeInTheTranspiledLangEndSWIFT\n\nkeyWordCodeInTheTranspiledLangStartDART\n\nkeyWordCodeInTheTranspiledLangEndDART\n\nkeyWordCodeInTheTranspiledLangStartTS\n\nkeyWordCodeInTheTranspiledLangEndTS\n\nkeyWordCodeInTheTranspiledLangStartGROOVY\n\nkeyWordCodeInTheTranspiledLangEndGROOVY\n\nkeyWordCodeInTheTranspiledLangStartHTVM\n\nkeyWordCodeInTheTranspiledLangEndHTVM\n\nkeyWordCodeInHTVMstart\n\nkeyWordCodeInHTVMend\n\nkeyWordCurlyBraceOpen\n\nkeyWordCurlyBraceClose\n\nkeyWordNull\n\nkeyWordTrue\n\nkeyWordFalse\n\nkeyWordVoid\n\nkeyWordDouble\n\nkeyWordChar\n\nkeyWordUint8\n\nkeyWordUint16\n\nkeyWordUint32\n\nkeyWordUint64\n\nkeyWordINT\n\nkeyWordSTR\n\nkeyWordBOOL\n\nkeyWordFLOAT\n\nkeyWordINT8\n\nkeyWordINT16\n\nkeyWordINT32\n\nkeyWordINT64\n\nkeyWordIF\n\nkeyWordElseIf\n\nkeyWordElse\n\nkeyWordWhileLoop\n\nkeyWordLoopInfinite\n\nkeyWordLoop\n\nkeyWordLoopParse\n\nkeyWordContinue\n\nkeyWordBreak\n\nkeyWordFunc\n\nkeyWordAwait\n\nkeyWordAsync\n\nkeyWordThrow\n\nkeyWordErrorMsg\n\nkeyWordTry\n\nkeyWordCatch\n\nkeyWordFinally\n\nkeyWordReturnStatement\n\nkeyWordArrayAppend\n\nkeyWordArrayPop\n\nkeyWordArraySize\n\nkeyWordArrayInsert\n\nkeyWordArrayRemove\n\nkeyWordArrayIndexOf\n\nkeyWordArrayDefinition\n\nkeyWordArrayOfIntegersDefinition\n\nkeyWordArrayOfStringsDefinition\n\nkeyWordArrayOfFloatingPointNumbersDefinition\n\nkeyWordArrayOfBooleansDefinition\n\nkeyWordVar\n\nkeyWordLet\n\nkeyWordConst\n\nkeyWordEnd\n\nkeyWordGlobal\n\nkeyWordComment\n\nkeyWordCommentOpenMultiLine\n\nkeyWordCommentCloseMultiLine\n\nkeyWordEscpaeChar\n\nkeyWordMainLabel\n\nkeyWordConcat\n\nkeyWordAdd\n\nkeyWordSub\n\nkeyWordMul\n\nkeyWordDiv\n\nkeyWordMod\n\nkeyWordExp\n\nkeyWordEqual\n\nkeyWordStrictEqual\n\nkeyWordNotEqual\n\nkeyWordGreater\n\nkeyWordLess\n\nkeyWordGreaterEqual\n\nkeyWordLessEqual\n\nkeyWordAnd\n\nkeyWordOr\n\nkeyWordNot\n\nkeyWordBitAnd\n\nkeyWordBitOr\n\nkeyWordBitXor\n\nkeyWordBitNot\n\nkeyWordShiftLeft\n\nkeyWordShiftRight\n\nkeyWordShiftUnsignedRight\n\nkeyWordAssign\n\nkeyWordAssignAdd\n\nkeyWordAssignConcat\n\nkeyWordAssignSub\n\nkeyWordAssignMul\n\nkeyWordAssignDiv\n\nkeyWordAssignMod\n\nkeyWordAssignShiftLeft\n\nkeyWordAssignShiftRight\n\nkeyWordLogicalAssignShiftRight\n\nkeyWordAssignBitAnd\n\nkeyWordAssignBitOr\n\nkeyWordAssignBitXor\n\nkeyWordTernary1\n\nkeyWordTernary2\n\nkeyWordInc\n\nkeyWordDec\n\nAHKlikeLoopsIndexedAt\n\nkeyWordAIndex\n\nkeyWordALoopField\n\nuseCurlyBraces\n\nuseEnd\n\nuseSemicolon\n\nuseParentheses\n\nusePrefixTypeForTypeDefinition\n\nusePostfixTypeForTypeDefinition\n\nusePythonicColonSyntax !!! DEPRECATED !!! DO NOT USE !!!\n\nuseCurlyBracesSyntaxForArrayDef\n\nuseInJavaScriptAlwaysUseVar\n\nuseJavaScriptInAfullHTMLfile\n\nuseJavaScriptAmainFuncDef\n\nuseJavaScriptAllFuncsAreAsync\n\nuseJavaScriptAlwaysTripleEqual\n\n\n# Check if it's HTVM to HTVM or not\n\n```javascript\nif (langToConvertTo == langFileExtension_2) {\n    // this is HTVM to HTVM\n} else {\n    // this is normal conversion to another language, but you should just convert to HTVM syntax using those variables if needed.\n}\n```\n\n---\n\n## License\n\nAll contributions to this marketplace are made under the **GNU General Public License v3.0**. By submitting a plugin, you agree to license your work under these terms. The full license text is available in the `LICENSE` file in this repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthemaster1127%2Fhtvm-marketplace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthemaster1127%2Fhtvm-marketplace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthemaster1127%2Fhtvm-marketplace/lists"}