{"id":13632622,"url":"https://github.com/denodep/dep","last_synced_at":"2025-10-20T17:35:17.069Z","repository":{"id":57675310,"uuid":"268050337","full_name":"denodep/dep","owner":"denodep","description":"Deno dependency management tool.","archived":false,"fork":false,"pushed_at":"2020-07-28T09:57:19.000Z","size":66,"stargazers_count":50,"open_issues_count":3,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-17T21:44:10.816Z","etag":null,"topics":["cli","deno","dependency","management","module","package","tool"],"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/denodep.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}},"created_at":"2020-05-30T09:40:51.000Z","updated_at":"2024-01-14T13:09:00.000Z","dependencies_parsed_at":"2022-09-26T20:41:31.747Z","dependency_job_id":null,"html_url":"https://github.com/denodep/dep","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denodep%2Fdep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denodep%2Fdep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denodep%2Fdep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denodep%2Fdep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denodep","download_url":"https://codeload.github.com/denodep/dep/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249436880,"owners_count":21271959,"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","dependency","management","module","package","tool"],"created_at":"2024-08-01T22:03:09.051Z","updated_at":"2025-10-20T17:35:16.950Z","avatar_url":"https://github.com/denodep.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/denodep/assets/master/img/logo_text.png\" width=\"288\"\u003e\n\u003c/p\u003e\n\n# Dep\n\nDep is a dependency management tool for [Deno](https://github.com/denoland/deno). It requires deno 1.0 or greater.\n\nDep uses [import maps](https://deno.land/manual/linking_to_external_code/import_maps) to manage your project dependencies, which might be the most elegant way so far.\n\nUse dep cli to quickly and easily add any module as a dependency from any arbitrary source you want like dep registry, deno standard library `std`, deno third party modules `x` or `github` repositories.\n\n- [CDN](#cdn)\n- [CLI](#cli)\n  - [Installation](#installation)\n  - [Basic Usage](#basic-usage)\n  - [Commands](#commands)\n    - [add](#add)\n    - [remove](#remove)\n    - [init](#init)\n    - [info](#info)\n    - [publish](#publish)\n    - [start](#start)\n  - [Manifest](#manifest)\n- [Issues](#issues)\n- [Contributing](#contributing)\n- [License](#license)\n\n## CDN\n\nDep provides a fast, global content delivery network (CDN) for every published package on the dep registry. All the modules are served as separate files over HTTP/2 with edge caching. So you can easily import any file directly using a URL like:\n\n```\nhttps://cdn.depjs.com/\u003cpackage\u003e[@\u003cversion\u003e]/\u003cfile\u003e\n```\n\n*\\* If you're building a complex program with deno, you might want to use dep `cli` to manage project dependencies.*\n\n## CLI\n\n## Installation\n\n**Deno script installer**:\n\n```sh\ndeno install -A --unstable https://cdn.depjs.com/dep/bin/dep.ts\n```\n\n*\\* See [deno install](https://deno.land/manual/tools/script_installer) documentation if you're new to deno script installer.*\n\n**Homebrew (Mac)**:\n\n```sh\nbrew tap denodep/dep \u0026\u0026 brew install deno-dep\n```\n\nUpgrade:\n\n```sh\nbrew upgrade deno-dep\n```\n\n## Basic Usage\n\n**Step 1: Add**\n\nAdd dependencies by using `dep add` command.\n\nFor example, the following command adds `http` module from deno standard library.\n\n```sh\ndep add std:http\n```\n\n**Step 2: Import**\n\nImport the module with a relative URL in your script.\n\nThe following code import `server` from `http` module.\n\n```ts\nimport { serve } from 'http/mod.ts'\n\n// your codes...\n```\n**Step 3: Run**\n\nRun your deno program with `--importmap` flag. Or just use `dep start` instead.\n\n```sh\ndeno run --importmap=deps.json --unstable \u003cfile\u003e\n\n# or\ndep start \u003cfile\u003e\n```\n\n## Commands\n\n```sh\nUsage: dep [command] [flags]\n\nOptions:\n  -v, --version      output the version number\n  --verbose          output verbose messages on internal operations\n  -h, --help         display help for command\n\nCommands:\n  add                Add a dependency.\n  remove             Remove a dependency.\n  init               Interactively create a pkg.json file.\n  info               Show information about a package.\n  signup             Sign up for a dep registry account.\n  login              Log in to dep registry.\n  logout             Clear login credentials.\n  publish            Publish a package to the dep registry.\n  start              Start a deno program with automatically generated flags.\n  whoami             Print the dep username.\n  help [command]     display help for command\n```\n\n### add\n\nAdd a dependency.\n\n```sh\ndep add \u003cpackage...\u003e\n```\n\n```sh\n# Add a module published on then dep registry.\ndep add \u003cmodule\u003e[@\u003cversion\u003e]\n\n# Add a deno standard (std) module.\ndep add std:\u003cmodule\u003e[@\u003cversion\u003e]\n\n# Add a deno third party (x) module.\ndep add x:\u003cmodule\u003e[@\u003cversion\u003e]\n\n# Add a github repository as dependency. (You can also use the prefix alias gh:)\ndep add github:\u003cowner\u003e/\u003crepo\u003e[@\u003ctag\u003e]\n```\n\n### remove\n\nRemove a dependency.\n\n```sh\ndep remove \u003cpackage...\u003e\n```\n\n### init\n\nInteractively create a pkg.json file.\n\n```sh\ndep init\n```\n\n### info\n\nShow information about a package.\n\n```sh\ndep info \u003cpackage\u003e[@\u003cversion\u003e]\n```\n\n### publish\n\nPublish a package to the dep registry.\n\n```sh\ndep publish\n```\n\nIf you're using import maps in your project, dep cli will replace all the relative URLs to absolute URLs that mapping in your import map before packaging. With this feature, developers can always import / run / install any module or script by the remote URLs without import maps.\n\n### start\n\nStart a deno program with automatically generated flags.\n\n```sh\ndep start [\u003cfile\u003e]\n```\n\nAfter defining the entry point and permission in `pkg.json` file, you can use this common to execute your deno program.\n\nHere's an example:\n\n```js\n// pkg.json\n{\n  \"main\": \"mod.ts\",\n  \"importmap\": \"deps.json\",\n  \"permissions\": {\n    \"read\": true,\n    \"run\": true,\n    \"net\": [\"google.com\", \"cdn.depjs.com\"]\n  }\n}\n```\n\n```sh\ndep start\n# \u003e\u003e deno run --allow-read --allow-run --allow-net=google.com,cdn.depjs.com --importmap=deps.json --unstable mod.ts\n```\n\n### ...\n\nFor more references about dep cli, you can use the `dep help` command to read any of them once it's installed.\n\n### Manifest\n\nIf you're a module contributor, you might want to know more information about the manifest `pkg.json`, it's much like the `package.json` in npm as you already know, but a little different. It has a `importmap` property to specify the filename of import map (Defaults to `deps.json`) and a `permissions` property to specify the required permissions of your program.\n\n```ts\ntype Manifest = {\n  name: string\n  version: string\n  description?: string\n  main?: string\n  importmap?: string\n  dependencies?: {\n    [key: string]: string\n  }\n  permissions?: {\n    [key: string]: true | Array\u003cstring\u003e\n  }\n  keywords?: string[]\n  homepage?: string\n  author?: string | {\n    name: string\n    email?: string\n    url?: string\n  }\n  license?: string\n  repository?: {\n    type: string\n    url: string\n  }\n  bugs?: {\n    url: string\n  }\n}\n```\n\n## Issues\n\nIf you find some issues about dep, or a module is not loading correctly, please report them:\n\n\u003chttps://github.com/denodep/dep/issues\u003e\n\n## Contributing\n\nContributions are always welcome, and they are greatly appreciated! Before you submit a pull request, check that it meets these guidelines:\n\n- Use `TypeScript` instead of `JavaScript`.\n- Use underscores in filenames.\n- Make pull requests as descriptive as possible.\n\n## License\n\n[MIT](https://github.com/denodep/dep/blob/master/LICENSE)\n\nCopyright (c) 2020, Acathur\n","funding_links":[],"categories":["TypeScript","基础设施","cli"],"sub_categories":["Deno 源"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenodep%2Fdep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenodep%2Fdep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenodep%2Fdep/lists"}