pycli-mcp 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. pycli_mcp-0.2.0/.gemini/config.yaml +6 -0
  2. pycli_mcp-0.2.0/.gitattributes +2 -0
  3. pycli_mcp-0.2.0/.github/FUNDING.yml +4 -0
  4. pycli_mcp-0.2.0/.github/dependabot.yml +10 -0
  5. pycli_mcp-0.2.0/.github/workflows/build.yml +69 -0
  6. pycli_mcp-0.2.0/.github/workflows/docs.yml +77 -0
  7. pycli_mcp-0.2.0/.github/workflows/test.yml +68 -0
  8. pycli_mcp-0.2.0/.gitignore +24 -0
  9. pycli_mcp-0.2.0/.linkcheckerrc +2 -0
  10. pycli_mcp-0.2.0/LICENSE.txt +9 -0
  11. pycli_mcp-0.2.0/PKG-INFO +57 -0
  12. pycli_mcp-0.2.0/README.md +30 -0
  13. pycli_mcp-0.2.0/docs/.hooks/title_from_content.py +14 -0
  14. pycli_mcp-0.2.0/docs/.snippets/abbrs.txt +0 -0
  15. pycli_mcp-0.2.0/docs/.snippets/links.txt +0 -0
  16. pycli_mcp-0.2.0/docs/api.md +9 -0
  17. pycli_mcp-0.2.0/docs/assets/css/custom.css +60 -0
  18. pycli_mcp-0.2.0/docs/assets/images/favicon.ico +0 -0
  19. pycli_mcp-0.2.0/docs/changelog.md +49 -0
  20. pycli_mcp-0.2.0/docs/cli.md +10 -0
  21. pycli_mcp-0.2.0/docs/index.md +26 -0
  22. pycli_mcp-0.2.0/docs/install.md +13 -0
  23. pycli_mcp-0.2.0/hatch.toml +50 -0
  24. pycli_mcp-0.2.0/mkdocs.yml +224 -0
  25. pycli_mcp-0.2.0/pyproject.toml +68 -0
  26. pycli_mcp-0.2.0/ruff.toml +15 -0
  27. pycli_mcp-0.2.0/ruff_defaults.toml +680 -0
  28. pycli_mcp-0.2.0/src/pycli_mcp/__init__.py +6 -0
  29. pycli_mcp-0.2.0/src/pycli_mcp/__main__.py +8 -0
  30. pycli_mcp-0.2.0/src/pycli_mcp/cli.py +209 -0
  31. pycli_mcp-0.2.0/src/pycli_mcp/metadata/__init__.py +2 -0
  32. pycli_mcp-0.2.0/src/pycli_mcp/metadata/interface.py +23 -0
  33. pycli_mcp-0.2.0/src/pycli_mcp/metadata/query.py +94 -0
  34. pycli_mcp-0.2.0/src/pycli_mcp/metadata/types/__init__.py +2 -0
  35. pycli_mcp-0.2.0/src/pycli_mcp/metadata/types/click.py +479 -0
  36. pycli_mcp-0.2.0/src/pycli_mcp/py.typed +0 -0
  37. pycli_mcp-0.2.0/src/pycli_mcp/server.py +202 -0
  38. pycli_mcp-0.2.0/tests/__init__.py +2 -0
  39. pycli_mcp-0.2.0/tests/click/__init__.py +2 -0
  40. pycli_mcp-0.2.0/tests/click/test_collection.py +515 -0
  41. pycli_mcp-0.2.0/tests/click/test_construction.py +134 -0
  42. pycli_mcp-0.2.0/tests/click/test_schema.py +456 -0
