feat(skiff): align CLI with Vercel skills and fix entry symlink
Replace install/uninstall with add/remove, add publish for git ops in ~/.skills, and resolve bin/skiff symlinks so commands work from any cwd. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
|
||||
# 跟随软链,确保从 ~/.local/bin/skiff 调用时仍能找到仓库根目录
|
||||
SCRIPT="${BASH_SOURCE[0]}"
|
||||
while [ -L "$SCRIPT" ]; do
|
||||
link_dir="$(cd "$(dirname "$SCRIPT")" && pwd)"
|
||||
SCRIPT="$(readlink "$SCRIPT")"
|
||||
[[ "$SCRIPT" != /* ]] && SCRIPT="$link_dir/$SCRIPT"
|
||||
done
|
||||
REPO_ROOT="$(cd "$(dirname "$SCRIPT")/.." && pwd)"
|
||||
|
||||
export PYTHONPATH="${REPO_ROOT}${PYTHONPATH:+:$PYTHONPATH}"
|
||||
exec python3 -m skiff "$@"
|
||||
|
||||
Reference in New Issue
Block a user