{"id":26720962,"url":"https://github.com/adamjosefus/pkg","last_synced_at":"2026-05-06T07:33:58.764Z","repository":{"id":39879111,"uuid":"402334885","full_name":"adamjosefus/pkg","owner":"adamjosefus","description":"📦 Simple \u0026 primitive package manager based on git repositories.","archived":false,"fork":false,"pushed_at":"2022-12-18T16:06:25.000Z","size":91447,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-03-04T01:47:56.030Z","etag":null,"topics":["deno","package-manager","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adamjosefus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-02T07:47:22.000Z","updated_at":"2022-08-14T05:27:59.000Z","dependencies_parsed_at":"2022-09-05T08:31:45.078Z","dependency_job_id":null,"html_url":"https://github.com/adamjosefus/pkg","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamjosefus%2Fpkg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamjosefus%2Fpkg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamjosefus%2Fpkg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamjosefus%2Fpkg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adamjosefus","download_url":"https://codeload.github.com/adamjosefus/pkg/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245911599,"owners_count":20692618,"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":["deno","package-manager","typescript"],"created_at":"2025-03-27T19:35:12.108Z","updated_at":"2026-05-06T07:33:58.698Z","avatar_url":"https://github.com/adamjosefus.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PKG 📦\n\nPKG is a CLI tool for managing dependecies in your project.\n\nNo more copy/paste yours  frameworks, libraries or helpers across multiple works.\n\n\n---\n\n\n## Agenda\n- [Installations](#installations)\n- [Config file](#config-file)\n- [Command Line Interface](#command-line-interface)\n\n\n---\n\n\n# Installations\n\n1. [Install **Deno 🦕**](https://deno.land/#installation)\n2. [Check if your `.deno` folder is in PATH](https://deno.land/manual/tools/script_installer#script-installer)\n3. Clone this repository\n4. **Install it!**\n\n\n## Install via **Visual Studio Code**\n- Open Repository in VS Code\n- Open Command Pallete _(`Ctrl + Shift + P` / `⌘ + Shift + P`)_\n    - Select → `Tasks: Run Task`\n    - Run → `Install PKG`\n\n\n## Install via **Terminal**\n```sh\ndeno install \\\n --allow-read \\\n --allow-write \\\n --allow-env \\\n --allow-run \\\n --allow-net \\\n --no-prompt \\\n --name pkg \\\n ./pkg.ts\n```\n\n## Uninstallations\nSimple!\n```sh\ndeno uninstall pkg\n```\n\n\n---\n\n\n\n## Config File\n\nIn your project root folder, must exist configuration file of PKG. Name of the file must be `dependecies.jsonc` or `dependecies.json`. (JSOC is a extension for [JSON with Comments](https://www.npmjs.com/package/jsonc-parser))\n\n\n### `version`\n\nVersion property is a string that represents the version of schema.\n\nFormat should be [sematic version](https://semver.org).\n - `1.0.0` is eqivalent to `v1.0.0`\n - `1.2` is eqivalent to `v1.2.0`\n - `1` is eqivalent to `v1.0.0`\n - `1.2.3.4` is eqivalent to `v1.2.3`\n\n\n```jsonc\n{\n  \"version\": \"v3.0.0\",\n}\n```\n\nThis is a **required** property.\n\n\n### Destination\n\nPath to the folder where the dependencies will be installed. Relative to localtion of config file.\n\nValue can be `string` or `null`.\n\n```jsonc\n{\n  \"destination\": \"./dependencies\",\n}\n```\n\n\n### Repositories\nA key-value object of repositories.\n\nThe key is the reference/url of the repository. Value is:\n- tag of the repository\n- specication of the repository\n- array of specifications of the repository\n\n```jsonc\n{\n    \"repositories\": {\n        \"\u003crepo\u003e\": \"\u003ctag\u003e\",\n        \"\u003crepo\u003e\": {\n            \"destination\": \"\u003cdestination\u003e\",\n            \"name\": \"\u003cname\u003e\",\n            \"tag\": \"\u003ctag\u003e\",\n            \"disabled\": \"\u003cboolean\u003e\",\n        },\n        \"\u003crepo\u003e\": [\n            {\n                \"destination\": \"\u003cdestination\u003e\",\n                \"name\": \"\u003cname\u003e\",\n                \"tag\": \"\u003ctag\u003e\",\n                \"disabled\": \"\u003cboolean\u003e\",\n            },\n            {\n                \"destination\": \"\u003cdestination\u003e\",\n                \"name\": \"\u003cname\u003e\",\n                \"tag\": \"\u003ctag\u003e\",\n                \"disabled\": \"\u003cboolean\u003e\",\n            },\n            // ...\n        ],\n        // ...\n    },\n}\n```\n\n#### `destination`\nDirectory where the dependency will be installed.\nIf not specified, then fallback to [the common destination](#destination).\n\n```jsonc\n{\n    \"destination\": \"\u003cdestination\u003e\",\n    \"repositories\": {\n        \"\u003crepo\u003e\": {\n            \"destination\": \"\u003cdestination\u003e\",\n        }\n    }\n}\n```\n\n#### `name`\nName of the dependency folder.\nIf not specified, then fallback to name of the repository.\n\n```jsonc\n{\n    \"repositories\": {\n        \"\u003crepo\u003e\": {\n            \"name\": \"\u003cname\u003e\",\n        }\n    }\n}\n```\n\n#### `tag`\nTag or branch of the repository.\nIf not specified, then fallback to default branch of repository.\n\n```jsonc\n{\n    \"repositories\": {\n        \"\u003crepo\u003e\": \"\u003ctag\u003e\",\n        \"\u003crepo\u003e\": {\n            \"tag\": \"\u003ctag\u003e\",\n        }\n    }\n}\n```\n\n\n#### `disabled`\nBoolean value that indicates if the dependency is disabled.\nDefault value is `false`.\n\n```jsonc\n{\n    \"repositories\": {\n        \"\u003crepo\u003e\": {\n            \"disabled\": \"\u003cboolean\u003e\",\n        }\n    }\n}\n```\n\n\n### Ignore\nWhen your project is a package, you can use `ignore` property to ignore (delete) some files or directories after installation.\n\nFor specifying the files or directories, you can use [glob syntax](https://www.npmjs.com/package/glob).\n\nAll path witch are pointing outside of package be ignored.\n\n```jsonc\n{\n    \"ignore\": [\n        \"\u003cpath\u003e\",\n        \"\u003cglob\u003e\",\n        // ...\n    ]\n}\n```\n\n\n### Options\n\n```jsonc\n{\n    \"options\": {\n        \"updateNpmConfig\": false,\n        \"installNpmModules\": false,\n        \"useGlobalTokens\": false\n    }\n}\n```\n\n#### `updateNpmConfig`\n\nIf `true`, then PKG update your `package.json` by dependecies of installed packages.\n\nDefault value is `false`.\n\n\n#### `installNpmModules`\n\nIf `true`, then PKG install NPM modules (`npm install`) after installation.\n\nDefault value is `false`.\n\n\n#### `useGlobalTokens`\n\nIf `true`, then PKG use global tokens.\n\nDefault value is `false`.\n\n---\n\n### Example of a valid configuration file\n\n```jsonc\n{\n    \"destination\": \"./packages\",\n    \"repositories\": {\n        \"https://github.com/foo.git\": [\n            {\n                \"name\": \"foo_v2\",\n                \"tag\": \"v2.0.1\"\n            },\n            {\n                \"name\": \"foo_v1\",\n                \"tag\": \"v1.4.2\"\n            }\n        ],\n        \"https://dev.azure.com/bar\": {\n            \"tag\": \"v1.0.0\"\n        }\n    },\n    \"tokens\": {\n        \"dev.azure.com\": { \"file\": \"./sercet.txt\" }\n    },\n    \"ignore\": [\n        \"src\",\n        \"package-lock.json\",\n        \"tsconfig.json\",\n        \"README.md\"\n    ],\n    \"options\": {\n        \"updateNpmConfig\": true,\n        \"installNpmModules\": true,\n        \"useGlobalTokens\": true\n    }\n}\n```\n\n\n---\n\n\n# Command line Interface\n\nDesciption of the interface you can show with `pkg --help`.\n\n```bash\n\n  --install, --i\n        Installs packages from the config file.\n\n  --uninstall, --ui\n        Deletes packages according to the config file.\n        Requires comfirmation.\n\n  --delete-destinations, --deldest\n        Deletes the destination directory.\n        Requires comfirmation.\n\n  --tokens, --token\n        Extends the token list with the given tokens. (--tokens=\u003ctoken\u003e@\u003corigin\u003e,...)\n\n  --version, --v\n        Print version.\n        Stops execution.\n\n  --init\n        Initialize config file.\n        Use can specify the file extension using the \"--init=json\" or \"--init=jsonc\".\n        Stops execution.\n\n  --add-global-tokens, --add-global-token\n        Sets global tokens to use. (--add-global-tokens=\u003ctoken\u003e@\u003corigin\u003e,...)\n        Tokens will be added to the \"/Users/\u003cUSER\u003e/.deno/pkg_global_tokens.json\".\n        Stops execution.\n\n  --update-npm-config\n        Overwrites \"option.updateNpmConfig\" of the config file to update \"package.json\".\n        --update-npm-config=\u003cboolean\u003e\n\n  --install-npm-modules\n        Overrides \"option.installNpmModules\" of the config file to install npm modules.\n        --install-npm-modules=\u003cboolean\u003e\n\n  --use-global-tokens\n        Overrides \"option.useGlobalTokens\" of the config file to use global tokens.\n        --use-global-tokens=\u003cboolean\u003e\n\n  --skip-version-check\n        Disables checking the version of the config files.\n\n  --force\n        If true, the script will not ask for confirmation.\n\n```\n\n\n\n\n---\n\n\n## Compilation to an executable file\nDuring compilation, the file names itself according to the operating system.\n\n```bash\ndeno run -A ./bin/compile.ts \n```\n```bash\nCompile to /your-path/pkg.macos\n\u003e deno compile --output=pkg.macos --allow-all ./pkg.ts\n\u003e Succeed\n```\n\n\n\n## Bundle to a single executable js file\n\n```bash\ndeno run -A ./bin/bundle.ts\n```\n```bash\nBundle to ./your-path/pkg.js\n\u003e deno bundle ./pkg.ts ./your-path/pkg.js\n\u003e Succeed\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamjosefus%2Fpkg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadamjosefus%2Fpkg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamjosefus%2Fpkg/lists"}