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-workspaces
This installs a git-anvil executable, which Git exposes as the git anvil subcommand. The examples below use git anvil; you can also invoke git-anvil directly.
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.
git anvil create --target /tmp/workspaces/feature-abc \
~/repos/my-service \
git@github.com:org/other-service.git
To override the inferred branch name, pass --branch (-b):
git anvil create --target /tmp/workspaces/feature-abc --branch my-feature \
~/repos/my-service
Anvil will:
- Infer the branch name from the target directory name (
feature-abc), or use the value of--branchwhen provided. - For local paths — create a
git worktreeon a new branch at the tip of the default branch. - For remote URLs — clone the repository and check out a new branch.
- 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
git 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:
git anvil clean --target /tmp/workspaces/feature-abc --yes
Add a repository to an existing workspace
git 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-abc→feature-abc. Pass--branch/-bto override it; the value is sanitized the same way as the inferred name. git anvil addreads 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
createoradd, 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file git_anvil-0.2.0.tar.gz.
File metadata
- Download URL: git_anvil-0.2.0.tar.gz
- Upload date:
- Size: 37.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
718ef85cd2318310737af54dec6e0a9024306ce36a9ee02f4bf99ac70f6e927d
|
|
| MD5 |
0b8fa901be22dd52ac6444cbf20bea3e
|
|
| BLAKE2b-256 |
42951d0f231bc70feb29d0605e69ab07afedb1d5e76e806b10e7f6b2c356f4fb
|
File details
Details for the file git_anvil-0.2.0-py3-none-any.whl.
File metadata
- Download URL: git_anvil-0.2.0-py3-none-any.whl
- Upload date:
- Size: 16.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9bd1e8b012b9464139bb2012acfb81b415e95f9fffec8098ded047bd2b5cf248
|
|
| MD5 |
7bb5f0c58615fadd6b3dbcaf6bafdffc
|
|
| BLAKE2b-256 |
ac9c7d5aa7e4f463be5eb176dcf5a0fbc394c8fba67a7d913b477d94db18113d
|