Create isolated feature worktrees with allocated runtime environments.
Project description
new-feature
new-feature creates isolated git worktree environments for feature work, allocates conflict-free runtime values, and launches an interactive Codex session in the new worktree.
Usage
uvx new-feature my-feature
uvx new-feature merge-feature my-feature
uvx new-feature teardown my-feature
uvx new-feature teardown my-feature --force
Project Config
Add config to the target repo's pyproject.toml:
[tool.new-feature]
target_branch = "main"
branch_prefix = "feature/"
agent = "codex"
push = false
setup = ["uv sync"]
pre_merge = ["uv run pytest"]
post_merge = ["uv run pytest"]
teardown = []
[tool.new-feature.env]
WEB_PORT = { allocate = "port", min = 3000, max = 3999 }
API_PORT = { allocate = "port", min = 4000, max = 4999 }
DATABASE_NAME = { allocate = "name", prefix = "myapp", max_length = 63 }
CACHE_DIR = { allocate = "path", base = ".new-feature/cache" }
Supported env entries:
{ value = "literal" }{ allocate = "port", min = 3000, max = 3999 }{ allocate = "integer", min = 1, max = 15 }{ allocate = "name", prefix = "myapp", max_length = 63 }{ allocate = "slug", prefix = "myapp" }{ allocate = "path", base = ".new-feature/cache" }
Lifecycle
new-feature my-feature creates .worktrees/my-feature, reserves env values in .new-feature/manifest.toml, runs setup, and launches interactive Codex in the worktree. It automatically adds .new-feature/ and .worktrees/ to .gitignore.
new-feature merge-feature my-feature runs pre-merge checks in the feature worktree, starts a no-commit merge into the target branch, runs post-merge checks on the merged target checkout, commits the merge only if those checks pass, and pushes only when push = true.
new-feature teardown my-feature runs teardown commands, removes the worktree, deletes the branch, and removes the manifest entry. If the feature has not gone through merge-feature, pass --force to abandon it deliberately.
Generated State
The generated manifest is a single ignored TOML file in the main checkout:
.new-feature/manifest.toml
.new-feature/manifest.lock
The manifest stores all active feature env allocations, so ports, names, paths, and namespaces can be reserved without scanning generated worktrees.
Publishing
See docs/PUBLISHING.md for PyPI release setup and verification.
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 new_feature-0.1.0.tar.gz.
File metadata
- Download URL: new_feature-0.1.0.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e31d0d7071cb61c056815c7a3b895b8da1ba761c9b398aea3047e557b3c6640
|
|
| MD5 |
594f814b491c58e152afb786d9601509
|
|
| BLAKE2b-256 |
4507222a7c0e0dbf2603dfd5e592649a0b4aabaa064e9c6f471d361a48a34b8a
|
Provenance
The following attestation bundles were made for new_feature-0.1.0.tar.gz:
Publisher:
publish.yml on crypdick/new-feature
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
new_feature-0.1.0.tar.gz -
Subject digest:
6e31d0d7071cb61c056815c7a3b895b8da1ba761c9b398aea3047e557b3c6640 - Sigstore transparency entry: 2138850004
- Sigstore integration time:
-
Permalink:
crypdick/new-feature@09e1429c8f8ace3044ef9ab367336bb2c9b10d16 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/crypdick
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@09e1429c8f8ace3044ef9ab367336bb2c9b10d16 -
Trigger Event:
release
-
Statement type:
File details
Details for the file new_feature-0.1.0-py3-none-any.whl.
File metadata
- Download URL: new_feature-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e9b1b548483bedf535642728e13aa055d8c818f5537f6dec44b52b1dbb11032
|
|
| MD5 |
48f3c93f9179e35f7395e730552d1687
|
|
| BLAKE2b-256 |
34ae231fc8549c04ca0e07637c48e1162001d2294d3328c5cf462beb41062623
|
Provenance
The following attestation bundles were made for new_feature-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on crypdick/new-feature
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
new_feature-0.1.0-py3-none-any.whl -
Subject digest:
1e9b1b548483bedf535642728e13aa055d8c818f5537f6dec44b52b1dbb11032 - Sigstore transparency entry: 2138850011
- Sigstore integration time:
-
Permalink:
crypdick/new-feature@09e1429c8f8ace3044ef9ab367336bb2c9b10d16 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/crypdick
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@09e1429c8f8ace3044ef9ab367336bb2c9b10d16 -
Trigger Event:
release
-
Statement type: