{"id":13736079,"url":"https://github.com/BentoumiTech/denox","last_synced_at":"2025-05-08T12:32:03.138Z","repository":{"id":48501021,"uuid":"263537461","full_name":"BentoumiTech/denox","owner":"BentoumiTech","description":"Script runner and workspace configuration for Deno","archived":false,"fork":false,"pushed_at":"2022-08-05T07:15:18.000Z","size":228,"stargazers_count":139,"open_issues_count":12,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-26T00:46:52.329Z","etag":null,"topics":["cli","deno","denoland","javascript","script-runner","typescript"],"latest_commit_sha":null,"homepage":"","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/BentoumiTech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-13T05:50:45.000Z","updated_at":"2024-06-16T23:26:27.000Z","dependencies_parsed_at":"2022-09-17T03:51:25.457Z","dependency_job_id":null,"html_url":"https://github.com/BentoumiTech/denox","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BentoumiTech%2Fdenox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BentoumiTech%2Fdenox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BentoumiTech%2Fdenox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BentoumiTech%2Fdenox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BentoumiTech","download_url":"https://codeload.github.com/BentoumiTech/denox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253068700,"owners_count":21848863,"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":["cli","deno","denoland","javascript","script-runner","typescript"],"created_at":"2024-08-03T03:01:15.416Z","updated_at":"2025-05-08T12:32:02.676Z","avatar_url":"https://github.com/BentoumiTech.png","language":"TypeScript","readme":"\u003ch1 align=\"center\"\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://github.com/BentoumiTech/denox\" alt=\"DenoX\"\u003e\n    \u003cimg height=\"100%\" width=\"475px\" src=\"https://raw.githubusercontent.com/BentoumiTech/denox/master/.github/img/denox-logo.png\" alt=\"Deno script runner\"\u003e\n  \u003c/a\u003e\n  \u003cbr/\u003e\n\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/workflow/status/BentoumiTech/denox/CI/master\" alt=\"GitHub Workflow Status\"/\u003e\n  \u003cimg src=\"https://img.shields.io/github/v/tag/bentoumitech/denox?style=flat-square\" alt=\"latest SemVer\"/\u003e\n  \u003cimg src=\"https://img.shields.io/badge/contribution-welcome-brightgreen.svg?style=flat-square\" alt=\"Contribution welcome\"/\u003e\n  \u003cimg src=\"https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square\" alt=\"Commitizen friendly\"/\u003e\n  \u003cimg src=\"https://img.shields.io/badge/semantic-release-e10079.svg?style=flat-square\" alt=\"Semantic release\"/\u003e\n  \u003cimg src=\"https://img.shields.io/github/license/BentoumiTech/denox?logo=MIT\u0026style=flat-square\" alt=\"MIT License\"/\u003e\n  \u003cbr /\u003e\n  \u003cbr /\u003e\n  \u003ca href=\"#installupgrade\"\u003eInstall/Upgrade\u003c/a\u003e •\n  \u003ca href=\"#overview\"\u003eOverview\u003c/a\u003e •\n  \u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e •\n  \u003ca href=\"#getting-started\"\u003eGetting started\u003c/a\u003e •\n  \u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\n  \u003cbr /\u003e\n  \u003cbr /\u003e\n  \u003cimg height=\"100%\" width=\"600px\" src=\"https://raw.githubusercontent.com/bentoumitech/denox/master/.github/img/screenshot-example.png\" alt=\"DenoX screenshot example\"\u003e\n\u003c/p\u003e\n\n## Install/Upgrade\n\nPrerequisites: [Deno](https://github.com/denoland/deno_install) (\u003e=1.0.0)\n\n```bash\n$ deno install -Af -n denox https://denopkg.com/BentoumiTech/denox/denox.ts\n```\n\n## Overview\n\nDenoX is a cross platform script runner and workspace wrapper for Deno\n\nUsing DenoX, you can set up your workspace scripts permissions and options in declarative code.\n\nIn short, it allows you to to replace this:\n\n```bash\n$ deno run --allow-read --allow-write --allow-net main.ts\n```\n\nwith this:\n\n```bash\n$ denox run start\n```\n\n- **DRY** Only write your permissions and options once.\n- **Packaged** Your code can run on a different machine with a short single command `denox run start`\n- **Cross Platform** DenoX support and is tested on Linux, Mac OS and Windows.\n- **Extensible** :soon:\n\n## Usage\n\n```bash\n$ denox --help\ndenox v0.4.0\n\nUsage:\n  $ denox \u003ccommand\u003e [options]\n\nCommands:\n  run \u003cscript\u003e [...args]  Run a script\n\nFor more info, run any command with the `--help` flag:\n  $ denox run --help\n\nOptions:\n  -h, --help     Display this message\n  -v, --version  Display version number\n\nExamples:\ndenox run start\n```\n\n## Getting Started\n\n### `deno-workspace` file\n\nScripts and options need to be defined in a `deno-workspace` file at the root of your project.\n\nDenoX supports YAML, JSON and typescript as format for `deno-workspace`.\n\nIn the following examples running `$ denox run start` will execute main.ts file with `example.com` networking permissions\n\n#### YAML\n\n`deno-workspace.yml`\n\n```yaml\nscripts:\n  start:\n    file: main.ts\n    deno_options:\n      allow-net: example.com\n```\n\n#### JSON\n\n`deno-workspace.json`\n\n```json\n{\n  \"scripts\": {\n    \"start\": {\n      \"file\": \"main.ts\",\n      \"deno_options\": {\n        \"allow-net\": \"example.com\"\n      }\n    }\n  }\n}\n```\n\n#### Typescript\n\n`deno-workspace.ts`\n\n```typescript\nimport { DenoWorkspace } from \"https://denopkg.com/BentoumiTech/denox/src/interfaces.ts\";\n\nconst workspace: DenoWorkspace = {\n  \"scripts\": {\n    \"start\": {\n      \"file\": \"main.ts\",\n      \"deno_options\": {\n        \"allow-net\": \"example.com\"\n      }\n    },\n  },\n};\n\nexport { workspace };\n```\n\n## Scripts\n\nYou can easily run scripts using denox by adding them to the \"scripts\" field in `deno-workspace` and run them with `denox run \u003cscript-name\u003e`.\n\n### Example:\n\n```yaml\nscripts:\n  # \"denox run start\" will execute main.ts with example.com networking permissions\n  start:\n    file: main.ts\n    deno_options:\n      allow-net: example.com\n  # \"denox run develop\" will execute main.ts with localhost networking permissions and source code cache reloaded\n  develop:\n    file: main.ts\n    deno_options:\n      allow-net: localhost\n      reload: true\n      v8-flags:\n        - --regexp-tier-up\n        - --adjust-os-scheduling-parameters true\n```\n\n## Options\n\nScripts can be extended with options.\n\n### deno_options:\n\nDeno options will add the corresponding deno argument with it's value to the deno command.\n\nIt supports string, array of strings and boolean.\n\n### Example:\n\n```yaml\nscripts:\n  # \"denox run start\" will execute \"deno run --allow-net=example.com github.com --reload --allow-read=./files main.ts\"\n  start:\n    file: main.ts\n    deno_options:\n      reload: true\n      allow-net:\n        - example.com\n        - github.com\n      allow-read: ./files\n      allow-write: false\n```\n\n### Compatibility\n\nIt currently support all the options that are accepted by the `deno run` command. For more informations refer to `deno run --help`.\n\n```\nallow-all, allow-env, allow-hrtime, allow-net, allow-plugin, allow-read, allow-run,\nallow-write, cached-only, cert, config, importmap, inspect, inspect-brk, lock, lock-write,\nlog-level, no-remote, quiet, reload, seed, unstable, v8-flags\n```\n\n## Globals\n\nOptions added in \"globals\" field gets added to all scripts.\n\n\u003e Note: If a same option is set in a script and also set globally the script scoped value overwrite the global one\n\n### Example:\n\n```yaml\nscripts:\n  # \"denox run develop\" inherit the --allow-read permission from the globals deno_options\n  # \"deno run --all-read main.ts\"\n  develop:\n    file: main.ts\nglobals:\n  deno_options:\n    allow-read: true\n```\n\n## Contributing\n\nPlease take a look at our [contributing](./CONTRIBUTING.md) guidelines if you're interested in helping!\n","funding_links":[],"categories":["基础设施","Tools","TypeScript","cli"],"sub_categories":["Deno 源","Online Playgrounds","XML","Assistants"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBentoumiTech%2Fdenox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBentoumiTech%2Fdenox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBentoumiTech%2Fdenox/lists"}