{"id":17096014,"url":"https://github.com/kontheocharis/powar-ts","last_synced_at":"2025-05-12T23:42:35.288Z","repository":{"id":186396342,"uuid":"675102996","full_name":"kontheocharis/powar-ts","owner":"kontheocharis","description":"A simple but powerful TypeScript-based dot-file manager.","archived":false,"fork":false,"pushed_at":"2024-10-11T14:34:40.000Z","size":135,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-12T23:42:27.370Z","etag":null,"topics":[],"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/kontheocharis.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-05T19:35:14.000Z","updated_at":"2024-10-11T14:25:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"e7686dad-df0e-48ab-bf19-b076cfc6fb1a","html_url":"https://github.com/kontheocharis/powar-ts","commit_stats":null,"previous_names":["kontheocharis/powar-ts"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kontheocharis%2Fpowar-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kontheocharis%2Fpowar-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kontheocharis%2Fpowar-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kontheocharis%2Fpowar-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kontheocharis","download_url":"https://codeload.github.com/kontheocharis/powar-ts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253843168,"owners_count":21972867,"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":[],"created_at":"2024-10-14T14:44:26.353Z","updated_at":"2025-05-12T23:42:35.270Z","avatar_url":"https://github.com/kontheocharis.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Powar\n\nPowar is a dot-file configuration manager.\n\nEach dot-file setup consists of a TypeScript project that uses the `powar` Deno\nlibrary to define a set of **modules**, each corresponding to a configuration\nfor some program or group of programs. For example, a Powar project might\ncontain modules `tmux`, `nvim`, `vscode` and `shell_scripts`.\n\nEach of these will install relevant configuration files for each program into\ntheir appropriate places. Furthermore, each module has the full power of\nTypeScript along with an API provided by Powar to perform common tasks such as\ninstalling files or running commands.\n\n## Getting started\n\nRequirements: a UNIX system, recent versions of NodeJS and Yarn.\n\nThe first step is to install `powar_init` globally with Deno:\n\n```sh\n$ deno install -g --allow-read --allow-run jsr:@kontheocharis/powar/powar-init\n```\n\nThen, create a new Powar project (where `powar-init` should be replaced by the\nfull installation path printed by the command above, if Deno is not in your\n`PATH`):\n\n```sh\n$ cd ~\n$ powar-init --path ./dot_files\n```\n\nThis will create a folder `dot_files` containing a Deno project. Run the\ntemplate Powar project by:\n\n```sh\n$ cd dot_files\n$ deno run main.ts\n```\n\nYou should see the following output:\n\n```\nAll module dependencies met.\nRunning hello_world...\n  Hello, world!\nDone.\n```\n\nThis means that the module `hello_world` was run, which logged the message\n\"Hello, world!\".\n\nTo add your configurations, start by mirroring the `hello_world` module in\n`modules/hello_world/mod.ts` to a program of your choice, for example,\n`modules/nvim/mod.ts`. An example configuration for `nvim` might be:\n\n```ts\nimport { powar } from \"../../deps.ts\";\n\nexport default powar.module({\n  name: \"nvim\",\n  dependsOn: [],\n  path: powar.dir(import.meta),\n  async action(p) {\n    await p.install({\"init.vim\", \"$HOME/.config/nvim/init.vim\"});\n    p.info(\"Neovim configuration installed.\");\n  },\n});\n```\n\nThen, update the `global.ts` file to register your new module:\n```ts\nimport { powar } from \"./deps.ts\";\nimport nvim from \"./modules/nvim/mod.ts\";\n\npowar.runCli({\n  rootPath: powar.dir(import.meta),\n  modules: [\n    nvim({}),\n  ],\n});\n```\n\nThen, running `deno run main.ts` should produce:\n```\nAll module dependencies met.\nRunning nvim ..\n  Neovim configuration installed.\nDone.\n```\n\n## API and command-line arguments\n\nTo see all the available command-line arguments for `powar-init`, run\n`powar-init -h`.\n\nAll available API functions provided by `powar` are documented\n[here](https://jsr.io/@kontheocharis/powar/doc/~/CommonApi).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkontheocharis%2Fpowar-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkontheocharis%2Fpowar-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkontheocharis%2Fpowar-ts/lists"}