This repository provides Claude Code CLI as a flatpak package, enabling you to run Claude within sandboxed environments like VSCode, VSCodium, Cursor, and other flatpak applications.
-
Run Claude Code CLI in flatpak sandboxes/containers - Works reliably in flatpak-based IDEs (VSCode, VSCodium, Cursor, GNOME Builder, etc.)
-
Flexible configuration via
CLAUDE_CONFIG_DIR- Point to different.claudedirectories for isolated projects or shared configurations
- ✅ Works inside flatpak IDEs and terminals
- ✅ Multi-architecture support (x86_64 and ARM64)
- ✅ Configurable config directory via environment variable
- ✅ Shares config with host installation (by default)
- ✅ Downloads from npm registry (reproducible builds)
flatpak remote-add --user --no-gpg-verify claude-repo https://opsdev-ws.github.io/flatpak-claudeflatpak install --user claude-repo com.anthropic.ClaudeCodeflatpak run com.anthropic.ClaudeCodealias claude='flatpak run com.anthropic.ClaudeCode'If you're using a flatpak IDE like VSCodium, you need to grant it permission to run other flatpaks:
# Grant VSCodium permission to run flatpaks
flatpak override --user com.vscodium.codium --talk-name=org.freedesktop.FlatpakNow from VSCodium's integrated terminal:
flatpak run com.anthropic.ClaudeCodeOr create an alias in your shell config (~/.bashrc or ~/.zshrc):
alias claude='flatpak run com.anthropic.ClaudeCode'By default, this flatpak uses ~/.claude for configuration. You can change this using the CLAUDE_CONFIG_DIR environment variable.
# Uses ~/.claude
flatpak run com.anthropic.ClaudeCode# Use a project-specific config
flatpak run --env=CLAUDE_CONFIG_DIR=/path/to/project/.claude com.anthropic.ClaudeCode# Work config
alias claude-work='flatpak run --env=CLAUDE_CONFIG_DIR=$HOME/.claude-work com.anthropic.ClaudeCode'
# Personal config
alias claude-personal='flatpak run --env=CLAUDE_CONFIG_DIR=$HOME/.claude-personal com.anthropic.ClaudeCode'
# Project-specific config
alias claude-project='flatpak run --env=CLAUDE_CONFIG_DIR=$PWD/.claude com.anthropic.ClaudeCode'From VSCodium or other flatpak IDEs, set the environment variable:
# In your terminal
CLAUDE_CONFIG_DIR=/path/to/project/.claude flatpak run com.anthropic.ClaudeCode
# Or export it for the session
export CLAUDE_CONFIG_DIR=$HOME/.claude-work
flatpak run com.anthropic.ClaudeCodeThis flatpak works in:
- VSCode / VSCodium (flatpak versions)
- Cursor (when packaged as flatpak)
- GNOME Builder
- Other flatpak-based IDEs and terminals
Note: Using flatpak-spawn to access the host's Claude installation often doesn't work well with IDE terminals due to environment and permission issues. Installing Claude as a flatpak (above) is the recommended approach.
- Does not work reliably with some IDE integrated terminals
- Environment variables and paths may not transfer correctly
- Technically violates the isolation purpose of flatpak sandboxes
- Permission issues accessing host resources
Basic usage from within a flatpak sandbox:
flatpak-spawn --host --env=CLAUDE_CONFIG_DIR=$HOME/.claude claudeRequirements:
- Claude must be installed on the host system
- The flatpak must have access to
org.freedesktop.FlatpakD-Bus interface - May need additional permissions in flatpak manifest
For detailed flatpak-spawn documentation, see the flatpak-spawn man page.
See CREATING-FLATPAK.md for complete instructions on:
- Building the flatpak from source
- Publishing to GitHub Pages
- Creating your own flatpak repository
- Updating to newer versions of Claude Code
- Node.js (LTS version)
- Claude Code CLI (from npm registry)
- Sandboxed environment with network access
- Access to home directory and config files
- Multi-architecture support (x86_64 and ARM64)
- Repository: github.com/opsdev-ws/flatpak-claude
- Flatpak Manifest:
com.anthropic.ClaudeCode.yml - Issues: Report issues on GitHub
- Installation: https://claude.ai/install.sh
- Documentation: https://code.claude.com/docs/en/overview
- Developer: Anthropic