| name | xmake-commands |
| description | Use when invoking Xmake from the command line — configuring, building, running, cleaning, installing, packing, or inspecting a project. Covers the common flags for `xmake f`, `xmake`, `xmake run`, `xmake install`, `xmake pack`, and friends. |
Xmake Commands
Xmake's CLI is a single xmake binary with subcommands. Without a subcommand it runs build.
Configure (xmake f / xmake config)
xmake f -m release
xmake f -p linux -a x86_64
xmake f --toolchain=clang
xmake f -c
xmake f --menu
xmake f -v
Config is persisted under .xmake/, so later xmake calls reuse it.
Build
xmake
xmake app
xmake -r
xmake -j 8
xmake -v
xmake -vD
xmake -w
Run
xmake run
xmake run app arg1 arg2
xmake run -d app
Clean
xmake clean
xmake clean --all
xmake clean app
Install / uninstall
xmake install -o /usr/local
xmake install --root app
xmake uninstall -o /usr/local
Pack (xmake pack)
Produce distributable archives (zip/tar.gz/deb/rpm/nsis/wix/...):
xmake pack
xmake pack -f zip
xmake pack -f nsis
xmake pack -f deb mylib
Packaging metadata is defined via xpack(...) in xmake.lua.
Project info & inspection
xmake show
xmake show -l targets
xmake show -l toolchains
xmake show -l plats
xmake show -t app
xmake show --key=options
Project file generation (for IDEs/other tools)
xmake project -k compile_commands
xmake project -k cmakelists
xmake project -k vsxmake -m "debug,release"
xmake project -k xcode
Self-update
xmake update
xmake update -s dev
When to branch out
- Writing tests runnable via
xmake test → xmake-tests
- Packaging details and
xpack interfaces → see xmake docs