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.1.tar.gz (5.1 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.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: uvedit-1.0.1.tar.gz
  • Upload date:
  • Size: 5.1 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.1.tar.gz
Algorithm Hash digest
SHA256 56f8ef63fd222653b69b6f6cdb8695f972f12789599c540588c9244fa7aecac6
MD5 d6f304619d32994d1a1aaa245b22fb90
BLAKE2b-256 64af373fa6fd8ed4d063d766d1bcd7a581a980ec8497deea6a2967619b69ddc9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uvedit-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b32a19de9ec9837467c6610c04e59c0975763ba4b4e6a282f38f8716c2176222
MD5 d7033c0a64d2b4a8e217758d448871fb
BLAKE2b-256 4a70fe4b1dc84a9cd187c3e8c4f35e330bf2d121d36f07abb22d0cb33a0c9196

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