# Xmake Commands

> 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.

- **Type:** Skill
- **Install:** `agentstack add skill-xmake-io-xmake-skills-xmake-commands`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [xmake-io](https://agentstack.voostack.com/s/xmake-io)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [xmake-io](https://github.com/xmake-io)
- **Source:** https://github.com/xmake-io/xmake-skills/tree/master/skills/cli/xmake-commands

## Install

```sh
agentstack add skill-xmake-io-xmake-skills-xmake-commands
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Xmake Commands

Xmake's CLI is a single `xmake` binary with subcommands. Without a subcommand it runs `build`.

## Configure (`xmake f` / `xmake config`)

```bash
xmake f -m release                # build mode
xmake f -p linux -a x86_64        # platform + arch
xmake f --toolchain=clang
xmake f -c                        # clear old config
xmake f --menu                    # interactive TUI (shows all options)
xmake f -v                        # verbose
```

Config is persisted under `.xmake/`, so later `xmake` calls reuse it.

## Build

```bash
xmake                 # build all default targets
xmake app             # build a specific target
xmake -r              # rebuild (force)
xmake -j 8            # parallel jobs
xmake -v              # show compile commands
xmake -vD             # verbose + diagnostics (for debugging xmake.lua)
xmake -w              # treat warnings
```

## Run

```bash
xmake run                  # run default runnable target
xmake run app arg1 arg2    # pass arguments
xmake run -d app           # run under debugger (gdb/lldb/cdb)
```

## Clean

```bash
xmake clean                # current config
xmake clean --all          # all configs
xmake clean app            # one target
```

## Install / uninstall

```bash
xmake install -o /usr/local
xmake install --root app       # one target, root-prefixed
xmake uninstall -o /usr/local
```

## Pack (`xmake pack`)

Produce distributable archives (zip/tar.gz/deb/rpm/nsis/wix/...):

```bash
xmake pack                           # default format
xmake pack -f zip
xmake pack -f nsis                   # Windows installer
xmake pack -f deb mylib              # Debian package for one target
```

Packaging metadata is defined via `xpack(...)` in `xmake.lua`.

## Project info & inspection

```bash
xmake show                           # project summary
xmake show -l targets
xmake show -l toolchains
xmake show -l plats
xmake show -t app                    # info for one target
xmake show --key=options
```

## Project file generation (for IDEs/other tools)

```bash
xmake project -k compile_commands    # compile_commands.json
xmake project -k cmakelists          # CMakeLists.txt (one-way export)
xmake project -k vsxmake -m "debug,release"   # Visual Studio solution
xmake project -k xcode               # Xcode project
```

## Self-update

```bash
xmake update                 # stable
xmake update -s dev          # dev branch
```

## When to branch out

- Writing tests runnable via `xmake test` → `xmake-tests`
- Packaging details and `xpack` interfaces → see xmake docs

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [xmake-io](https://github.com/xmake-io)
- **Source:** [xmake-io/xmake-skills](https://github.com/xmake-io/xmake-skills)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-xmake-io-xmake-skills-xmake-commands
- Seller: https://agentstack.voostack.com/s/xmake-io
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
