@forloop-cc/forloop-cli 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ERRORS.md +260 -0
- package/README.md +636 -0
- package/dist/forloop.mjs +2440 -0
- package/install.sh +90 -0
- package/package.json +52 -0
package/install.sh
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
# ForLoop CLI Installer
|
|
5
|
+
# https://github.com/forloop-cc/forloop-cli
|
|
6
|
+
#
|
|
7
|
+
# Usage:
|
|
8
|
+
# curl -fsSL https://raw.githubusercontent.com/forloop-cc/forloop-cli/main/install.sh | bash
|
|
9
|
+
# npm install -g @forloop-cc/forloop-cli
|
|
10
|
+
|
|
11
|
+
# ── Colors ────────────────────────────────────────────────────────────────────
|
|
12
|
+
if [ -t 1 ]; then
|
|
13
|
+
RED='\033[0;31m'; GREEN='\033[0;32m'; YELLOW='\033[1;33m'
|
|
14
|
+
BLUE='\033[0;34m'; CYAN='\033[0;36m'; BOLD='\033[1m'; NC='\033[0m'
|
|
15
|
+
else
|
|
16
|
+
RED=''; GREEN=''; YELLOW=''; BLUE=''; CYAN=''; BOLD=''; NC=''
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
print_header() {
|
|
20
|
+
echo -e "${BLUE}${BOLD}"
|
|
21
|
+
echo " ███████╗ █████╗ ██████╗ ██╗ █████╗ █████╗ ██████╗ "
|
|
22
|
+
echo " ██╔════╝██╔══██╗██╔══██╗██║ ██╔══██╗██╔══██╗██╔══██╗"
|
|
23
|
+
echo " █████╗ ██║ ██║██████╔╝██║ ██║ ██║██║ ██║██████╔╝"
|
|
24
|
+
echo " ██╔══╝ ██║ ██║██╔══██╗██║ ██║ ██║██║ ██║██╔═══╝ "
|
|
25
|
+
echo " ██║ ╚████╔╝██║ ██║███████╗╚████╔╝╚████╔╝██║ "
|
|
26
|
+
echo " ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚══════╝ ╚═══╝ ╚═══╝ ╚═╝ "
|
|
27
|
+
echo -e "${NC}"
|
|
28
|
+
echo -e " ${BOLD}CLI Installer${NC}\n"
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
print_success() { echo -e " ${GREEN}✓${NC} $1"; }
|
|
32
|
+
print_info() { echo -e " ${BLUE}ℹ${NC} $1"; }
|
|
33
|
+
print_error() { echo -e " ${RED}✗${NC} $1"; }
|
|
34
|
+
|
|
35
|
+
# ── Header ────────────────────────────────────────────────────────────────────
|
|
36
|
+
print_header
|
|
37
|
+
|
|
38
|
+
# ── Check prerequisites ───────────────────────────────────────────────────────
|
|
39
|
+
echo "Checking prerequisites..."
|
|
40
|
+
|
|
41
|
+
if ! command -v node &> /dev/null; then
|
|
42
|
+
print_error "Node.js is required (v18 or later). Install from https://nodejs.org"
|
|
43
|
+
exit 1
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
NODE_VERSION=$(node -v | sed 's/v//' | cut -d. -f1)
|
|
47
|
+
if [ "$NODE_VERSION" -lt 18 ]; then
|
|
48
|
+
print_error "Node.js v18 or later is required. Current: $(node -v)"
|
|
49
|
+
exit 1
|
|
50
|
+
fi
|
|
51
|
+
print_success "Node.js $(node -v)"
|
|
52
|
+
|
|
53
|
+
if ! command -v npm &> /dev/null; then
|
|
54
|
+
print_error "npm is required."
|
|
55
|
+
exit 1
|
|
56
|
+
fi
|
|
57
|
+
print_success "npm $(npm -v)"
|
|
58
|
+
|
|
59
|
+
echo ""
|
|
60
|
+
|
|
61
|
+
# ── Install ───────────────────────────────────────────────────────────────────
|
|
62
|
+
echo "Installing @forloop-cc/forloop-cli..."
|
|
63
|
+
|
|
64
|
+
if npm install -g @forloop-cc/forloop-cli 2>/dev/null; then
|
|
65
|
+
print_success "Installed successfully"
|
|
66
|
+
else
|
|
67
|
+
print_error "Installation failed. Try: npm install -g @forloop-cc/forloop-cli"
|
|
68
|
+
print_info "Or clone manually: git clone https://github.com/forloop-cc/forloop-cli.git"
|
|
69
|
+
exit 1
|
|
70
|
+
fi
|
|
71
|
+
|
|
72
|
+
echo ""
|
|
73
|
+
|
|
74
|
+
# ── Verify ────────────────────────────────────────────────────────────────────
|
|
75
|
+
echo "Verifying installation..."
|
|
76
|
+
FORLOOP_VERSION=$(forloop --version 2>&1)
|
|
77
|
+
print_success "@forloop-cc/forloop-cli ${FORLOOP_VERSION#forloop } installed"
|
|
78
|
+
|
|
79
|
+
echo ""
|
|
80
|
+
echo -e "${BOLD}Next steps:${NC}"
|
|
81
|
+
echo " 1. Get an API token: https://forloop.cc/profile?tab=api-tokens"
|
|
82
|
+
echo " 2. Authenticate: forloop auth login --api-key floop_xxxxx"
|
|
83
|
+
echo " 3. Start using: forloop sprint list"
|
|
84
|
+
echo ""
|
|
85
|
+
echo -e "${BOLD}Quick reference:${NC}"
|
|
86
|
+
echo " forloop --help Show all commands"
|
|
87
|
+
echo " forloop auth login Set your API token"
|
|
88
|
+
echo " forloop sprint list List sprints"
|
|
89
|
+
echo " forloop agent developer-status Check AI agent status"
|
|
90
|
+
echo ""
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@forloop-cc/forloop-cli",
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "Command-line interface for the ForLoop AI development platform",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"forloop",
|
|
9
|
+
"cli",
|
|
10
|
+
"ai",
|
|
11
|
+
"sprint",
|
|
12
|
+
"agile"
|
|
13
|
+
],
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/forloop-cc/forloop-cli"
|
|
17
|
+
},
|
|
18
|
+
"bin": {
|
|
19
|
+
"forloop": "./dist/forloop.mjs"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist/",
|
|
23
|
+
"install.sh",
|
|
24
|
+
"README.md",
|
|
25
|
+
"ERRORS.md",
|
|
26
|
+
"LICENSE"
|
|
27
|
+
],
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"typecheck": "tsc --noEmit",
|
|
33
|
+
"build": "node build.mjs",
|
|
34
|
+
"dev": "npx tsx src/main.ts",
|
|
35
|
+
"test": "vitest run",
|
|
36
|
+
"prepublishOnly": "npm run build"
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@forloop/opencode-plugin": "^2.2.0",
|
|
40
|
+
"@opencode-ai/plugin": "^1.3.0"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@types/node": "^20.19.37",
|
|
44
|
+
"esbuild": "^0.25.12",
|
|
45
|
+
"tsx": "^4.7.0",
|
|
46
|
+
"typescript": "^5.0.0",
|
|
47
|
+
"vitest": "^4.1.2"
|
|
48
|
+
},
|
|
49
|
+
"engines": {
|
|
50
|
+
"node": ">=18.0.0"
|
|
51
|
+
}
|
|
52
|
+
}
|