Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
pkg-config \
libssl-dev \
ripgrep \
tmux \
vim \
jq \
sudo \
chromium \
Expand All @@ -28,14 +26,16 @@ RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \
&& apt-get install -y nodejs \
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*

# Install yq manually
RUN curl -L https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/local/bin/yq \
&& chmod +x /usr/local/bin/yq

# Ensure pre-installed tools are always in PATH even if CARGO_HOME is overridden at runtime
ENV PATH=/usr/local/cargo/bin:$PATH

# Install cargo-binstall and other rust tools as root (installs to /usr/local/cargo/bin)
RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash \
&& rustup component add rustfmt clippy llvm-tools-preview \
&& cargo binstall -y cargo-audit cargo-llvm-cov

# Install Chromium and dependencies for browser-based MCP
RUN apt-get update && apt-get install -y \
chromium \
chromium-common \
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*
27 changes: 17 additions & 10 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ if [ -z "$CI" ] && [ -z "$GITHUB_ACTIONS" ]; then
echo "[Devcontainer Setup] Claude CLI already installed: $(claude --version)"
fi

echo "[Devcontainer Setup] Configuring tmux..."
cat > $HOME/.tmux.conf << 'EOF'
# Display pane number
bind-key p display-panes
set display-panes-time 10000
EOF

echo "[Devcontainer Setup] Configuring claude alias..."
echo 'alias claude="claude --allow-dangerously-skip-permissions"' >> $HOME/.bashrc
echo 'alias claude="claude --allow-dangerously-skip-permissions"' >> $HOME/.zshrc
Expand Down Expand Up @@ -53,8 +46,16 @@ EOF
# Note: chrome_args will be dynamically determined by the app
echo "[Devcontainer Setup] Configuring google-patent-cli..."
mkdir -p "$HOME/.config/google-patent-cli"
cat > "$HOME/.config/google-patent-cli/config.toml" <<EOF
cat > ~/.config/google-patent-cli/config.toml << 'EOF'
# Chrome browser path
browser_path = "/usr/bin/chromium"

# Chrome arguments for Docker/DevContainer environment
chrome_args = [
"--no-sandbox",
"--disable-setuid-sandbox",
"--disable-gpu"
]
EOF

# Run mise install
Expand All @@ -79,14 +80,20 @@ EOF
"ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic",
"API_TIMEOUT_MS": "3000000",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-5",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-4.7",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-5.1",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-5-turbo",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-4.5-air"
}
}
EOF
fi

# Configure git to use gh for HTTPS auth
if command -v gh >/dev/null 2>&1; then
echo "[Devcontainer Setup] Configuring gh auth for git..."
gh auth setup-git
fi

echo "[Devcontainer Setup] Complete!"
else
echo "Running in CI environment, skipping development setup..."
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "google-patent-cli"
version = "0.2.1"
version = "0.2.2"
edition = "2024"
rust-version = "1.93"

Expand Down
Loading