{"id":20654983,"url":"https://github.com/codefend/core","last_synced_at":"2025-07-02T09:06:29.992Z","repository":{"id":65277903,"uuid":"584856992","full_name":"Codefend/core","owner":"Codefend","description":"Code obfuscator CLI that protects your code regardless of the programming language or framework.","archived":false,"fork":false,"pushed_at":"2025-01-01T05:14:31.000Z","size":1396,"stargazers_count":18,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-28T13:52:58.711Z","etag":null,"topics":["angular","arduino","nuxt","obfuscator","python","react","svelte","uglify","vue"],"latest_commit_sha":null,"homepage":"https://codefend.github.io/docs","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Codefend.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2023-01-03T17:35:58.000Z","updated_at":"2024-12-10T17:08:50.000Z","dependencies_parsed_at":"2024-08-03T08:29:51.318Z","dependency_job_id":"cdaf2a7c-6c4d-4085-ba94-a7f5f332df5c","html_url":"https://github.com/Codefend/core","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/Codefend/core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codefend%2Fcore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codefend%2Fcore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codefend%2Fcore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codefend%2Fcore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Codefend","download_url":"https://codeload.github.com/Codefend/core/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codefend%2Fcore/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263108812,"owners_count":23415006,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["angular","arduino","nuxt","obfuscator","python","react","svelte","uglify","vue"],"created_at":"2024-11-16T18:07:53.775Z","updated_at":"2025-07-02T09:06:29.954Z","avatar_url":"https://github.com/Codefend.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n \u003cimg src=\"./public/img/logo.png\"\u003e\n\u003c/p\u003e\n\n# Codefend\n\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/Codefend/core/ci.yml?branch=main)\n![NPM](https://img.shields.io/npm/dt/codefend)\n![Bundlephobia](https://img.shields.io/bundlephobia/min/codefend)\n![NPM](https://img.shields.io/node/v/codefend)\n![NPM](https://img.shields.io/npm/l/codefend)\n\n`Codefend` is a dynamic 🪩 CLI tool that obfuscates your source code, folders, and file names, compatible with any programming language or framework.\nIt delivers powerful obfuscation while ensuring performance maintained ⚡, so you benefit from enhanced security without compromising your application's speed or efficiency.\nAdditionally, Codefend offers plugins for Webpack, Rollup, and Vite.\n\nBeyond simple obfuscation, Codefend delivers advanced features, integrating smoothly with current uglifiers or minifiers. It employs a two-layer obfuscation 🪞 process, embedding hidden code within hidden code for irreversible source code protection.\n\nFor Codefend to work properly, you need to implement a folder and files naming convention, a code naming convention, or both. Once set up, Codefend will handle obfuscation, allowing you to concentrate on development and safeguard your intellectual property ✨\n\n- [Folder and files naming convention](https://codefend.github.io/docs/basic-usage/naming-conventions/folders-files-naming-convention)\n- [Code naming convention](https://codefend.github.io/docs/basic-usage/naming-conventions/code-naming-convention)\n\nVisit the [docs](https://codefend.github.io/docs/) for instructions, examples, and advanced settings.\n\n## Installation\n\n#### `Globally`\n\n```bash\nnpm install -g codefend\ncodefend -i  //required only the first time, generates .codefendrc.json\ncodefend -o  //obfuscates your whole project inside a new directory: 'codefend-output'\n```\n\n#### `Dev dependency`\n\n```bash\nnpm install -D codefend\n```\n\n#### `npx`\n\nIn case you want to execute it directly without installing it on your machine:\n\n```bash\nnpx codefend -i  //required only the first time, generates .codefendrc.json\nnpx codefend -o  //obfuscates your whole project inside a new directory: 'codefend-output'\n```\n\n#### `Webpack`\n\nIf you're using Webpack, you can use [webpack-plugin-codefend](https://www.npmjs.com/package/webpack-plugin-codefend) instead of directly using the CLI, keeping in mind that not all features are propagated to the plugin and may take time to become available.\n\n#### `Rollup/Vite`\n\nIf you're using Rollup or Vite, you can use [rollup-plugin-codefend](https://www.npmjs.com/package/rollup-plugin-codefend) instead of directly using the CLI, keeping in mind that not all features are propagated to the plugin and may take time to become available.\n\n## Commands\n\n```shell\nUsage: codefend [options]\n\nDefend Your Code By All Means Necessary. 💪 😎\n\nOptions:\n  -i, --init       Create the config file (.codefendrc.json)\n  -o, --obfuscate  Obfuscate the project\n  -c, --check      Check the config file for potential warnings/errors\n  -v, --version    Output the version number\n  -h, --help       Display help for command\n```\n\n## Basic Usage\n\n### `Step 1`: Naming convention\n\n`Add prefixes to the words that you want to encrypt.`\n\n```js\n//as a starting point:  prefix the words that should be encrypted with l_\nclass l_Calculator {\n  l_sum(l_a, l_b) {\n    const l_results = l_a + l_b;\n    return l_results;\n  }\n}\n\n//\u003e\u003e\u003e\u003e\u003e\u003e==== Will Become ======\u003c\u003c\u003c\u003c\u003c\u003c\n\nclass Ox0 {\n  Ox1(Ox2, Ox3) {\n    const Ox4 = Ox2 + Ox3;\n    return Ox4;\n  }\n}\n\n// Or for a better organized naming convention:\n/** \n * \n1- class -\u003e starts with c_\n2- function -\u003e starts with f_\n3- parameter -\u003e starts with p_\n4- local variable -\u003e starts with l_\n*/\nclass c_Calculator {\n  f_sum(p_a, p_b) {\n    const l_results = p_a + p_b;\n    return l_results;\n  }\n}\n\n//\u003e\u003e\u003e\u003e\u003e\u003e==== Same results ======\u003c\u003c\u003c\u003c\u003c\u003c\nclass Ox0 {\n  Ox1(Ox2, Ox3) {\n    const Ox4 = Ox2 + Ox3;\n    return Ox4;\n  }\n}\n```\n\n```html\n\u003c!-- Html example, can work also with Angular,React,Vue,Svelte... in the same way --\u003e\n\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003cstyle\u003e\n      .l_red {\n        color: red;\n      }\n    \u003c/style\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cdiv class=\"l_red\"\u003el_secret\u003c/div\u003e\n    \u003cdiv class=\"l_red\"\u003eHello World\u003c/div\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n\n\u003c!-- Will Become --\u003e\n\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003cstyle\u003e\n      .Ox1 {\n        color: red;\n      }\n    \u003c/style\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cdiv class=\"Ox1\"\u003eOx0\u003c/div\u003e\n    \u003cdiv class=\"Ox1\"\u003eHello World\u003c/div\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n### `Step 2`: Run the CLI\n\n`navigate to the root of your project and run the following commands:`\n\n```bash\ncodefend -i  //required only the first time, generates .codefendrc.json\n\n```\n\n```bash\ncodefend -o  //obfuscates your whole project inside a new directory: 'codefend-output'\n```\n\nFor a more detailed explanation, please refer to the [obfuscation](https://codefend.github.io/docs/basic-usage/obfuscation) section of the docs.\n\n### `Step 3`: install dependencies, build and deploy the obfuscated project\n\nPlease refer to the [build and deployment](https://codefend.github.io/docs/distribution/build-and-deployment) and [ troubleshooting](https://codefend.github.io/docs/distribution/troubleshooting) sections of the docs.\n\n## Configuration\n\nPlease refer to the [configuration](https://codefend.github.io/docs/references/configuration) section of the docs.\n\n## Migration guide\n\nPlease refer to the [migration guide](https://codefend.github.io/docs/migrations/codefend-v3) section of the docs.\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## License\n\n[MIT](./LICENSE.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodefend%2Fcore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodefend%2Fcore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodefend%2Fcore/lists"}