@lizard-build/cli 0.3.91 → 0.3.92

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/README.md CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  Deploy apps, databases and sandboxes to Lizard (lizard.build) from the command line.
4
4
 
5
- Point the CLI at your code and it detects the stack — Node, Python, Go, Rust,
6
- Ruby, PHP or Java — builds it and ships it live. Managed Postgres, Managed Redis
7
- and Managed Object Storage attach in one command. Billing only for active
8
- resources, so idle apps cost a fraction.
5
+ Point the CLI at your code and it detects the stack — Go, Node, Python, Rust,
6
+ Ruby, PHP, Java or a static site — builds it and ships it live. Managed
7
+ Postgres, Managed Redis and Managed Object Storage attach in one command.
8
+ Billing only for active resources, so idle apps cost a fraction.
9
9
 
10
10
  Every command is agent-readable: add `--json` for structured output, or run
11
11
  `lizard --help --json` to dump the full command schema.
@@ -54,18 +54,29 @@ lizard add postgres redis s3
54
54
  lizard up # upload and deploy code
55
55
  lizard add # add Managed Postgres, Managed Redis or Managed Object Storage
56
56
  lizard ps # list services
57
+ lizard status # show the linked workspace, project and service
57
58
  lizard logs # stream runtime logs
58
- lizard metrics # resource metrics (CPU, memory, network, disk) and cost
59
- lizard scale # scale replicas / CPU / memory
59
+ lizard metrics # resource metrics (CPU, memory, network, disk); --cost for spend
60
+ lizard scale # scale replicas / CPU / memory / storage
60
61
  lizard secrets # manage secrets
61
62
  lizard domain # manage domains
62
- lizard run # run a command with project and service secrets injected
63
- lizard ssh # open a shell in a service
63
+ lizard redeploy # rebuild and redeploy from the current source
64
+ lizard run # run a command locally with project and service secrets injected
65
+ lizard ssh # run one command inside a service container
64
66
  lizard sandbox # create and manage Sandboxes
65
67
  lizard volume # Persistent Volumes for Sandboxes
66
68
  lizard skills # agent guides, version-matched to the CLI
