{"id":19163565,"url":"https://github.com/xmake-io/xrepo-docs","last_synced_at":"2026-02-18T16:30:57.975Z","repository":{"id":37349370,"uuid":"308678432","full_name":"xmake-io/xrepo-docs","owner":"xmake-io","description":"The xrepo online documentation site","archived":false,"fork":false,"pushed_at":"2026-02-16T15:19:22.000Z","size":328377,"stargazers_count":9,"open_issues_count":1,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-02-16T15:24:32.548Z","etag":null,"topics":["packages","xmake","xrepo"],"latest_commit_sha":null,"homepage":"https://xrepo.xmake.io","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xmake-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"waruqi","custom":"https://xmake.io/about/sponsor.html"}},"created_at":"2020-10-30T15:59:18.000Z","updated_at":"2026-02-16T15:19:26.000Z","dependencies_parsed_at":"2023-10-14T14:20:11.408Z","dependency_job_id":"39a93456-9b75-43bf-b261-9be7eae384e9","html_url":"https://github.com/xmake-io/xrepo-docs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xmake-io/xrepo-docs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmake-io%2Fxrepo-docs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmake-io%2Fxrepo-docs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmake-io%2Fxrepo-docs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmake-io%2Fxrepo-docs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xmake-io","download_url":"https://codeload.github.com/xmake-io/xrepo-docs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmake-io%2Fxrepo-docs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29585541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T13:56:48.962Z","status":"ssl_error","status_checked_at":"2026-02-18T13:54:34.145Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["packages","xmake","xrepo"],"created_at":"2024-11-09T09:15:52.453Z","updated_at":"2026-02-18T16:30:57.956Z","avatar_url":"https://github.com/xmake-io.png","language":"HTML","funding_links":["https://github.com/sponsors/waruqi","https://xmake.io/about/sponsor.html"],"categories":[],"sub_categories":[],"readme":"## Introduction\n\nxrepo is a cross-platform C/C++ package manager based on [Xmake](https://github.com/xmake-io/xmake).\n\nIt is based on the runtime provided by xmake, but it is a complete and independent package management program. Compared with package managers such as vcpkg/homebrew, xrepo can provide C/C++ packages for more platforms and architectures at the same time.\n\nAnd it also supports multi-version semantic selection. In addition, it is also a decentralized distributed repository. It not only provides the official [xmake-repo](https://github.com/xmake-io/xmake-repo) repository, It also supports users to build multiple private repositorys.\n\nAt the same time, xrepo also supports installing packages from third-party package managers such as vcpkg/homebrew/conan, and provides unified and consistent library link information to facilitate integration and docking with third-party projects.\n\nIf you want to know more, please refer to: [Documents](https://xmake.io/#/home), [Github](https://github.com/xmake-io/xrepo) and [Gitee](https://gitee.com/tboox/xrepo)\n\n![](https://github.com/xmake-io/xrepo-docs/raw/master/assets/img/xrepo.gif)\n\n## Installation\n\nWe only need install xmake to use the xrepo command. About the installation of xmake, we can see: [Xmake Installation Document](https://xmake.io/#/guide/installation).\n\n## Supported platforms\n\n* Windows (x86, x64)\n* macOS (i386, x86_64, arm64)\n* Linux (i386, x86_64, cross-toolchains ..)\n* *BSD (i386, x86_64)\n* Android (x86, x86_64, armeabi, armeabi-v7a, arm64-v8a)\n* iOS (armv7, armv7s, arm64, i386, x86_64)\n* MSYS (i386, x86_64)\n* MinGW (i386, x86_64, arm, arm64)\n* Cross Toolchains\n\n## Suppory distributed repository\n\nIn addition to directly retrieving the installation package from the official repository: [xmake-repo](https://github.com/xmake-io/xmake-repo).\n\nWe can also add any number of self-built repositories, and even completely isolate the external network, and only maintain the installation and integration of private packages on the company's internal network.\n\nJust use the following command to add your own repository address:\n\n```console\n$ xrepo add-repo myrepo https://github.com/mygroup/myrepo\n```\n\n## Seamless integration with xmake project\n\n```lua\nadd_requires(\"tbox \u003e1.6.1\", \"libuv master\", \"vcpkg::ffmpeg\", \"brew::pcre2/libpcre2-8\")\nadd_requires(\"conan::openssl/1.1.1g\", {alias = \"openssl\", optional = true, debug = true})\ntarget(\"test\")\n     set_kind(\"binary\")\n     add_files(\"src/*.c\")\n     add_packages(\"tbox\", \"libuv\", \"vcpkg::ffmpeg\", \"brew::pcre2/libpcre2-8\", \"openssl\")\n```\n\nThe following is the overall architecture and compilation process integrated with xmake.\n\n\u003cimg src=\"https://xmake.io/assets/img/index/package_arch.png\" width=\"650px\" /\u003e\n\n## Get started\n\n### Use it in cmake\n\nWe need CMake wrapper for Xrepo C and C++ package manager. [xrepo-cmake](https://github.com/xmake-io/xrepo-cmake)\n\n### Installation package\n\n#### Basic usage\n\n```console\n$ xrepo install zlib tbox\n```\n\n#### Install the specified version package\n\n```console\n$ xrepo install \"zlib 1.2.x\"\n$ xrepo install \"zlib \u003e=1.2.0\"\n```\n\n#### Install the specified platform package\n\n```console\n$ xrepo install -p iphoneos -a arm64 zlib\n$ xrepo install -p android [--ndk=/xxx] zlib\n$ xrepo install -p mingw [--mingw=/xxx] zlib\n$ xrepo install -p cross --sdk=/xxx/arm-linux-musleabi-cross zlib\n```\n\n#### Install the debug package\n\n```console\n$ xrepo install -m debug zlib\n```\n\n#### Install the package with dynamic library\n\n```console\n$ xrepo install -k shared zlib\n```\n\n#### Install the specified configuration package\n\n```console\n$ xrepo install -f \"vs_runtime='MD'\" zlib\n$ xrepo install -f \"regex=true,thread=true\" boost\n```\n\n#### Install packages from third-party package manager\n\n```console\n$ xrepo install brew::zlib\n$ xrepo install vcpkg::zlib\n$ xrepo install conan::zlib/1.2.11\n```\n\n### Find the library information of the package\n\n```console\n$ xrepo fetch pcre2\n{\n  {\n    linkdirs = {\n      \"/usr/local/Cellar/pcre2/10.33/lib\"\n    },\n    links = {\n      \"pcre2-8\"\n    },\n    defines = {\n      \"PCRE2_CODE_UNIT_WIDTH=8\"\n    },\n    includedirs = \"/usr/local/Cellar/pcre2/10.33/include\"\n  }\n}\n```\n\n```console\n$ xrepo fetch --ldflags openssl\n-L/Users/ruki/.xmake/packages/o/openssl/1.1.1/d639b7d6e3244216b403b39df5101abf/lib -lcrypto -lssl\n```\n\n```console\n$ xrepo fetch --cflags openssl\n-I/Users/ruki/.xmake/packages/o/openssl/1.1.1/d639b7d6e3244216b403b39df5101abf/include\n```\n\n```console\n$ xrepo fetch -p [iphoneos|android] --cflags \"zlib 1.2.x\"\n-I/Users/ruki/.xmake/packages/z/zlib/1.2.11/df72d410e7e14391b1a4375d868a240c/include\n```\n\n```console\n$ xrepo fetch --cflags --ldflags conan::zlib/1.2.11\n-I/Users/ruki/.conan/data/zlib/1.2.11/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -L/Users/ruki/.conan/data/zlib/1.2.11/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/lib -lz\n```\n\n### Import and export packages\n\nxrepo can quickly export the installed packages, including the corresponding library files, header files, and so on.\n\n```console\n$ xrepo export -o /tmp/output zlib\n```\n\nYou can also import the previously exported installation package on other machines to implement package migration.\n\n```console\n$ xrepo import -i /xxx/packagedir zlib\n```\n\n### Search supported packages\n\n```console\n$ xrepo search zlib \"pcr*\"\n    zlib:\n      -\u003e zlib: A Massively Spiffy Yet Delicately Unobtrusive Compression Library (in xmake-repo)\n    pcr*:\n      -\u003e pcre2: A Perl Compatible Regular Expressions Library (in xmake-repo)\n      -\u003e pcre: A Perl Compatible Regular Expressions Library (in xmake-repo)\n```\n\nIn addition, you can now search for their packages from third-party package managers such as vcpkg, conan, conda, and apt. You only need to add the corresponding package namespace, for example:\n\n```console\n$ xrepo search vcpkg::pcre\nThe package names:\n     vcpkg::pcre:\n       -\u003e vcpkg::pcre-8.44#8: Perl Compatible Regular Expressions\n       -\u003e vcpkg::pcre2-10.35#2: PCRE2 is a re-working of the original Perl Compatible Regular Expressions library\n```\n\n```console\n$ xrepo search conan::openssl\nThe package names:\n     conan::openssl:\n       -\u003e conan::openssl/1.1.1g:\n       -\u003e conan::openssl/1.1.1h:\n```\n\n### Show package environment information\n\n```console\n$ xrepo env --show luajit\n{\n   OLDPWD = \"/mnt/tbox\",\n   HOME = \"/home/ruki\",\n   PATH = \"/home/ruki/.xmake/packages/l/luajit/2.1.0-beta3/fbac76d823b844f0b91abf3df0a3bc61/bin:/tmp:/tmp/arm-linux-musleabi-cross/bin:~/.local/bin: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\",\n   TERM = \"xterm\",\n   PWD = \"/mnt/xmake\",\n   XMAKE_PROGRAM_DIR = \"/mnt/xmake/xmake\",\n   HOSTNAME = \"e6edd61ff1ab\",\n   LD_LIBRARY_PATH = \"/home/ruki/.xmake/packages/l/luajit/2.1.0-beta3/fbac76d823b844f0b91abf3df0a3bc61/lib\",\n   SHLVL = \"1\",\n   _ = \"/mnt/xmake/scripts/xrepo.sh\"\n}\n```\n\n### Load package environment and run commands\n\n```console\n$ xrepo env luajit\nLuaJIT 2.1.0-beta3 -- Copyright (C) 2005-2017 Mike Pall. http://luajit.org/\nJIT: ON SSE2 SSE3 SSE4.1 BMI2 fold cse dce fwd dse narrow loop abc sink fuse\n\u003e\n```\n\n```console\n$ xrepo env -b \"luajit 2.x\" luajit\n$ xrepo env -p iphoneos -b \"zlib,libpng,luajit 2.x\" cmake ..\n```\n\n### Enter the package shell environment\n\nWe can customize some package configurations by adding the xmake.lua file in the current directory, and then enter the specific package shell environment.\n\n```lua\nadd_requires(\"zlib 1.2.11\")\nadd_requires(\"python 3.x\", \"luajit\")\n```\n\n```console\n$ xrepo env shell\n\u003e python --version\n\u003e luajit --version\n```\n\nWe can also configure and load the corresponding toolchain environment in xmake.lua, for example, load the VS compilation environment.\n\n```lua\nset_toolchains(\"msvc\")\n```\n\n### Show the given package information\n\n```console\n$ xrepo info zlib\nThe package info of project:\n    require(zlib):\n      -\u003e description: A Massively Spiffy Yet Delicately Unobtrusive Compression Library\n      -\u003e version: 1.2.11\n      -\u003e urls:\n         -\u003e http://zlib.net/zlib-1.2.11.tar.gz\n            -\u003e c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1\n         -\u003e https://downloads.sourceforge.net/project/libpng/zlib/1.2.11/zlib-1.2.11.tar.gz\n            -\u003e c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1\n      -\u003e repo: xmake-repo https://gitee.com/tboox/xmake-repo.git master\n      -\u003e cachedir: /Users/ruki/.xmake/cache/packages/2010/z/zlib/1.2.11\n      -\u003e installdir: /Users/ruki/.xmake/packages/z/zlib/1.2.11/d639b7d6e3244216b403b39df5101abf\n      -\u003e searchdirs:\n      -\u003e searchnames: zlib-1.2.11.tar.gz\n      -\u003e fetchinfo: 1.2.11, system\n          -\u003e version: 1.2.11\n          -\u003e links: z\n          -\u003e linkdirs: /usr/local/Cellar/zlib/1.2.11/lib\n          -\u003e includedirs: /usr/local/Cellar/zlib/1.2.11/include\n      -\u003e platforms: iphoneos, mingw@windows, macosx, mingw@linux,macosx, android@linux,macosx, windows, linux\n      -\u003e requires:\n         -\u003e plat: macosx\n         -\u003e arch: x86_64\n         -\u003e configs:\n            -\u003e debug: false\n            -\u003e vs_runtime: MT\n            -\u003e shared: false\n      -\u003e configs:\n      -\u003e configs (builtin):\n         -\u003e debug: Enable debug symbols. (default: false)\n         -\u003e shared: Enable shared library. (default: false)\n         -\u003e cflags: Set the C compiler flags.\n         -\u003e cxflags: Set the C/C++ compiler flags.\n         -\u003e cxxflags: Set the C++ compiler flags.\n         -\u003e asflags: Set the assembler flags.\n         -\u003e vs_runtime: Set vs compiler runtime. (default: MT)\n            -\u003e values: {\"MT\",\"MD\"}\n```\n\n### Uninstall all packages\n\nWe can use the following command to batch uninstall and delete the installed packages, supporting pattern matching:\n\n```bash\n$ xrepo remove --all\n$ xrepo remove --all zlib pcr*\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmake-io%2Fxrepo-docs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxmake-io%2Fxrepo-docs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmake-io%2Fxrepo-docs/lists"}