foresto
A CLI tool that creates isolated working copies of a project for parallel AI-assisted development.
foresto start checks out git-tracked files with git worktree add and copies non-git files (.env, node_modules, etc.) declared in the share setting of .foresto.toml. Each copy is registered as a git worktree, so you can switch between them with tools like lazygit.
Installation
# uv (recommended)
uv tool install foresto
# pip
pip install foresto
# straight from GitHub
uv tool install git+https://github.com/j4rviscmd/foresto
Usage
| Command | Purpose | Example |
|---|---|---|
foresto --version |
Show version | foresto --version |
foresto start <base_path> <name> |
Create a working copy | foresto start ./my-app quick-silver-moon |
foresto finish <name> |
Remove a working copy | foresto finish quick-silver-moon |
foresto list |
List working copies | Run from the base directory |
Create a working copy
foresto start <base_path> <name>
base_path— path to the source project (absolute or relative)name— identifier in kebab-case (e.g.quick-silver-moon)
Example:
foresto start ./my-app quick-silver-moon
# -> .worktrees/quick-silver-moon
After running:
- git-tracked files are checked out with
git worktree add - non-git files listed in
[start].shareof.foresto.tomlare copied - a git branch named
nameis created in the working copy - the relative path is printed to stdout (so callers can capture it)
Remove a working copy
foresto finish <name>
Run from the base project directory.
Example:
cd my-app
foresto finish quick-silver-moon
After running:
- Stops with a warning if unpushed commits exist. When the remote branch was deleted after a squash merge,
gh pr viewis consulted and the command proceeds only if the PR is MERGED and the head SHA at merge time matches the local HEAD. - The working directory is removed with
git worktree remove git pullruns on the current branch- The local branch is deleted
- The
finishcommands in.foresto.tomlrun in the base directory
Use --no-pull to skip git pull:
foresto finish --no-pull quick-silver-moon
List working copies
foresto list
Run from the base project directory.
Configuration
Place .foresto.toml in the project root. The lookup location depends on the command.
| Command | Lookup location | Description |
|---|---|---|
foresto start |
{base_path}/.foresto.toml |
Directly under the project path you passed |
foresto finish |
{cwd}/.foresto.toml |
Directly under the current directory |
[start]
commands = ["npm install"]
share = [".env", "node_modules"]
[finish]
commands = ["npm install"]
[start].commands— run inside the working copy after the worktree is created[start].share— patterns of non-git files to copy into the working copy- Basename pattern (no
/): matches by name at any depth (e.g..env,node_modules) - Path pattern (contains
/): matches a path relative to the project root (e.g.secrets/local.env) - Symbolic links are preserved as links (keeps structures like pnpm's
node_modules). On Windows, falls back to a real copy with a warning when symlink creation is not permitted
- Basename pattern (no
[finish].commands— run in the base directory after removal
If the file does not exist, nothing is run.
Typical workflow
1. foresto start ./my-app add-auth-feature
2. cd .worktrees/add-auth-feature
(the add-auth-feature branch is already created)
3. (work, commit, push, open a PR, merge)
4. cd ../..
5. foresto finish add-auth-feature
-> git pull runs and the merged changes land in the base
-> the local branch is deleted
Exit codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | base_path does not exist, or no subcommand was given |
| 2 | name is not kebab-case |
| 3 | The worktree already exists |
| 4 | git worktree add failed |
| 5 | A start command failed |
| 6 | .worktrees/ not found (finish was run outside the base directory) |
| 7 | The worktree was not found |
| 8 | A finish command failed |
| 10 | git pull failed |
| 11 | git worktree remove failed |
| 12 | Unpushed commits were detected (during finish) |
| 13 | Invalid share pattern in .foresto.toml |
License
MIT
Metadata
Release files for foresto 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| foresto-1.0.0.tar.gz | 15.0 kB | Without provenance | Details for foresto-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| foresto-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for foresto-1.0.0-py3-none-any.whl |
Total release size: 32.0 kB
Release files / foresto-1.0.0.tar.gz
| Download URL | foresto-1.0.0.tar.gz |
|---|---|
| Size | 15.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dea69e139fbb82612b6dc6f104a00158c9bd19f5ff3a8df8dd80ba8dfe2e6236
|
|
BLAKE2b-256 checksum How to use checksums |
3f9acf7aab7fbfd05b57eb9b630317ce48cfbeb73b48392fdca4b9c61a86c009
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / foresto-1.0.0-py3-none-any.whl
| Download URL | foresto-1.0.0-py3-none-any.whl |
|---|---|
| Size | 16.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fb39a03a5e8afd99830bb8ef1aa02c4d24c799163528122fbc85b84a619a8658
|
|
BLAKE2b-256 checksum How to use checksums |
0363b7a803b83d081fa8f7f6a0ad15353eebc46e91b604c9c2d1f18a88df0c08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for foresto 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.