update veet

This commit is contained in:
Harivansh Rathi 2025-12-14 17:18:11 -05:00
parent c548626d7f
commit 574d9038e5
3 changed files with 40 additions and 0 deletions

View file

@ -68,6 +68,7 @@ veet # Launch TUI
veet open # Open a problem in $EDITOR (vim) veet open # Open a problem in $EDITOR (vim)
veet open two-sum # Open specific problem veet open two-sum # Open specific problem
veet list # List all problems veet list # List all problems
veet update # Update to latest version
veet install-commands # Install Claude slash commands veet install-commands # Install Claude slash commands
cd $(veet problems-dir) # cd to problems folder cd $(veet problems-dir) # cd to problems folder
``` ```

View file

@ -47,6 +47,7 @@ echo "Commands:"
echo " veet Launch TUI" echo " veet Launch TUI"
echo " veet open Open problem in \$EDITOR" echo " veet open Open problem in \$EDITOR"
echo " veet list List all problems" echo " veet list List all problems"
echo " veet update Update to latest version"
echo " cd \$(veet problems-dir) Navigate to problems" echo " cd \$(veet problems-dir) Navigate to problems"
echo "" echo ""
echo "Claude slash commands:" echo "Claude slash commands:"

View file

@ -163,5 +163,43 @@ def problems_dir() -> None:
typer.echo(repo / "problems") typer.echo(repo / "problems")
@app.command()
def update() -> None:
"""Update veetcode to the latest version."""
import subprocess
repo = find_repo_root()
typer.echo(f"Updating veetcode in {repo}...")
# Git pull
result = subprocess.run(
["git", "pull"],
cwd=repo,
capture_output=True,
text=True
)
if result.returncode != 0:
typer.echo(f"Git pull failed: {result.stderr}")
raise typer.Exit(1)
typer.echo(result.stdout.strip())
# Sync dependencies
typer.echo("Syncing dependencies...")
result = subprocess.run(
["uv", "sync"],
cwd=repo,
capture_output=True,
text=True
)
if result.returncode != 0:
typer.echo(f"uv sync failed: {result.stderr}")
raise typer.Exit(1)
typer.echo("✓ veetcode updated!")
if __name__ == "__main__": if __name__ == "__main__":
app() app()