vers run-commit
Start a Vers development environment from an existing commit, or from a repository tag reference.Usage
Options
| Option | Description |
|---|---|
--ref | Interpret the argument as a repo:tag reference instead of a commit ID. The API resolves the tag within your own org. |
--vm-alias, -N | Set an alias for the root VM |
--wait | Block until the VM is running |
--format | Output format: json |
Examples
Start from commit key
With custom alias
Start from a repo:tag reference
--ref flag changes the API payload from {"commit_id": "..."} to {"ref": "..."}. The server resolves the ref against tags owned by your org.
Without
--ref, an argument that contains a : will be rejected early with a hint to add the flag. Sending my-app:latest as commit_id would otherwise fail with a 422 from the server, because it isn’t a valid UUID.org/repo:tag) are not accepted by from_commit/run-commit. To consume another org’s public repo, use vers repo fork first.
How it works
Therun-commit command:
- Validates commit key: Ensures the commit key is provided
- Creates environment: Makes API call to create environment from the specified commit
- Updates HEAD: Sets your local HEAD to point to the new root VM
- Confirms success: Shows environment and root VM information
What gets created
- New environment: Created from the commit’s state
- Root VM: The primary VM, restored from commit
- Local HEAD: Updated to point to the new root VM
Getting commit keys
From creating commits
From team members
Error handling
Invalid commit key
Missing commit key
No .vers directory
vers init in your project directory first.
Use cases
Reproduce specific state
Team collaboration
Testing and debugging
CI/CD integration
Prerequisites
- Valid commit key from an accessible commit
- Authenticated with Vers platform
- Network connectivity
- Project directory (
.versdirectory recommended)
Notes
- Aliases set with
--vm-aliasare stored locally at~/.vers/aliases.json - Use
vers aliasto view all your aliases
Common Patterns
Boot the latest tagged commit
Boot a commit for debugging, then throw away
Pin infra in CI
See Also
- vers alias - View and look up aliases
- vers run - Start fresh development environment
- vers commit - Create commits for later reproduction