67
69
  ```
68
70
 
71
+ `run` and `ssh` are a pair: `run` executes on your machine with the service's
72
+ env injected, `ssh` executes inside the running container. Both take the command
73
+ after `--`:
74
+
75
+ ```bash
76
+ lizard run -- npm run migrate
77
+ lizard ssh -s my-app -- printenv
78
+ ```
79
+
69
80
  Run `lizard --help` for the full list.
70
81
 
71
82
  ## For agents and scripts
@@ -1,4 +1,4 @@
1
- export declare const CURRENT_VERSION = "0.3.91";
1
+ export declare const CURRENT_VERSION = "0.3.92";
2
2
  /**
3
3
  * True only when running as the Bun-compiled standalone binary. Under
4
4
  * npm/node, `process.execPath` is the *node* executable — self-update would
@@ -4,7 +4,7 @@ import { Readable } from "node:stream";
4
4
  import { join, dirname } from "node:path";
5
5
  import os from "node:os";
6
6
  import { spawn } from "node:child_process";
7
- export const CURRENT_VERSION = "0.3.91";
7
+ export const CURRENT_VERSION = "0.3.92";
8
8
  const RELEASES_API = "https://api.github.com/repos/lizard-build/lizard-cli/releases/latest";
9
9
  const RELEASE_BASE = "https://github.com/lizard-build/lizard-cli/releases/latest/download";
10
10
  /** Minimum gap between background update checks. */
package/install.sh CHANGED
@@ -8,52 +8,73 @@ RED="\033[31m"
8
8
  DIM="\033[2m"
9
9
  RESET="\033[0m"
10
10
 
11
+ RELEASE_BASE="https://github.com/lizard-build/lizard-cli/releases/latest/download"
12
+ INSTALL_DIR="$HOME/.lizard/bin"
13
+
11
14
  echo ""
12
15
  echo -e "${BOLD}Lizard CLI${RESET} installer"
13
16
  echo ""
14
17
 
15
- # ── Check Node.js ────────────────────────────────────────────────────────────
18
+ # Detect OS and arch
19
+ OS="$(uname -s)"
20
+ ARCH="$(uname -m)"
16
21
 
17
- if ! command -v node >/dev/null 2>&1; then
18
- echo -e "${RED}Error:${RESET} Node.js is required but not found."
19
- echo ""
20
- echo "Install Node.js 18+ from https://nodejs.org"
21
- echo "Or use a version manager:"
22
- echo " curl -fsSL https://fnm.vercel.app/install | bash"
23
- exit 1
24
- fi
22
+ case "$OS" in
23
+ Darwin)
24
+ case "$ARCH" in
25
+ arm64) BINARY="lizard-darwin-arm64" ;;
26
+ x86_64) BINARY="lizard-darwin-x64" ;;
27
+ *) echo -e "${RED}Error:${RESET} Unsupported architecture: $ARCH"; exit 1 ;;
28
+ esac
29
+ ;;
30
+ Linux)
31
+ case "$ARCH" in
32
+ x86_64) BINARY="lizard-linux-x64" ;;
33
+ aarch64) BINARY="lizard-linux-arm64" ;;
34
+ arm64) BINARY="lizard-linux-arm64" ;;
35
+ *) echo -e "${RED}Error:${RESET} Unsupported architecture: $ARCH"; exit 1 ;;
36
+ esac
37
+ ;;
38
+ *)
39
+ echo -e "${RED}Error:${RESET} Unsupported OS: $OS"
40
+ echo -e " On Windows, install from npm: ${CYAN}npm i -g @lizard-build/cli${RESET}"
41
+ exit 1
42
+ ;;
43
+ esac
25
44
 
26
- NODE_MAJOR=$(node -e "process.stdout.write(String(parseInt(process.version.slice(1))))")
27
- if [ "$NODE_MAJOR" -lt 18 ]; then
28
- echo -e "${RED}Error:${RESET} Node.js 18+ is required (you have $(node -v))"
29
- echo "Upgrade at https://nodejs.org"
30
- exit 1
31
- fi
45
+ mkdir -p "$INSTALL_DIR"
46
+ TMP="$(mktemp)"
32
47
 
33
- # ── Install via npm ──────────────────────────────────────────────────────────
48
+ echo -e "${DIM}Downloading $BINARY...${RESET}"
34
49
 
35
- if ! command -v npm >/dev/null 2>&1; then
36
- echo -e "${RED}Error:${RESET} npm not found. Please install npm."
50
+ # `set -e` aborts on a failed curl before any `$?` check could run, so handle
51
+ # the failure inline to keep the message useful.
52
+ if ! curl -fL --progress-bar "$RELEASE_BASE/$BINARY" -o "$TMP"; then
53
+ rm -f "$TMP"
54
+ echo -e "${RED}Error:${RESET} Download failed: $RELEASE_BASE/$BINARY"
37
55
  exit 1
38
56
  fi
39
57
 
40
- echo -e "${DIM}Installing @lizard-build/cli...${RESET}"
41
- npm install -g @lizard-build/cli --quiet
42
-
43
- # ── Verify ───────────────────────────────────────────────────────────────────
58
+ chmod +x "$TMP"
59
+ mv "$TMP" "$INSTALL_DIR/lizard"
44
60
 
45
- if ! command -v lizard >/dev/null 2>&1; then
46
- echo ""
47
- echo -e "${RED}Error:${RESET} Installation succeeded but 'lizard' is not in PATH."
48
- echo "You may need to add npm global bin to your PATH:"
49
- echo " export PATH=\"\$(npm prefix -g)/bin:\$PATH\""
50
- exit 1
61
+ # Add to PATH in shell config if not already there
62
+ SHELL_RC=""
63
+ case "$SHELL" in
64
+ */zsh) SHELL_RC="$HOME/.zshrc" ;;
65
+ */bash) SHELL_RC="$HOME/.bashrc" ;;
66
+ esac
67
+ if [ -n "$SHELL_RC" ] && ! grep -q "\.lizard/bin" "$SHELL_RC" 2>/dev/null; then
68
+ echo 'export PATH="$HOME/.lizard/bin:$PATH"' >> "$SHELL_RC"
51
69
  fi
70
+ export PATH="$INSTALL_DIR:$PATH"
52
71
 
53
- VERSION=$(lizard version --json 2>/dev/null | node -e "process.stdin.resume();let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>{try{process.stdout.write(JSON.parse(d).version)}catch{process.stdout.write('?')}})" 2>/dev/null || echo "?")
72
+ # `lizard version` is not a command the flag is the only way to read it.
73
+ VERSION="$("$INSTALL_DIR/lizard" --version 2>/dev/null | head -1 || echo "?")"
54
74
 
55
75
  echo ""
56
76
  echo -e "${GREEN}✓${RESET} Lizard CLI ${BOLD}v${VERSION}${RESET} installed"
57
77
  echo ""
58
78
  echo -e " Run ${CYAN}lizard login${RESET} to get started"
79
+ echo -e " ${DIM}(if 'lizard' is not found, run: export PATH="\$HOME/.lizard/bin:\$PATH")${RESET}"
59
80
  echo ""
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lizard-build/cli",
3
- "version": "0.3.91",
4
- "description": "Lizard CLI — deploy apps, databases and sandboxes to Lizard (lizard.build) from your terminal or your coding agent. Detects Node, Python, Go, Rust, Ruby, PHP and Java; adds Managed Postgres, Managed Redis and Managed Object Storage in one command.",
3
+ "version": "0.3.92",
4
+ "description": "Lizard CLI — deploy apps, databases and sandboxes to Lizard (lizard.build) from your terminal or your coding agent. Detects Go, Node, Python, Rust, Ruby, PHP, Java and static sites; adds Managed Postgres, Managed Redis and Managed Object Storage in one command.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "lizard": "./dist/index.js"
@@ -36,10 +36,14 @@
36
36
  "devops",
37
37
  "lizard"
38
38
  ],
39
+ "homepage": "https://lizard.build/docs",
39
40
  "repository": {
40
41
  "type": "git",
41
42
  "url": "git+https://github.com/lizard-build/lizard-cli.git"
42
43
  },
44
+ "bugs": {
45
+ "url": "https://github.com/lizard-build/lizard-cli/issues"
46
+ },
43
47
  "author": "Lizard Build",
44
48
  "license": "MIT",
45
49
  "dependencies": {
@@ -5,7 +5,7 @@ import { join, dirname } from "node:path";
5
5
  import os from "node:os";
6
6
  import { spawn } from "node:child_process";
7
7
 
8
- export const CURRENT_VERSION = "0.3.91";
8
+ export const CURRENT_VERSION = "0.3.92";
9
9
  const RELEASES_API = "https://api.github.com/repos/lizard-build/lizard-cli/releases/latest";
10
10
  const RELEASE_BASE = "https://github.com/lizard-build/lizard-cli/releases/latest/download";
11
11