dotpkg


Namedotpkg JSON
Version 0.2.1 PyPI version JSON
download
home_pageNone
SummaryPackage manager for your dotfiles
upload_time2024-05-22 15:37:58
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT License Copyright (c) 2022 fwcd Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords package-manager dotfiles
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Dotpkg

[![PyPI](https://img.shields.io/pypi/v/dotpkg)](https://pypi.org/project/dotpkg)
[![Check](https://github.com/fwcd/dotpkg/actions/workflows/check.yml/badge.svg)](https://github.com/fwcd/dotpkg/actions/workflows/check.yml)

A package manager for your dotfiles.

## Why Dotpkg?

- **Lightweight**: Pure Python 3.10 with no dependencies
- **JSON-configurable**: Easy to write, includes a schema for code completion
- **Cross-platform**: Runs on Linux, macOS and Windows
- **Flexible**: Configurable target locations, ignore lists, rename rules and more

## Usage

First make sure to have Python 3.10+ installed. To create a dotfile package, set up a folder with the following layout (the top-level folder is assumed to be some folder, e.g. a Git repo, where you store all of your dotfiles):

```
dotfiles
└─my-package
  ├─dotpkg.json
  ├─.some-dotfile-one
  ├─.some-dotfile-two
    ...
```

A minimal `dotpkg.json` is structured as follows:

```json
{
  "name": "my-package",
  "description": "Description of my package"
}
```

Navigating into `dotfiles` and running `dotpkg install my-package` will then symlink `.some-dotfile-one` and `.some-dotfile-two` into your home directory.

> Note that when running on Windows, unprivileged users might not be able to create symlinks, a feature that `dotpkg` relies on. Enabling `Developer Mode` in your Windows Settings (from an administrator account) will permit this. Also, you may need to substitute `python3 [path/to/dotpkg]` for `dotpkg` since Windows does not support Unix-style shebangs.

Optionally, you can specify keys such as `requiresOnPath` too, which will only install the package if a given binary is found on your `PATH` (useful if your config targets some application). Additionally, `targetDir` configures the search path to symlink the files into some other directory than your home (`dotpkg` will use the first directory that exists, this is useful to cross-platform packages).

For example, a package that manages configurations for Visual Studio Code could look like this:

```json
{
  "name": "vscode",
  "description": "Visual Studio Code settings and keybindings",
  "requiresOnPath": ["code"],
  "targetDir": [
    "${home}/.config/Code",
    "${home}/Library/Application Support/Code",
    "${home}/AppData/Roaming/Code"
  ]
}
```

A full JSON schema for the `dotpkg.json` manifests can be found [here](dotpkg.schema.json).

> Note that you can add the schema to your VSCode settings to get autocompletion in `dotpkg.json` files by specifying `json.schemas`:

```json
{
  "json.schemas": [
    {
      "fileMatch": ["dotpkg.json"],
      "url": "https://raw.githubusercontent.com/fwcd/dotpkg/main/dotpkg.schema.json"
    }
  ]
}
```

Alternatively, you can specify the schema individually in each `dotpkg.json`:

```json
{
  "$schema": "https://raw.githubusercontent.com/fwcd/dotpkg/main/dotpkg.schema.json"
}
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "dotpkg",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "package-manager, dotfiles",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/60/eb/62232d2f585448c2338b77e5eef15d501fb2892e9f88ed668e1e38ba043f/dotpkg-0.2.1.tar.gz",
    "platform": null,
    "description": "# Dotpkg\n\n[![PyPI](https://img.shields.io/pypi/v/dotpkg)](https://pypi.org/project/dotpkg)\n[![Check](https://github.com/fwcd/dotpkg/actions/workflows/check.yml/badge.svg)](https://github.com/fwcd/dotpkg/actions/workflows/check.yml)\n\nA package manager for your dotfiles.\n\n## Why Dotpkg?\n\n- **Lightweight**: Pure Python 3.10 with no dependencies\n- **JSON-configurable**: Easy to write, includes a schema for code completion\n- **Cross-platform**: Runs on Linux, macOS and Windows\n- **Flexible**: Configurable target locations, ignore lists, rename rules and more\n\n## Usage\n\nFirst make sure to have Python 3.10+ installed. To create a dotfile package, set up a folder with the following layout (the top-level folder is assumed to be some folder, e.g. a Git repo, where you store all of your dotfiles):\n\n```\ndotfiles\n\u2514\u2500my-package\n  \u251c\u2500dotpkg.json\n  \u251c\u2500.some-dotfile-one\n  \u251c\u2500.some-dotfile-two\n    ...\n```\n\nA minimal `dotpkg.json` is structured as follows:\n\n```json\n{\n  \"name\": \"my-package\",\n  \"description\": \"Description of my package\"\n}\n```\n\nNavigating into `dotfiles` and running `dotpkg install my-package` will then symlink `.some-dotfile-one` and `.some-dotfile-two` into your home directory.\n\n> Note that when running on Windows, unprivileged users might not be able to create symlinks, a feature that `dotpkg` relies on. Enabling `Developer Mode` in your Windows Settings (from an administrator account) will permit this. Also, you may need to substitute `python3 [path/to/dotpkg]` for `dotpkg` since Windows does not support Unix-style shebangs.\n\nOptionally, you can specify keys such as `requiresOnPath` too, which will only install the package if a given binary is found on your `PATH` (useful if your config targets some application). Additionally, `targetDir` configures the search path to symlink the files into some other directory than your home (`dotpkg` will use the first directory that exists, this is useful to cross-platform packages).\n\nFor example, a package that manages configurations for Visual Studio Code could look like this:\n\n```json\n{\n  \"name\": \"vscode\",\n  \"description\": \"Visual Studio Code settings and keybindings\",\n  \"requiresOnPath\": [\"code\"],\n  \"targetDir\": [\n    \"${home}/.config/Code\",\n    \"${home}/Library/Application Support/Code\",\n    \"${home}/AppData/Roaming/Code\"\n  ]\n}\n```\n\nA full JSON schema for the `dotpkg.json` manifests can be found [here](dotpkg.schema.json).\n\n> Note that you can add the schema to your VSCode settings to get autocompletion in `dotpkg.json` files by specifying `json.schemas`:\n\n```json\n{\n  \"json.schemas\": [\n    {\n      \"fileMatch\": [\"dotpkg.json\"],\n      \"url\": \"https://raw.githubusercontent.com/fwcd/dotpkg/main/dotpkg.schema.json\"\n    }\n  ]\n}\n```\n\nAlternatively, you can specify the schema individually in each `dotpkg.json`:\n\n```json\n{\n  \"$schema\": \"https://raw.githubusercontent.com/fwcd/dotpkg/main/dotpkg.schema.json\"\n}\n```\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2022 fwcd  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Package manager for your dotfiles",
    "version": "0.2.1",
    "project_urls": {
        "Homepage": "https://github.com/fwcd/dotpkg",
        "Repository": "https://github.com/fwcd/dotpkg"
    },
    "split_keywords": [
        "package-manager",
        " dotfiles"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "60eb62232d2f585448c2338b77e5eef15d501fb2892e9f88ed668e1e38ba043f",
                "md5": "3f2a7f8d3b2978f1a799db336be9a5ca",
                "sha256": "6f0cdcc41cda03857a44b768cd32ebdb21764ebe787e12c30573d98a8a9cf446"
            },
            "downloads": -1,
            "filename": "dotpkg-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "3f2a7f8d3b2978f1a799db336be9a5ca",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 18147,
            "upload_time": "2024-05-22T15:37:58",
            "upload_time_iso_8601": "2024-05-22T15:37:58.000857Z",
            "url": "https://files.pythonhosted.org/packages/60/eb/62232d2f585448c2338b77e5eef15d501fb2892e9f88ed668e1e38ba043f/dotpkg-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-22 15:37:58",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fwcd",
    "github_project": "dotpkg",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "dotpkg"
}
        
Elapsed time: 2.41811s