Compare commits

...
5 Commits
Author SHA1 Message Date
lukaszraczylo ac1b81b70e fixup! fixup! build(goreleaser): enable CGO and remove Docker builds 2026-01-18 19:38:29 +00:00
lukaszraczylo f216380d37 fixup! build(goreleaser): enable CGO and remove Docker builds 2026-01-18 19:10:41 +00:00
lukaszraczylo 3be03aef7b build(goreleaser): enable CGO and remove Docker builds
- [x] Enable CGO_ENABLED=1 for builds
- [x] Add platform ignore rules for unsupported architectures
- [x] Remove Docker build configuration (dockers_v2)
- [x] Remove Docker signing configuration
- [x] Add platform compatibility check in install script
2026-01-18 19:08:10 +00:00
lukaszraczylo 5800c689e9 build(install): add automated installation script and update README
- [x] Create install.sh script for automated platform detection and installation
- [x] Add checksum verification support in installation script
- [x] Update README with quick install command using curl
- [x] Reorganize installation instructions into quick install and manual sections
- [x] Update binary download URLs to match goreleaser naming convention
- [x] Change installation directory preference from /usr/local/bin to ~/.local/bin
- [x] Remove sudo requirement for installation when possible
2026-01-18 19:05:12 +00:00
lukaszraczylo 81f146e78d build(goreleaser): migrate docker labels from build_flags to labels config
- [x] Replace build_flags array with labels map in docker_v2 configuration
- [x] Convert individual --label arguments to key-value pairs
- [x] Maintain all OCI standard image metadata labels
- [x] Keep --pull flag in build_flags for image pulling
2026-01-18 19:00:36 +00:00
5 changed files with 274 additions and 41 deletions
+1 -2
View File
@@ -16,9 +16,8 @@ permissions:
jobs: jobs:
release: release:
uses: lukaszraczylo/shared-actions/.github/workflows/go-release.yaml@main uses: lukaszraczylo/shared-actions/.github/workflows/go-release-cgo.yaml@main
with: with:
go-version: "1.24" go-version: "1.24"
docker-enabled: false
rolling-release-tag: "v1" rolling-release-tag: "v1"
secrets: inherit secrets: inherit
+9 -27
View File
@@ -15,7 +15,7 @@ builds:
main: ./cmd/mcp-filepuff main: ./cmd/mcp-filepuff
binary: mcp-filepuff binary: mcp-filepuff
env: env:
- CGO_ENABLED=0 - CGO_ENABLED=1
flags: flags:
- -trimpath - -trimpath
ldflags: ldflags:
@@ -30,6 +30,13 @@ builds:
goarch: goarch:
- amd64 - amd64
- arm64 - arm64
ignore:
- goos: darwin
goarch: amd64
- goos: linux
goarch: arm64
- goos: windows
goarch: arm64
archives: archives:
- id: default - id: default
@@ -82,24 +89,6 @@ release:
curl -sSL https://raw.githubusercontent.com/lukaszraczylo/filepuff-mcp/main/scripts/install.sh | bash curl -sSL https://raw.githubusercontent.com/lukaszraczylo/filepuff-mcp/main/scripts/install.sh | bash
``` ```
dockers_v2:
- images:
- "ghcr.io/lukaszraczylo/filepuff-mcp"
tags:
- "{{ .Version }}"
- "latest"
- "v1"
platforms:
- linux/amd64
- linux/arm64
dockerfile: Dockerfile.goreleaser
build_flags:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source=https://github.com/lukaszraczylo/filepuff-mcp"
signs: signs:
- cmd: cosign - cmd: cosign
@@ -112,11 +101,4 @@ signs:
artifacts: checksum artifacts: checksum
output: true output: true
docker_signs:
- cmd: cosign
artifacts: manifests
output: true
args:
- sign
- "${artifact}@${digest}"
- "--yes"
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 Lukasz Raczylo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+28 -12
View File
@@ -14,33 +14,49 @@ A Go-based MCP (Model Context Protocol) server for Claude Code providing intelli
## Installation ## Installation
### Binary Releases (Recommended) ### Quick Install (Recommended)
Install the latest version with a single command:
```bash
curl -sSL https://raw.githubusercontent.com/lukaszraczylo/filepuff-mcp/main/scripts/install.sh | bash
```
This script will:
- Automatically detect your platform (OS and architecture)
- Download the latest release
- Verify checksums
- Install to `~/.local/bin` (or `/usr/local/bin` if needed)
- Make the binary executable
### Manual Installation
Download pre-built binaries from the [releases page](https://github.com/lukaszraczylo/filepuff-mcp/releases): Download pre-built binaries from the [releases page](https://github.com/lukaszraczylo/filepuff-mcp/releases):
```bash ```bash
# macOS (ARM64) # macOS (ARM64)
curl -L https://github.com/lukaszraczylo/filepuff-mcp/releases/latest/download/mcp-filepuff-darwin-arm64.tar.gz | tar xz curl -L https://github.com/lukaszraczylo/filepuff-mcp/releases/latest/download/mcp-filepuff_<version>_darwin_arm64.tar.gz | tar xz
sudo mv mcp-filepuff /usr/local/bin/ mv mcp-filepuff ~/.local/bin/
# macOS (AMD64) # macOS (AMD64)
curl -L https://github.com/lukaszraczylo/filepuff-mcp/releases/latest/download/mcp-filepuff-darwin-amd64.tar.gz | tar xz curl -L https://github.com/lukaszraczylo/filepuff-mcp/releases/latest/download/mcp-filepuff_<version>_darwin_amd64.tar.gz | tar xz
sudo mv mcp-filepuff /usr/local/bin/ mv mcp-filepuff ~/.local/bin/
# Linux (ARM64) # Linux (ARM64)
curl -L https://github.com/lukaszraczylo/filepuff-mcp/releases/latest/download/mcp-filepuff-linux-arm64.tar.gz | tar xz curl -L https://github.com/lukaszraczylo/filepuff-mcp/releases/latest/download/mcp-filepuff_<version>_linux_arm64.tar.gz | tar xz
sudo mv mcp-filepuff /usr/local/bin/ mv mcp-filepuff ~/.local/bin/
# Linux (AMD64) # Linux (AMD64)
curl -L https://github.com/lukaszraczylo/filepuff-mcp/releases/latest/download/mcp-filepuff-linux-amd64.tar.gz | tar xz curl -L https://github.com/lukaszraczylo/filepuff-mcp/releases/latest/download/mcp-filepuff_<version>_linux_amd64.tar.gz | tar xz
sudo mv mcp-filepuff /usr/local/bin/ mv mcp-filepuff ~/.local/bin/
# Windows (PowerShell) # Windows (PowerShell)
Invoke-WebRequest -Uri "https://github.com/lukaszraczylo/filepuff-mcp/releases/latest/download/mcp-filepuff-windows-amd64.zip" -OutFile mcp-filepuff.zip Invoke-WebRequest -Uri "https://github.com/lukaszraczylo/filepuff-mcp/releases/latest/download/mcp-filepuff_<version>_windows_amd64.zip" -OutFile mcp-filepuff.zip
Expand-Archive mcp-filepuff.zip -DestinationPath . Expand-Archive mcp-filepuff.zip -DestinationPath $env:USERPROFILE\.local\bin
Move-Item mcp-filepuff.exe C:\Windows\System32\
``` ```
Replace `<version>` with the actual version (e.g., `v1.0.0`).
### Prerequisites ### Prerequisites
- [ripgrep](https://github.com/BurntSushi/ripgrep) (`rg`) installed and in PATH - [ripgrep](https://github.com/BurntSushi/ripgrep) (`rg`) installed and in PATH
+215
View File
@@ -0,0 +1,215 @@
#!/bin/bash
# MCP Filepuff Installation Script
# Downloads and installs the latest version of mcp-filepuff
set -e
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
# GitHub repository information
REPO="lukaszraczylo/filepuff-mcp"
BINARY_NAME="mcp-filepuff"
# Installation directory (will try ~/.local/bin first, then /usr/local/bin)
INSTALL_DIR="${INSTALL_DIR:-$HOME/.local/bin}"
# Functions
print_info() {
echo -e "${GREEN}[INFO]${NC} $1"
}
print_warn() {
echo -e "${YELLOW}[WARN]${NC} $1"
}
print_error() {
echo -e "${RED}[ERROR]${NC} $1" >&2
}
detect_platform() {
local os
local arch
# Detect OS
case "$(uname -s)" in
Linux*) os="linux" ;;
Darwin*) os="darwin" ;;
MINGW*|MSYS*|CYGWIN*)
print_error "Windows is not directly supported. Please use WSL2."
exit 1
;;
*)
print_error "Unsupported operating system: $(uname -s)"
exit 1
;;
esac
# Detect architecture
case "$(uname -m)" in
x86_64|amd64) arch="amd64" ;;
arm64|aarch64) arch="arm64" ;;
*)
print_error "Unsupported architecture: $(uname -m)"
exit 1
;;
esac
# Warn about unsupported combinations
if [ "$os" = "linux" ] && [ "$arch" = "arm64" ]; then
print_error "Linux ARM64 builds are not currently available due to CGO cross-compilation complexity"
print_error "Please build from source: https://github.com/lukaszraczylo/filepuff-mcp#build-from-source"
exit 1
fi
echo "${os}_${arch}"
}
check_dependencies() {
local missing_deps=()
# Check for required commands
for cmd in curl tar; do
if ! command -v "$cmd" &> /dev/null; then
missing_deps+=("$cmd")
fi
done
if [ ${#missing_deps[@]} -ne 0 ]; then
print_error "Missing required dependencies: ${missing_deps[*]}"
print_error "Please install them and try again."
exit 1
fi
}
get_latest_version() {
local version
version=$(curl -sSf "https://api.github.com/repos/${REPO}/releases/latest" | grep '"tag_name"' | cut -d'"' -f4)
if [ -z "$version" ]; then
print_error "Failed to fetch latest version from GitHub"
exit 1
fi
echo "$version"
}
download_and_install() {
local version="$1"
local platform="$2"
local tmpdir
tmpdir=$(mktemp -d)
trap 'rm -rf "$tmpdir"' EXIT
print_info "Downloading mcp-filepuff ${version} for ${platform}..."
# Construct download URLs
local archive_name="mcp-filepuff_${version#v}_${platform}.tar.gz"
local archive_url="https://github.com/${REPO}/releases/download/${version}/${archive_name}"
local checksum_url="https://github.com/${REPO}/releases/download/${version}/checksums.txt"
# Download archive
if ! curl -sSfL "$archive_url" -o "$tmpdir/$archive_name"; then
print_error "Failed to download $archive_url"
exit 1
fi
# Download checksums
if ! curl -sSfL "$checksum_url" -o "$tmpdir/checksums.txt"; then
print_warn "Failed to download checksums, skipping verification"
else
print_info "Verifying checksum..."
cd "$tmpdir"
if grep "$archive_name" checksums.txt | sha256sum -c --status; then
print_info "Checksum verification passed"
else
print_error "Checksum verification failed"
exit 1
fi
cd - > /dev/null
fi
# Extract archive
print_info "Extracting archive..."
tar -xzf "$tmpdir/$archive_name" -C "$tmpdir"
# Ensure install directory exists
if [ ! -d "$INSTALL_DIR" ]; then
print_info "Creating installation directory: $INSTALL_DIR"
mkdir -p "$INSTALL_DIR"
fi
# Install binary
print_info "Installing to $INSTALL_DIR/$BINARY_NAME..."
if [ -w "$INSTALL_DIR" ]; then
cp "$tmpdir/$BINARY_NAME" "$INSTALL_DIR/$BINARY_NAME"
chmod +x "$INSTALL_DIR/$BINARY_NAME"
else
print_warn "No write permission to $INSTALL_DIR, trying with sudo..."
sudo cp "$tmpdir/$BINARY_NAME" "$INSTALL_DIR/$BINARY_NAME"
sudo chmod +x "$INSTALL_DIR/$BINARY_NAME"
fi
print_info "Installation complete!"
}
check_path() {
if ! echo "$PATH" | grep -q "$INSTALL_DIR"; then
print_warn "$INSTALL_DIR is not in your PATH"
print_warn "Add it to your PATH by adding this line to your shell profile:"
echo ""
echo " export PATH=\"\$PATH:$INSTALL_DIR\""
echo ""
fi
}
verify_installation() {
if command -v "$BINARY_NAME" &> /dev/null; then
local installed_version
installed_version=$("$BINARY_NAME" -version 2>&1 || echo "unknown")
print_info "Successfully installed: $installed_version"
else
print_warn "Binary installed but not found in PATH"
print_info "You can run it directly: $INSTALL_DIR/$BINARY_NAME"
fi
}
main() {
print_info "MCP Filepuff Installation Script"
echo ""
# Check dependencies
check_dependencies
# Detect platform
local platform
platform=$(detect_platform)
print_info "Detected platform: $platform"
# Get latest version
local version
version=$(get_latest_version)
print_info "Latest version: $version"
echo ""
# Download and install
download_and_install "$version" "$platform"
echo ""
# Check PATH
check_path
# Verify installation
verify_installation
echo ""
print_info "To get started, run: $BINARY_NAME --help"
}
# Run main function
main "$@"