mirror of
https://github.com/harivansh-afk/veet-code.git
synced 2026-04-15 07:04:49 +00:00
update veet
This commit is contained in:
parent
c548626d7f
commit
574d9038e5
3 changed files with 40 additions and 0 deletions
|
|
@ -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
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -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:"
|
||||||
|
|
|
||||||
|
|
@ -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()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue