Skip to main content

Create isolated multi-repository workspaces for engineering tasks

Project description

Anvil

 █████╗ ███╗   ██╗██╗   ██╗██╗██╗     
██╔══██╗████╗  ██║██║   ██║██║██║     
███████║██╔██╗ ██║██║   ██║██║██║     
██╔══██║██║╚██╗██║╚██╗ ██╔╝██║██║     
██║  ██║██║ ╚████║ ╚████╔╝ ██║███████╗
╚═╝  ╚═╝╚═╝  ╚═══╝  ╚═══╝  ╚═╝╚══════╝

Create isolated multi-repository workspaces for engineering tasks.

Installation

uv tool install git+https://github.com/felixscherz/anvil

Getting started

Create a workspace

Provide a target directory and one or more repository specifiers. Each specifier can be a local path to an existing Git repository or any remote URL accepted by git clone.

anvil create --target /tmp/workspaces/feature-abc \
  ~/repos/my-service \
  git@github.com:org/other-service.git

Anvil will:

  1. Infer the branch name from the target directory name (feature-abc).
  2. For local paths — create a git worktree on a new branch at the tip of the default branch.
  3. For remote URLs — clone the repository and check out a new branch.
  4. Write a manifest to /tmp/workspaces/feature-abc/.anvil/manifest.json.

Example output:

Creating Anvil workspace: /tmp/workspaces/feature-abc
Branch: feature-abc
  + my-service -> /tmp/workspaces/feature-abc/my-service
  + other-service -> /tmp/workspaces/feature-abc/other-service

Created Anvil workspace: /tmp/workspaces/feature-abc
Branch: feature-abc
  - my-service -> /tmp/workspaces/feature-abc/my-service
  - other-service -> /tmp/workspaces/feature-abc/other-service

Clean up a workspace

anvil clean --target /tmp/workspaces/feature-abc

Anvil reads the manifest, prints a summary, and prompts for confirmation before removing everything.

Anvil workspace: /tmp/workspaces/feature-abc
Branch: feature-abc
Repositories (2):
  - my-service (worktree) -> /tmp/workspaces/feature-abc/my-service
  - other-service (clone) -> /tmp/workspaces/feature-abc/other-service
Remove Anvil workspace at /tmp/workspaces/feature-abc containing 2 repositories? [y/N]

Skip the prompt with --yes:

anvil clean --target /tmp/workspaces/feature-abc --yes

Add a repository to an existing workspace

anvil add --target /tmp/workspaces/feature-abc ~/repos/another-service

Anvil reads the branch name from the existing manifest (feature-abc) and creates the new repository on that same branch. The manifest is updated in place with the new entry appended. Rollback applies only to repos added in the current run — existing workspace members are untouched.

Notes

  • The branch name is derived from the basename of --target. /tmp/workspaces/feature-abcfeature-abc.
  • anvil add reads the branch name from the existing manifest — the target directory name is irrelevant.
  • The same branch name is created in every repository in the workspace — this is expected and correct.
  • If any repository fails during create or add, Anvil rolls back only the repos created in that run.
  • Anvil will refuse to proceed if the target is non-empty, if a derived branch already exists, or if two repositories share the same derived name.

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

anvil_workspaces-0.1.0.tar.gz (35.0 kB view details)

Uploaded Source

Built Distribution

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

anvil_workspaces-0.1.0-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file anvil_workspaces-0.1.0.tar.gz.

File metadata

  • Download URL: anvil_workspaces-0.1.0.tar.gz
  • Upload date:
  • Size: 35.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for anvil_workspaces-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4d885934a407f133a1e707b2da903d934b0070db7998a86a710f3ed14c29337c
MD5 40336fee7c5a887d3e7a7865a6a9d47f
BLAKE2b-256 bb96f76704990cdcb65b056a04f534899a0756a0d7757fbda906e19cc5b75b7d

See more details on using hashes here.

File details

Details for the file anvil_workspaces-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: anvil_workspaces-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for anvil_workspaces-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 62e397ebfce7b455b2095acfe481d0d2ee918d73be0cd664064245002a269426
MD5 ad0038cc998440c700d045cae7ca72ab
BLAKE2b-256 3c6e9dbbf87da2a6b818e1a475598c93445f2eee45d5b2ba57905a89f01a07ce

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