From abaeedc4195c87b108d1846f2431f69e1abc8755 Mon Sep 17 00:00:00 2001 From: Oded Falik Date: Tue, 13 Jan 2026 12:17:27 -0800 Subject: [PATCH] fix: add postinstall script to chmod binary npm doesn't preserve file permissions, so we need a postinstall script to make the binary executable after installation. Co-Authored-By: Claude Opus 4.5 --- .github/workflows/release-please.yml | 22 +++++++++++++++++----- Cargo.lock | 2 +- README.md | 3 +++ 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 57c77b0..f5c1bad 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -127,20 +127,32 @@ jobs: cp target/${{ matrix.target }}/release/lambda-mcp npm-pkg/bin/ chmod +x npm-pkg/bin/lambda-mcp fi - cat > npm-pkg/package.json << EOF + if [ "${{ matrix.os }}" = "windows-latest" ]; then + cat > npm-pkg/package.json << EOF { "name": "@strand-ai/lambda-mcp-${{ matrix.npm_os }}-${{ matrix.npm_arch }}", "version": "${{ needs.release.outputs.version }}", "description": "Platform-specific binary for lambda-mcp (${{ matrix.npm_os }}-${{ matrix.npm_arch }})", "os": ["${{ matrix.npm_os }}"], "cpu": ["${{ matrix.npm_arch }}"], - "repository": { - "type": "git", - "url": "https://github.com/Strand-AI/lambda-cli" - }, + "repository": { "type": "git", "url": "https://github.com/Strand-AI/lambda-cli" }, "license": "MIT" } EOF + else + cat > npm-pkg/package.json << EOF + { + "name": "@strand-ai/lambda-mcp-${{ matrix.npm_os }}-${{ matrix.npm_arch }}", + "version": "${{ needs.release.outputs.version }}", + "description": "Platform-specific binary for lambda-mcp (${{ matrix.npm_os }}-${{ matrix.npm_arch }})", + "os": ["${{ matrix.npm_os }}"], + "cpu": ["${{ matrix.npm_arch }}"], + "repository": { "type": "git", "url": "https://github.com/Strand-AI/lambda-cli" }, + "license": "MIT", + "scripts": { "postinstall": "chmod +x bin/lambda-mcp 2>/dev/null || true" } + } + EOF + fi shell: bash - name: Upload npm package artifact diff --git a/Cargo.lock b/Cargo.lock index 415a8fd..159a814 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -787,7 +787,7 @@ dependencies = [ [[package]] name = "lambda_cli" -version = "0.2.2" +version = "0.3.0" dependencies = [ "anyhow", "chrono", diff --git a/README.md b/README.md index 221f570..896cc45 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,9 @@ [![CI](https://github.com/Strand-AI/lambda-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/Strand-AI/lambda-cli/actions/workflows/ci.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) +[![npm](https://img.shields.io/npm/v/@strand-ai/lambda-mcp)](https://www.npmjs.com/package/@strand-ai/lambda-mcp) +[![MCP](https://img.shields.io/badge/MCP-compatible-8A2BE2)](https://modelcontextprotocol.io) +[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect/mcp/install?name=lambda-labs&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40strand-ai%2Flambda-mcp%22%5D%7D) A fast CLI and MCP server for managing [Lambda Labs](https://lambdalabs.com/) cloud GPU instances.