Skip to main content

Tool to switch `uv` dependencies between local editable checkouts and remote git sources.

Project description

uvedit

Switch uv dependencies between local editable checkouts and remote git sources.

Useful when you are a developer of a package that another project depends on via a git source, and you want to work on both simultaneously.

Prerequisites

  • uv installed
  • The package must already have a git entry in [tool.uv.sources] in pyproject.toml:
[tool.uv.sources]
my-lib = { git = "https://github.com/you/my-lib" }

Usage

uvedit local <package> [--dir PATH]
uvedit restore <package>

local — switch to a local editable checkout

uvedit local my-lib
uv sync
  • Clones the git repository to ../my-lib (relative to pyproject.toml) if it doesn't already exist
  • Use --dir PATH to specify a different checkout location
  • Saves the original git source to .uvedit.toml so it can be restored later
  • Rewrites the [tool.uv.sources] entry to { path = "../my-lib", editable = true }
  • Adds .uvedit.toml to .gitignore if one exists

restore — restore the remote git source

uvedit restore my-lib
uv sync
  • Reads the original source from .uvedit.toml
  • Rewrites the [tool.uv.sources] entry back to the original git source
  • Removes the package entry from .uvedit.toml (deletes the file if empty)

How it works

uvedit stores the original remote source in .uvedit.toml at the project root when switching to a local checkout. This file should not be committed (it is added to .gitignore automatically). The local checkout is not affected by restore — it stays on disk and will be reused if you run local again.

Installation

Install using uv:

uv tool install 'git+https://github.com/mjdemilliano/uvedit'

Install using pipx:

pipx install 'git+https://github.com/mjdemilliano/uvedit'

Install using pip:

pip install 'git+https://github.com/mjdemilliano/uvedit'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uvedit-1.0.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uvedit-1.0.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file uvedit-1.0.0.tar.gz.

File metadata

  • Download URL: uvedit-1.0.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Pop!_OS","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for uvedit-1.0.0.tar.gz
Algorithm Hash digest
SHA256 53ec0ece7e8634f022dda40d5da22bdc097220bc12af3b27542602e88ffc6d2c
MD5 b3f614eb286e3c1d6f016b5a19dda6f5
BLAKE2b-256 e9fec7a76061c337b4cf4dcba04932110351c425ffaaed5c3faec4f821e2fffc

See more details on using hashes here.

File details

Details for the file uvedit-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: uvedit-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Pop!_OS","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for uvedit-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f78406ec2739f0e11d64dcddeb0ab609475838d758db565206eb99be44626f69
MD5 d68267c9bfe3d16bbe6efa267a1f3360
BLAKE2b-256 1ae7de33f87b74aadfbea4df86ebe7e85160edcd667b755680a8c95d45af1a09

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page