{"id":24313508,"url":"https://github.com/k3d3/claude-desktop-linux-flake","last_synced_at":"2025-09-26T19:31:17.154Z","repository":{"id":268645865,"uuid":"904088170","full_name":"k3d3/claude-desktop-linux-flake","owner":"k3d3","description":"Nix Flake for Claude Desktop on Linux","archived":false,"fork":false,"pushed_at":"2025-01-11T19:35:47.000Z","size":34,"stargazers_count":25,"open_issues_count":1,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-11T20:26:48.625Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/k3d3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-16T08:28:08.000Z","updated_at":"2025-01-11T19:35:50.000Z","dependencies_parsed_at":"2024-12-18T04:19:56.832Z","dependency_job_id":null,"html_url":"https://github.com/k3d3/claude-desktop-linux-flake","commit_stats":null,"previous_names":["k3d3/claude-desktop-linux-flake"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k3d3%2Fclaude-desktop-linux-flake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k3d3%2Fclaude-desktop-linux-flake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k3d3%2Fclaude-desktop-linux-flake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k3d3%2Fclaude-desktop-linux-flake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/k3d3","download_url":"https://codeload.github.com/k3d3/claude-desktop-linux-flake/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234338058,"owners_count":18816449,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-17T09:01:40.483Z","updated_at":"2025-09-26T19:31:17.146Z","avatar_url":"https://github.com/k3d3.png","language":"Rust","funding_links":[],"categories":["Nix"],"sub_categories":[],"readme":"***THIS IS AN UNOFFICIAL BUILD SCRIPT!***\n\nIf you run into an issue with this build script, make an issue here. Don't bug Anthropic about it - they already have enough on their plates.\n\n# Claude Desktop for Linux (Nix)\n\nSupports MCP!\n![image](https://github.com/user-attachments/assets/93080028-6f71-48bd-8e59-5149d148cd45)\n\nSupports the Ctrl+Alt+Space popup!\n![image](https://github.com/user-attachments/assets/1deb4604-4c06-4e4b-b63f-7f6ef9ef28c1)\n\nSupports the Tray menu! (Screenshot of running on KDE)\n\n![image](https://github.com/user-attachments/assets/ba209824-8afb-437c-a944-b53fd9ecd559)\n\nThis is a Nix flake for running Claude Desktop on Linux.\n\n# Usage\n\nTo run this once, make sure Nix is installed, then run\n\n```bash\nNIXPKGS_ALLOW_UNFREE=1 nix run github:k3d3/claude-desktop-linux-flake --impure\n```\n\nThe \"unfree\" part is due to the fact that Claude Desktop is not an open source application, and thus, Nix's licensing rules\nare dictated by the application itself, not the build script used to build the application.\n\n## Installation on NixOS with Flakes\n\nAdd the following to your `flake.nix`:\n```nix\ninputs.claude-desktop.url = \"github:k3d3/claude-desktop-linux-flake\";\ninputs.claude-desktop.inputs.nixpkgs.follows = \"nixpkgs\";\ninputs.claude-desktop.inputs.flake-utils.follows = \"flake-utils\";\n```\n\nAnd then the following package to your `environment.systemPackages` or `home.packages`:\n```nix\ninputs.claude-desktop.packages.${system}.claude-desktop\n```\n\nIf you would like to run [MCP servers with Claude Desktop](https://modelcontextprotocol.io/quickstart/user) on NixOS, use the `claude-desktop-with-fhs` package. This will allow running MCP servers with calls to `npx`, `uvx`, or `docker` (assuming docker is installed).\n```nix\ninputs.claude-desktop.packages.${system}.claude-desktop-with-fhs\n```\n\n## Other distributions\n\nThis repository only provides a Nix flake, and does not provide a package for e.g. Ubuntu, Fedora, or Arch Linux.\n\nOther known variants:\n- https://github.com/aaddrick/claude-desktop-debian - A debian builder for Claude Desktop\n- https://aur.archlinux.org/packages/claude-desktop-bin - An Arch package for Claude Desktop\n- https://github.com/wankdanker/claude-desktop-linux-bash - A bash-based Claude Desktop builder that works on Ubuntu and possibly other Debian derivatives\n\nIf anyone else packages Claude Desktop for other distributions, make an issue or PR and I'll link it here.\n\n# How it works\n\nClaude Desktop is an Electron application. That means the majority of the application is inside an `app.asar` archive, which usually contains minified Javascript, HTML, and CSS, along with images and a few other things.\n\nDespite there being no official Linux Claude Desktop release, the vast majority of the code is completely cross-platform.\n\nWith the exception of one library.\n\n## `claude-native-bindings`\n\n![image](https://github.com/user-attachments/assets/9b386f42-2565-441a-a351-9c09347f9f5f)\n\nNode, and by extension Electron, allow you to import natively-compiled objects into the Node runtime as if they were regular modules.\nThese are typically used to extend the functionality in ways Node itself can't do. Only problem, as shown above, is that these objects \nare only compiled for one OS. \n\nLuckily enough, because it's a loadable Node module, that means you can open it up yourself in node and inspect it - no decompilation or disassembly needed:\n\n![image](https://github.com/user-attachments/assets/b2f1e72c-f763-45c0-8631-2de5555ae653)\n\nThere are many functions here for getting monitor/window information, as well as for controlling the mouse and keyboard.\nI'm not sure what exactly these are for - my best guess is something unreleased related to [Computer Use](https://docs.anthropic.com/en/docs/build-with-claude/computer-use),\nhowever I'm not a huge fan of this functionality existing in the first place.\n\nAs for how to move forward with getting Claude Desktop working on Linux, seeing as how the API surface area of this module is relatively\nsmall, it looked fairly easy to just wholesale reimplement it, using stubs for the functionality.\n\n## `patchy-cnb`\n\nThe result of that is a library I call `patchy-cnb`, which uses NAPI-RS to match the original API with stub functions.\nTurns out, the original module also used NAPI-RS. Neat!\n\nFrom there, it's just a matter of compiling `patchy-cnb`, repackaging the app.asar to include the newly built Linux module, and\nmaking a new Electron build with these files.\n\n# License\n\nThe build scripts in this repository, as well as `patchy-cnb`, are dual-licensed under the terms of the MIT license and the Apache License (Version 2.0).\n\nSee [LICENSE-MIT](LICENSE-MIT) and [LICENSE-APACHE](LICENSE-APACHE) for details.\n\nThe Claude Desktop application, not included in this repository, is likely covered by [Anthropic's Consumer Terms](https://www.anthropic.com/legal/consumer-terms).\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any\nadditional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk3d3%2Fclaude-desktop-linux-flake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fk3d3%2Fclaude-desktop-linux-flake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk3d3%2Fclaude-desktop-linux-flake/lists"}