@@ -0,0 +1,6 @@
1
+ # https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github
2
+ have_fun: false
3
+ code_review:
4
+ pull_request_opened:
5
+ summary: false
6
+ code_review: false
@@ -0,0 +1,2 @@
1
+ # Auto detect text files and perform LF normalization
2
+ * text=auto
@@ -0,0 +1,4 @@
1
+ github:
2
+ - ofek
3
+ custom:
4
+ - https://ofek.dev/donate/
@@ -0,0 +1,10 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: github-actions
4
+ directory: /
5
+ schedule:
6
+ interval: monthly
7
+ groups:
8
+ all:
9
+ patterns:
10
+ - "*"
@@ -0,0 +1,69 @@
1
+ name: build
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - v*
7
+ branches:
8
+ - main
9
+ pull_request:
10
+ branches:
11
+ - main
12
+
13
+ concurrency:
14
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
15
+ cancel-in-progress: true
16
+
17
+ defaults:
18
+ run:
19
+ shell: bash
20
+
21
+ jobs:
22
+ build:
23
+ name: Build artifacts
24
+ runs-on: ubuntu-latest
25
+
26
+ steps:
27
+ - name: Checkout code
28
+ uses: actions/checkout@v4
29
+ with:
30
+ fetch-depth: 0
31
+
32
+ - name: Set up Python
33
+ uses: actions/setup-python@v5
34
+ with:
35
+ python-version-file: pyproject.toml
36
+
37
+ - name: Install UV
38
+ uses: astral-sh/setup-uv@v6
39
+
40
+ - name: Build wheel and source distribution
41
+ run: uv build
42
+
43
+ - name: Upload artifacts
44
+ uses: actions/upload-artifact@v4
45
+ with:
46
+ name: artifacts
47
+ path: dist/*
48
+ if-no-files-found: error
49
+
50
+ publish:
51
+ name: Publish to PyPI
52
+ if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
53
+ needs: build
54
+ runs-on: ubuntu-latest
55
+
56
+ permissions:
57
+ id-token: write
58
+
59
+ steps:
60
+ - name: Download Python artifacts
61
+ uses: actions/download-artifact@v4
62
+ with:
63
+ name: artifacts
64
+ path: dist
65
+
66
+ - name: Push Python artifacts to PyPI
67
+ uses: pypa/gh-action-pypi-publish@release/v1
68
+ with:
69
+ skip-existing: true
@@ -0,0 +1,77 @@
1
+ name: docs
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ branches:
9
+ - main
10
+
11
+ concurrency:
12
+ group: docs-deploy
13
+
14
+ env:
15
+ FORCE_COLOR: "1"
16
+
17
+ jobs:
18
+ build:
19
+ runs-on: ubuntu-latest
20
+
21
+ steps:
22
+ - name: Checkout code
23
+ uses: actions/checkout@v4
24
+ with:
25
+ # Fetch all history for applying timestamps to every page
26
+ fetch-depth: 0
27
+
28
+ - name: Set up Python
29
+ uses: actions/setup-python@v5
30
+ with:
31
+ python-version-file: pyproject.toml
32
+
33
+ - name: Install Hatch
34
+ uses: pypa/hatch@install
35
+
36
+ - name: Configure Git for GitHub Actions bot
37
+ run: |
38
+ git config --local user.name 'github-actions[bot]'
39
+ git config --local user.email 'github-actions[bot]@users.noreply.github.com'
40
+
41
+ - name: Check documentation
42
+ run: hatch run docs:build-check
43
+
44
+ - name: Build documentation
45
+ run: hatch run docs:build
46
+
47
+ - name: Create archive
48
+ run: tar -czf site.tar.gz site
49
+
50
+ - name: Upload site
51
+ uses: actions/upload-artifact@v4
52
+ with:
53
+ name: site
54
+ path: site.tar.gz
55
+
56
+ publish:
57
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
58
+ needs:
59
+ - build
60
+ runs-on: ubuntu-latest
61
+
62
+ permissions:
63
+ contents: write
64
+
65
+ steps:
66
+ - uses: actions/download-artifact@v4
67
+ with:
68
+ name: site
69
+
70
+ - name: Unpack archive
71
+ run: tar -xzf site.tar.gz
72
+
73
+ - uses: peaceiris/actions-gh-pages@v4
74
+ with:
75
+ github_token: ${{ secrets.GITHUB_TOKEN }}
76
+ publish_dir: site
77
+ commit_message: ${{ github.event.head_commit.message }}
@@ -0,0 +1,68 @@
1
+ name: test
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ branches:
9
+ - main
10
+
11
+ concurrency:
12
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
13
+ cancel-in-progress: true
14
+
15
+ env:
16
+ PYTHONUNBUFFERED: "1"
17
+ FORCE_COLOR: "1"
18
+
19
+ jobs:
20
+ run:
21
+ name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
22
+ runs-on: ${{ matrix.os }}
23
+ strategy:
24
+ fail-fast: false
25
+ matrix:
26
+ os:
27
+ - ubuntu-latest
28
+ - windows-latest
29
+ - macos-latest
30
+ python-version:
31
+ - "3.10"
32
+ - "3.11"
33
+ - "3.12"
34
+ - "3.13"
35
+ - "3.14"
36
+
37
+ steps:
38
+ - name: Checkout code
39
+ uses: actions/checkout@v4
40
+
41
+ - name: Set up Python ${{ matrix.python-version }}
42
+ uses: actions/setup-python@v5
43
+ with:
44
+ python-version-file: pyproject.toml
45
+
46
+ - name: Install Hatch
47
+ uses: pypa/hatch@install
48
+
49
+ - name: Run static analysis
50
+ run: hatch fmt --check
51
+
52
+ - name: Check types
53
+ run: hatch run types:check
54
+
55
+ - name: Run tests
56
+ run: hatch test --python ${{ matrix.python-version }} --randomize
57
+
58
+ check:
59
+ if: always()
60
+ needs:
61
+ - run
62
+ runs-on: ubuntu-latest
63
+
64
+ steps:
65
+ - name: Verify dependent success
66
+ uses: re-actors/alls-green@release/v1
67
+ with:
68
+ jobs: ${{ toJSON(needs) }}
@@ -0,0 +1,24 @@
1
+ # Global directories
2
+ __pycache__/
3
+
4
+ # Global files
5
+ *.py[cod]
6
+ *.dll
7
+ *.so
8
+ *.log
9
+ *.swp
10
+
11
+ # Root directories
12
+ /.benchmarks/
13
+ /.cache/
14
+ /.env/
15
+ /.idea/
16
+ /.mypy_cache/
17
+ /.pytest_cache/
18
+ /.ruff_cache/
19
+ /.vscode/
20
+ /dist/
21
+ /site/
22
+
23
+ # Root files
24
+ /.coverage*
@@ -0,0 +1,2 @@
1
+ # https://linkchecker.github.io/linkchecker/man/linkcheckerrc.html
2
+ [AnchorCheck]
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-present Ofek Lev <oss@ofek.dev>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,57 @@
1
+ Metadata-Version: 2.4
2
+ Name: pycli-mcp
3
+ Version: 0.2.0
4
+ Summary: MCP server for any Python command line application
5
+ Project-URL: Homepage, https://ofek.dev/pycli-mcp/
6
+ Project-URL: Sponsor, https://github.com/sponsors/ofek
7
+ Project-URL: Changelog, https://ofek.dev/pycli-mcp/changelog/
8
+ Project-URL: Tracker, https://github.com/ofek/pycli-mcp/issues
9
+ Project-URL: Source, https://github.com/ofek/pycli-mcp
10
+ Author-email: Ofek Lev <oss@ofek.dev>
11
+ License-Expression: MIT
12
+ License-File: LICENSE.txt
13
+ Keywords: ai,cli,click,mcp
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Programming Language :: Python
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Programming Language :: Python :: Implementation :: CPython
22
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
23
+ Requires-Python: >=3.10
24
+ Requires-Dist: click
25
+ Requires-Dist: mcp
26
+ Description-Content-Type: text/markdown
27
+
28
+ # PyCLI MCP
29
+
30
+ | | |
31
+ | --- | --- |
32
+ | CI/CD | [![CI - Test](https://github.com/ofek/pycli-mcp/actions/workflows/test.yml/badge.svg)](https://github.com/ofek/pycli-mcp/actions/workflows/test.yml) [![CD - Build](https://github.com/ofek/pycli-mcp/actions/workflows/build.yml/badge.svg)](https://github.com/ofek/pycli-mcp/actions/workflows/build.yml) |
33
+ | Docs | [![Docs](https://github.com/ofek/pycli-mcp/actions/workflows/docs.yml/badge.svg)](https://github.com/ofek/pycli-mcp/actions/workflows/docs.yml) |
34
+ | Package | [![PyPI - Version](https://img.shields.io/pypi/v/pycli-mcp.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.org/project/pycli-mcp/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pycli-mcp.svg?logo=python&label=Python&logoColor=gold)](https://pypi.org/project/pycli-mcp/) |
35
+ | Meta | [![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/ofek/pycli-mcp) [![linting - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![License - MIT](https://img.shields.io/badge/license-MIT-9400d3.svg)](https://spdx.org/licenses/) [![GitHub Sponsors](https://img.shields.io/github/sponsors/ofek?logo=GitHub%20Sponsors&style=social)](https://github.com/sponsors/ofek) |
36
+
37
+ -----
38
+
39
+ This provides an extensible [MCP](https://modelcontextprotocol.io) server that is compatible with any Python command line application.
40
+
41
+ Supported frameworks:
42
+
43
+ - [Click](https://github.com/pallets/click)
44
+
45
+ ## Installation
46
+
47
+ ```console
48
+ pip install pycli-mcp
49
+ ```
50
+
51
+ ## Documentation
52
+
53
+ The [documentation](https://ofek.dev/pycli-mcp/) is made with [Material for MkDocs](https://github.com/squidfunk/mkdocs-material) and is hosted by [GitHub Pages](https://docs.github.com/en/pages).
54
+
55
+ ## License
56
+
57
+ `pycli-mcp` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
@@ -0,0 +1,30 @@
1
+ # PyCLI MCP
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | CI/CD | [![CI - Test](https://github.com/ofek/pycli-mcp/actions/workflows/test.yml/badge.svg)](https://github.com/ofek/pycli-mcp/actions/workflows/test.yml) [![CD - Build](https://github.com/ofek/pycli-mcp/actions/workflows/build.yml/badge.svg)](https://github.com/ofek/pycli-mcp/actions/workflows/build.yml) |
6
+ | Docs | [![Docs](https://github.com/ofek/pycli-mcp/actions/workflows/docs.yml/badge.svg)](https://github.com/ofek/pycli-mcp/actions/workflows/docs.yml) |
7
+ | Package | [![PyPI - Version](https://img.shields.io/pypi/v/pycli-mcp.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.org/project/pycli-mcp/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pycli-mcp.svg?logo=python&label=Python&logoColor=gold)](https://pypi.org/project/pycli-mcp/) |
8
+ | Meta | [![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/ofek/pycli-mcp) [![linting - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![License - MIT](https://img.shields.io/badge/license-MIT-9400d3.svg)](https://spdx.org/licenses/) [![GitHub Sponsors](https://img.shields.io/github/sponsors/ofek?logo=GitHub%20Sponsors&style=social)](https://github.com/sponsors/ofek) |
9
+
10
+ -----
11
+
12
+ This provides an extensible [MCP](https://modelcontextprotocol.io) server that is compatible with any Python command line application.
13
+
14
+ Supported frameworks:
15
+
16
+ - [Click](https://github.com/pallets/click)
17
+
18
+ ## Installation
19
+
20
+ ```console
21
+ pip install pycli-mcp
22
+ ```
23
+
24
+ ## Documentation
25
+
26
+ The [documentation](https://ofek.dev/pycli-mcp/) is made with [Material for MkDocs](https://github.com/squidfunk/mkdocs-material) and is hosted by [GitHub Pages](https://docs.github.com/en/pages).
27
+
28
+ ## License
29
+
30
+ `pycli-mcp` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
@@ -0,0 +1,14 @@
1
+ # SPDX-FileCopyrightText: 2025-present Ofek Lev <oss@ofek.dev>
2
+ # SPDX-License-Identifier: MIT
3
+ from __future__ import annotations
4
+
5
+
6
+ def on_page_content(
7
+ html, # noqa: ARG001
8
+ page,
9
+ **kwargs, # noqa: ARG001
10
+ ):
11
+ # https://github.com/mkdocs/mkdocs/issues/3532
12
+ # https://github.com/pypa/hatch/pull/1239
13
+ if title := page._title_from_render: # noqa: SLF001
14
+ page.meta["title"] = title
File without changes
File without changes
@@ -0,0 +1,9 @@
1
+ # API reference
2
+
3
+ -----
4
+
5
+ ::: pycli_mcp.server.CommandMCPServer
6
+
7
+ ::: pycli_mcp.metadata.query.CommandQuery
8
+ options:
9
+ show_source: false
@@ -0,0 +1,60 @@
1
+ /* FiraCode https://github.com/tonsky/FiraCode */
2
+ code { font-family: 'Fira Code', monospace; }
3
+ @supports (font-variation-settings: normal) {
4
+ code { font-family: 'Fira Code VF', monospace; }
5
+ }
6
+
7
+ /* https://github.com/squidfunk/mkdocs-material/issues/1522 */
8
+ .md-typeset h5 {
9
+ color: var(--md-default-fg-color);
10
+ text-transform: none;
11
+ }
12
+
13
+ /* https://github.com/squidfunk/mkdocs-material/discussions/6909#discussioncomment-8788221 */
14
+ .md-typeset ol ol, .md-typeset ul ol {
15
+ list-style-type: decimal;
16
+ }
17
+
18
+ /* Fancier color for operators such as * and |. */
19
+ .doc-signature .o {
20
+ color: var(--md-code-hl-special-color);
21
+ }
22
+
23
+ /* Fancier color for constants such as None, True, and False. */
24
+ .doc-signature .kc {
25
+ color: var(--md-code-hl-constant-color);
26
+ }
27
+
28
+ /* Fancier color for built-in types (only useful when cross-references are used). */
29
+ .doc-signature .n > a[href^="https://docs.python.org/"][href*="/functions.html#"],
30
+ .doc-signature .n > a[href^="https://docs.python.org/"][href*="/stdtypes.html#"] {
31
+ color: var(--md-code-hl-constant-color);
32
+ }
33
+
34
+ /* Indentation. */
35
+ div.doc-contents:not(.first) {
36
+ padding-left: 25px;
37
+ border-left: .05rem solid var(--md-typeset-table-color);
38
+ }
39
+
40
+ /* Mark external links as such. */
41
+ a.external::after,
42
+ a.autorefs-external::after {
43
+ /* https://primer.style/octicons/arrow-up-right-24 */
44
+ mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.25 15.5a.75.75 0 00.75-.75v-9a.75.75 0 00-.75-.75h-9a.75.75 0 000 1.5h7.19L6.22 16.72a.75.75 0 101.06 1.06L17.5 7.56v7.19c0 .414.336.75.75.75z"></path></svg>');
45
+ -webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.25 15.5a.75.75 0 00.75-.75v-9a.75.75 0 00-.75-.75h-9a.75.75 0 000 1.5h7.19L6.22 16.72a.75.75 0 101.06 1.06L17.5 7.56v7.19c0 .414.336.75.75.75z"></path></svg>');
46
+ content: ' ';
47
+
48
+ display: inline-block;
49
+ vertical-align: middle;
50
+ position: relative;
51
+
52
+ height: 1em;
53
+ width: 1em;
54
+ background-color: currentColor;
55
+ }
56
+
57
+ a.external:hover::after,
58
+ a.autorefs-external:hover::after {
59
+ background-color: var(--md-accent-fg-color);
60
+ }
@@ -0,0 +1,49 @@
1
+ # Changelog
2
+
3
+ -----
4
+
5
+ All notable changes to this project will be documented in this file.
6
+
7
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
+
9
+ ## Unreleased
10
+
11
+ ## 0.2.0 - 2025-06-28
12
+
13
+ ***Changed:***
14
+
15
+ - Rename the project to `pycli-mcp`
16
+ - Rename `ClickCommandQuery` to `CommandQuery`
17
+ - Rename `ClickMCPServer` to `CommandMCPServer`
18
+
19
+ ## 0.1.0 - 2025-06-26
20
+
21
+ ***Changed:***
22
+
23
+ - The default aggregation level is now `root`
24
+
25
+ ***Added:***
26
+
27
+ - Add support for controlling the level of command aggregation
28
+ - Increase verbosity of the CLI
29
+
30
+ ***Fixed:***
31
+
32
+ - Server errors now properly return the content of the command's `stderr`
33
+
34
+ ## 0.0.2 - 2025-06-24
35
+
36
+ ***Added:***
37
+
38
+ - Add support for customizing the root command name
39
+ - Add support for more option types
40
+ - Add support for strict type checking
41
+
42
+ ***Fixed:***
43
+
44
+ - Fix options with dynamic default values
45
+ - The CLI now errors for specs that don't refer to a Click command object
46
+
47
+ ## 0.0.1 - 2025-06-24
48
+
49
+ This is the initial public release.
@@ -0,0 +1,10 @@
1
+ # CLI reference
2
+
3
+ -----
4
+
5
+ ::: mkdocs-click
6
+ :module: pycli_mcp.cli
7
+ :command: pycli_mcp
8
+ :depth: 1
9
+ :style: table
10
+ :remove_ascii_art: true
@@ -0,0 +1,26 @@
1
+ # PyCLI MCP
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | CI/CD | [![CI - Test](https://github.com/ofek/pycli-mcp/actions/workflows/test.yml/badge.svg){ loading=lazy .off-glb }](https://github.com/ofek/pycli-mcp/actions/workflows/test.yml) [![CD - Build](https://github.com/ofek/pycli-mcp/actions/workflows/build.yml/badge.svg){ loading=lazy .off-glb }](https://github.com/ofek/pycli-mcp/actions/workflows/build.yml) |
6
+ | Docs | [![CI - Docs](https://github.com/ofek/pycli-mcp/actions/workflows/docs.yml/badge.svg){ loading=lazy .off-glb }](https://github.com/ofek/pycli-mcp/actions/workflows/docs.yml) |
7
+ | Package | [![PyPI - Version](https://img.shields.io/pypi/v/pycli-mcp.svg?logo=pypi&label=PyPI&logoColor=gold){ loading=lazy .off-glb }](https://pypi.org/project/pycli-mcp/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pycli-mcp.svg?logo=python&label=Python&logoColor=gold){ loading=lazy .off-glb }](https://pypi.org/project/pycli-mcp/) |
8
+ | Meta | [![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg){ loading=lazy .off-glb }](https://github.com/ofek/pycli-mcp) [![linting - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json){ loading=lazy .off-glb }](https://github.com/astral-sh/ruff) [![License - MIT](https://img.shields.io/badge/license-MIT-9400d3.svg){ loading=lazy .off-glb }](https://spdx.org/licenses/) [![GitHub Sponsors](https://img.shields.io/github/sponsors/ofek?logo=GitHub%20Sponsors&style=social){ loading=lazy .off-glb }](https://github.com/sponsors/ofek) |
9
+
10
+ -----
11
+
12
+ This provides an extensible [MCP](https://modelcontextprotocol.io) server that is compatible with any Python command line application.
13
+
14
+ Supported frameworks:
15
+
16
+ - [Click](https://github.com/pallets/click)
17
+
18
+ ## Navigation
19
+
20
+ Desktop readers can use keyboard shortcuts to navigate.
21
+
22
+ | Keys | Action |
23
+ | --- | --- |
24
+ | <ul><li><kbd>,</kbd> (comma)</li><li><kbd>p</kbd></li></ul> | Navigate to the "previous" page |
25
+ | <ul><li><kbd>.</kbd> (period)</li><li><kbd>n</kbd></li></ul> | Navigate to the "next" page |
26
+ | <ul><li><kbd>/</kbd></li><li><kbd>s</kbd></li></ul> | Display the search modal |
@@ -0,0 +1,13 @@
1
+ # Installation
2
+
3
+ -----
4
+
5
+ `pycli-mcp` is available on PyPI and can be installed with a package manager like [pip](https://github.com/pypa/pip).
6
+
7
+ ```
8
+ pip install pycli-mcp
9
+ ```
10
+
11
+ /// note
12
+ Applications that are exposed by the server must be installed in the same environment or the `PYTHONPATH` environment variable must be set appropriately.
13
+ ///
@@ -0,0 +1,50 @@
1
+ [envs.default]
2
+ installer = "uv"
3
+
4
+ [envs.hatch-static-analysis]
5
+ config-path = "ruff_defaults.toml"
6
+ dependencies = ["ruff==0.9.9"]
7
+
8
+ [envs.hatch-test]
9
+ extra-dependencies = [
10
+ "click",
11
+ ]
12
+
13
+ [envs.types]
14
+ extra-dependencies = [
15
+ "mypy",
16
+ "pytest",
17
+ ]
18
+ [envs.types.scripts]
19
+ check = "mypy --install-types --non-interactive {args:src/pycli_mcp tests}"
20
+
21
+ [envs.docs]
22
+ dependencies = [
23
+ "mkdocs~=1.6.1",
24
+ "mkdocs-material~=9.6.14",
25
+ # Plugins
26
+ "mkdocs-minify-plugin~=0.8.0",
27
+ # https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/issues/181
28
+ "mkdocs-git-revision-date-localized-plugin~=1.3.0",
29
+ "mkdocs-glightbox~=0.4.0",
30
+ "mkdocstrings-python~=1.16.12",
31
+ # Extensions
32
+ "mkdocs-click~=0.9.0",
33
+ "pymdown-extensions~=10.16",
34
+ "ruff==0.9.9",
35
+ # Necessary for syntax highlighting in code blocks
36
+ "pygments~=2.19.2",
37
+ # Validation
38
+ "linkchecker~=10.5.0",
39
+ ]
40
+ [envs.docs.env-vars]
41
+ SOURCE_DATE_EPOCH = "1580601600"
42
+ [envs.docs.scripts]
43
+ build = "mkdocs build --clean --strict {args}"
44
+ serve = "mkdocs serve --dev-addr localhost:8000 {args}"
45
+ validate = "linkchecker --config .linkcheckerrc site"
46
+ # https://github.com/linkchecker/linkchecker/issues/678
47
+ build-check = [
48
+ "build --no-directory-urls",
49
+ "validate",
50
+ ]