Metadata-Version: 2.4
Name: zephyr-kconfig
Version: 0.2.1
Summary: Tools for Zephyr Kconfig files
Project-URL: repository, https://github.com/ksachdeva/zephyr-kconfig
Author: Sachdeva, Kapil
License-File: LICENSE
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.11
Requires-Dist: httpx>=0.28.1
Requires-Dist: pydantic>=2.12.5
Requires-Dist: typer>=0.16.0
Requires-Dist: xdg-base-dirs>=6.0.2
Description-Content-Type: text/markdown

# Zephyr KConfig

Various tools/helpers/cli to assist with Zephyr's KConfig

## Run / Install

### Run via `uvx`

```bash
# always fetches the latest version
uvx --from zepyhr-kconfig --help
```

### Install as a tool (via `uv`)

```bash
# installs the current version
uv tool install zephyr-kconfig
```

Above also install `zkc` cli (also accessible via `zephyr-kconfig` if you have conflict with `zkc`)

```bash
# examples - (zkc is an alias to zephyr-kconfig)
zkc --help
zephyr-kconfig --help
```

## Add to your project

```bash
uv add zephyr-kconfig --dev
```

and then run the cli via

```bash
uv run zkc --help
```

## Features

Below examples are assuming you are running the tool globally

> Note - uvx does sandboxing (virtualenv) for you so no need to worry


### Get info on a KConfig item

```bash
# get the description as JSON output for CONFIG_LWM2M_SHELL
uvx zepyhr-kconfig --release 4.3.0 get CONFIG_LWM2M_SHELL
```

![Example output](docs/images/single_get_example.png)

> A partial CONFIG spec will get all items that start with the provided input for
  example CONFIG_LWM2M_ will output all L2M2M config items

> Use `--exact` to get the info on CONFIG_LWM2M only

> Use `--metadata` to get some extra fields (such as linenr, menupath etc)

> Use `--indent -1` to remove any indentation (default is 2)

### Get deps on a KConfig item

```bash
# get the dependencies for CONFIG_LWM2M_SHELL
uvx zepyhr-kconfig --release 4.3.0 deps CONFIG_LWM2M_SHELL
```

For above example output would be:

`CONFIG_LWM2M && CONFIG_NETWORKING`

> The input symbol should be exact

### Pretty Print KConfig item(s)

```bash
# show the description of symbol(s)
uvx zepyhr-kconfig --release 4.3.0 pprint CONFIG_LWM2M_SHELL
```

> Use `--exact` to print only one symbol
