> ## Documentation Index
> Fetch the complete documentation index at: https://sdk.docs.xano.com/llms.txt
> Use this file to discover all available pages before exploring further.

# xanosdk compile

> Compile a single object def and print its JSON artifact (not type-checked — run `tsc` for that)

## Usage

```bash theme={null}
xanosdk compile <file> [options]
```

## Flags

| Flag | Description |
| - | - |
| `--out, -o <path>` | Write the artifact to this path instead of stdout (`-` is stdout) |
| `--lock[=<path>]` | Name the xano.lock to use — default: beside the entry file |
| `--strict` | Promote every export warning (data-losing shapes, unresolvable filters) to a hard failure |
| `--export <name>` | The named export to compile, when the module exports several defs |

Global flags are listed in the [CLI overview](/reference/cli).

***

*Generated from @xano/sdk 1.0.9.*


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.