cloudsmith-cli 1.11.0__tar.gz → 1.12.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 (126) hide show
  1. {cloudsmith_cli-1.11.0/cloudsmith_cli.egg-info → cloudsmith_cli-1.12.0}/PKG-INFO +3 -6
  2. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/README.md +1 -1
  3. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/__init__.py +0 -1
  4. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/main.py +22 -12
  5. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/metrics/entitlements.py +1 -1
  6. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/metrics/packages.py +1 -1
  7. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/upstream.py +1 -0
  8. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/config.py +1 -32
  9. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/decorators.py +3 -47
  10. cloudsmith_cli-1.12.0/cloudsmith_cli/cli/tests/commands/test_main.py +54 -0
  11. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/tests/commands/test_repos.py +3 -3
  12. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/ratelimits.py +1 -1
  13. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/tests/test_init.py +1 -1
  14. cloudsmith_cli-1.12.0/cloudsmith_cli/data/VERSION +1 -0
  15. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0/cloudsmith_cli.egg-info}/PKG-INFO +3 -6
  16. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli.egg-info/SOURCES.txt +0 -5
  17. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli.egg-info/requires.txt +1 -3
  18. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/setup.py +1 -4
  19. cloudsmith_cli-1.11.0/cloudsmith_cli/cli/commands/mcp.py +0 -424
  20. cloudsmith_cli-1.11.0/cloudsmith_cli/cli/tests/commands/test_main.py +0 -26
  21. cloudsmith_cli-1.11.0/cloudsmith_cli/cli/tests/commands/test_mcp.py +0 -357
  22. cloudsmith_cli-1.11.0/cloudsmith_cli/core/mcp/data.py +0 -17
  23. cloudsmith_cli-1.11.0/cloudsmith_cli/core/mcp/server.py +0 -779
  24. cloudsmith_cli-1.11.0/cloudsmith_cli/core/tests/__init__.py +0 -0
  25. cloudsmith_cli-1.11.0/cloudsmith_cli/data/VERSION +0 -1
  26. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/LICENSE +0 -0
  27. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/MANIFEST.in +0 -0
  28. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/__init__.py +0 -0
  29. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/__main__.py +0 -0
  30. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/__init__.py +0 -0
  31. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/command.py +0 -0
  32. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/auth.py +0 -0
  33. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/check.py +0 -0
  34. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/copy.py +0 -0
  35. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/delete.py +0 -0
  36. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/dependencies.py +0 -0
  37. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/docs.py +0 -0
  38. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/download.py +0 -0
  39. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/entitlements.py +0 -0
  40. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/help_.py +0 -0
  41. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/list_.py +0 -0
  42. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/login.py +0 -0
  43. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/metrics/__init__.py +0 -0
  44. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/metrics/command.py +0 -0
  45. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/move.py +0 -0
  46. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/policy/__init__.py +0 -0
  47. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/policy/command.py +0 -0
  48. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/policy/deny.py +0 -0
  49. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/policy/license.py +0 -0
  50. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/policy/vulnerability.py +0 -0
  51. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/push.py +0 -0
  52. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/quarantine.py +0 -0
  53. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/quota/__init__.py +0 -0
  54. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/quota/command.py +0 -0
  55. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/quota/history.py +0 -0
  56. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/quota/quota.py +0 -0
  57. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/repos.py +0 -0
  58. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/resync.py +0 -0
  59. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/status.py +0 -0
  60. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/tags.py +0 -0
  61. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/tokens.py +0 -0
  62. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/commands/whoami.py +0 -0
  63. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/exceptions.py +0 -0
  64. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/saml.py +0 -0
  65. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/table.py +0 -0
  66. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/tests/__init__.py +0 -0
  67. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/tests/commands/__init__.py +0 -0
  68. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/tests/commands/policy/__init__.py +0 -0
  69. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/tests/commands/policy/test_deny.py +0 -0
  70. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/tests/commands/policy/test_licence.py +0 -0
  71. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/tests/commands/policy/test_vulnerability.py +0 -0
  72. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/tests/commands/test_check.py +0 -0
  73. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/tests/commands/test_download.py +0 -0
  74. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/tests/commands/test_entitlements.py +0 -0
  75. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/tests/commands/test_login.py +0 -0
  76. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/tests/commands/test_package_commands.py +0 -0
  77. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/tests/commands/test_tokens.py +0 -0
  78. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/tests/commands/test_upstream.py +0 -0
  79. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/tests/conftest.py +0 -0
  80. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/tests/test_push.py +0 -0
  81. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/tests/test_saml.py +0 -0
  82. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/tests/test_utils.py +0 -0
  83. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/tests/utils.py +0 -0
  84. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/types.py +0 -0
  85. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/utils.py +0 -0
  86. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/validators.py +0 -0
  87. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/cli/webserver.py +0 -0
  88. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/__init__.py +0 -0
  89. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/api/__init__.py +0 -0
  90. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/api/distros.py +0 -0
  91. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/api/entitlements.py +0 -0
  92. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/api/exceptions.py +0 -0
  93. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/api/files.py +0 -0
  94. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/api/init.py +0 -0
  95. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/api/metrics.py +0 -0
  96. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/api/orgs.py +0 -0
  97. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/api/packages.py +0 -0
  98. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/api/quota.py +0 -0
  99. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/api/rates.py +0 -0
  100. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/api/repos.py +0 -0
  101. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/api/status.py +0 -0
  102. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/api/upstreams.py +0 -0
  103. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/api/user.py +0 -0
  104. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/api/version.py +0 -0
  105. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/config.py +0 -0
  106. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/download.py +0 -0
  107. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/keyring.py +0 -0
  108. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/pagination.py +0 -0
  109. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/rest.py +0 -0
  110. {cloudsmith_cli-1.11.0/cloudsmith_cli/core/mcp → cloudsmith_cli-1.12.0/cloudsmith_cli/core/tests}/__init__.py +0 -0
  111. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/tests/test_download.py +0 -0
  112. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/tests/test_keyring.py +0 -0
  113. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/tests/test_rest.py +0 -0
  114. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/tests/test_version.py +0 -0
  115. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/utils.py +0 -0
  116. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/core/version.py +0 -0
  117. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/data/config.ini +0 -0
  118. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/data/credentials.ini +0 -0
  119. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/templates/__init__.py +0 -0
  120. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/templates/auth_error.html +0 -0
  121. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli/templates/auth_success.html +0 -0
  122. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli.egg-info/dependency_links.txt +0 -0
  123. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli.egg-info/entry_points.txt +0 -0
  124. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli.egg-info/not-zip-safe +0 -0
  125. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/cloudsmith_cli.egg-info/top_level.txt +0 -0
  126. {cloudsmith_cli-1.11.0 → cloudsmith_cli-1.12.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cloudsmith-cli
3
- Version: 1.11.0
3
+ Version: 1.12.0
4
4
  Summary: Cloudsmith Command-Line Interface (CLI)
5
5
  Home-page: https://github.com/cloudsmith-io/cloudsmith-cli
6
6
  Author: Cloudsmith Ltd
@@ -15,7 +15,6 @@ Classifier: Intended Audience :: System Administrators
15
15
  Classifier: License :: OSI Approved :: Apache Software License
16
16
  Classifier: Operating System :: POSIX :: Linux
17
17
  Classifier: Programming Language :: Python
18
- Classifier: Programming Language :: Python :: 3.9
19
18
  Classifier: Programming Language :: Python :: 3.10
20
19
  Classifier: Programming Language :: Python :: 3.11
21
20
  Classifier: Programming Language :: Python :: 3.12
@@ -31,10 +30,8 @@ Requires-Dist: click!=8.3.0,>=8.1.8
31
30
  Requires-Dist: click-configfile>=0.2.3
32
31
  Requires-Dist: click-didyoumean>=0.0.3
33
32
  Requires-Dist: click-spinner>=0.1.7
34
- Requires-Dist: cloudsmith-api<3.0,>=2.0.22
33
+ Requires-Dist: cloudsmith-api<3.0,>=2.0.24
35
34
  Requires-Dist: keyring>=25.4.1
36
- Requires-Dist: mcp==1.9.1
37
- Requires-Dist: toon-python==0.1.2
38
35
  Requires-Dist: requests>=2.18.4
39
36
  Requires-Dist: requests_toolbelt>=1.0.0
40
37
  Requires-Dist: semver>=2.7.9
@@ -58,7 +55,7 @@ Dynamic: summary
58
55
  [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/badges/version/cloudsmith/cli/python/cloudsmith-cli/latest/xf=bdist_wheel;xn=cloudsmith-cli;xv=py2.py3/?render=true)](https://cloudsmith.io/~cloudsmith/repos/cli/packages/detail/python/cloudsmith-cli/latest/xf=bdist_wheel;xn=cloudsmith-cli;xv=py2.py3/)
59
56
  [![Python Versions](https://img.shields.io/pypi/pyversions/cloudsmith-cli.svg)](https://pypi.python.org/pypi/cloudsmith-cli)
60
57
  [![PyPI Version](https://img.shields.io/pypi/v/cloudsmith-cli.svg)](https://pypi.python.org/pypi/cloudsmith-cli)
61
- [![CircleCI](https://circleci.com/gh/cloudsmith-io/cloudsmith-cli.svg?style=svg)](https://circleci.com/gh/cloudsmith-io/cloudsmith-cli)
58
+ [![GitHub Actions](https://github.com/cloudsmith-io/cloudsmith-cli/actions/workflows/test.yml/badge.svg)](https://github.com/cloudsmith-io/cloudsmith-cli/actions/workflows/test.yml)
62
59
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
63
60
 
64
61
 
@@ -3,7 +3,7 @@
3
3
  [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/badges/version/cloudsmith/cli/python/cloudsmith-cli/latest/xf=bdist_wheel;xn=cloudsmith-cli;xv=py2.py3/?render=true)](https://cloudsmith.io/~cloudsmith/repos/cli/packages/detail/python/cloudsmith-cli/latest/xf=bdist_wheel;xn=cloudsmith-cli;xv=py2.py3/)
4
4
  [![Python Versions](https://img.shields.io/pypi/pyversions/cloudsmith-cli.svg)](https://pypi.python.org/pypi/cloudsmith-cli)
5
5
  [![PyPI Version](https://img.shields.io/pypi/v/cloudsmith-cli.svg)](https://pypi.python.org/pypi/cloudsmith-cli)
6
- [![CircleCI](https://circleci.com/gh/cloudsmith-io/cloudsmith-cli.svg?style=svg)](https://circleci.com/gh/cloudsmith-io/cloudsmith-cli)
6
+ [![GitHub Actions](https://github.com/cloudsmith-io/cloudsmith-cli/actions/workflows/test.yml/badge.svg)](https://github.com/cloudsmith-io/cloudsmith-cli/actions/workflows/test.yml)
7
7
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
8
8
 
9
9
 
@@ -12,7 +12,6 @@ from . import (
12
12
  help_,
13
13
  list_,
14
14
  login,
15
- mcp,
16
15
  metrics,
17
16
  move,
18
17
  policy,
@@ -5,22 +5,31 @@ import click
5
5
  from ...core.api.version import get_version as get_api_version
6
6
  from ...core.utils import get_github_website, get_help_website
7
7
  from ...core.version import get_version as get_cli_version
8
- from .. import command, decorators
8
+ from .. import command, decorators, utils
9
9
 
10
10
  CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"])
11
11
 
12
12
 
13
- def print_version():
13
+ def print_version(opts):
14
14
  """Print the environment versions."""
15
- click.echo("Versions:")
16
- click.secho(
17
- "CLI Package Version: %(version)s"
18
- % {"version": click.style(get_cli_version(), bold=True)}
19
- )
20
- click.secho(
21
- "API Package Version: %(version)s"
22
- % {"version": click.style(get_api_version(), bold=True)}
23
- )
15
+ cli_version = get_cli_version()
16
+ api_version = get_api_version()
17
+
18
+ data = {
19
+ "cli_version": cli_version,
20
+ "api_version": api_version,
21
+ }
22
+
23
+ if not utils.maybe_print_as_json(opts, data):
24
+ click.echo("Versions:")
25
+ click.secho(
26
+ "CLI Package Version: %(version)s"
27
+ % {"version": click.style(cli_version, bold=True)}
28
+ )
29
+ click.secho(
30
+ "API Package Version: %(version)s"
31
+ % {"version": click.style(api_version, bold=True)}
32
+ )
24
33
 
25
34
 
26
35
  @click.group(
@@ -52,12 +61,13 @@ For issues/contributing: %(github_website)s
52
61
  is_eager=True,
53
62
  )
54
63
  @decorators.common_cli_config_options
64
+ @decorators.common_cli_output_options
55
65
  @click.pass_context
56
66
  def main(ctx, opts, version):
57
67
  """Handle entrypoint to CLI."""
58
68
  # pylint: disable=unused-argument
59
69
 
60
70
  if version:
61
- print_version()
71
+ print_version(opts)
62
72
  elif ctx.invoked_subcommand is None:
63
73
  click.echo(ctx.get_help())
@@ -75,7 +75,7 @@ def _print_metrics_table(opts, data):
75
75
  type=str,
76
76
  required=False,
77
77
  help=(
78
- "A comma seperated list of entitlement token identifiers (i.e. slug_perm) or "
78
+ "A comma separated list of entitlement token identifiers (i.e. slug_perm) or "
79
79
  "token secrets. If a list is not specified then all entitlement tokens will "
80
80
  "be included for a given namespace or repository."
81
81
  ),
@@ -74,7 +74,7 @@ def _print_metrics_table(opts, data):
74
74
  type=str,
75
75
  required=False,
76
76
  help=(
77
- "A comma seperated list of package identifiers (i.e. slug_perm). "
77
+ "A comma separated list of package identifiers (i.e. slug_perm). "
78
78
  "If a list is not specified then all package will be included for "
79
79
  "a given repository."
80
80
  ),
@@ -24,6 +24,7 @@ UPSTREAM_FORMATS = [
24
24
  "dart",
25
25
  "deb",
26
26
  "docker",
27
+ "generic",
27
28
  "go",
28
29
  "helm",
29
30
  "hex",
@@ -64,8 +64,6 @@ class ConfigSchema:
64
64
  api_proxy = ConfigParam(name="api_proxy", type=str)
65
65
  api_ssl_verify = ConfigParam(name="api_ssl_verify", type=bool, default=True)
66
66
  api_user_agent = ConfigParam(name="api_user_agent", type=str)
67
- mcp_allowed_tools = ConfigParam(name="mcp_allowed_tools", type=str)
68
- mcp_allowed_tool_groups = ConfigParam(name="mcp_allowed_tool_groups", type=str)
69
67
 
70
68
  @matches_section("profile:*")
71
69
  class Profile(Default):
@@ -97,7 +95,7 @@ class ConfigReader(ConfigFileReader):
97
95
 
98
96
  @classmethod
99
97
  def get_default_filepath(cls):
100
- """Get the default filepath for the configuratin file."""
98
+ """Get the default filepath for the configuration file."""
101
99
  if not cls.config_files:
102
100
  return None
103
101
  if not cls.config_searchpath:
@@ -350,35 +348,6 @@ class Options:
350
348
  """Set value for debug flag."""
351
349
  self._set_option("debug", bool(value))
352
350
 
353
- @property
354
- def mcp_allowed_tools(self):
355
- """Get value for Allowed MCP Tools."""
356
- return self._get_option("mcp_allowed_tools")
357
-
358
- @mcp_allowed_tools.setter
359
- def mcp_allowed_tools(self, value):
360
- """Set value for Allowed MCP Tools."""
361
-
362
- if not value:
363
- return
364
- tools = value.split(",")
365
-
366
- self._set_option("mcp_allowed_tools", tools)
367
-
368
- @property
369
- def mcp_allowed_tool_groups(self):
370
- """Get value for Allowed MCP Tool Groups."""
371
- return self._get_option("mcp_allowed_tool_groups")
372
-
373
- @mcp_allowed_tool_groups.setter
374
- def mcp_allowed_tool_groups(self, value):
375
- """Set value for Allowed MCP Tool Groups."""
376
- if not value:
377
- return
378
- tool_groups = value.split(",")
379
-
380
- self._set_option("mcp_allowed_tool_groups", tool_groups)
381
-
382
351
  @property
383
352
  def output(self):
384
353
  """Get value for output format."""
@@ -7,7 +7,6 @@ import click
7
7
  from cloudsmith_cli.cli import validators
8
8
 
9
9
  from ..core.api.init import initialise_api as _initialise_api
10
- from ..core.mcp import server
11
10
  from . import config, utils
12
11
 
13
12
 
@@ -94,15 +93,9 @@ def common_cli_config_options(f):
94
93
  def wrapper(ctx, *args, **kwargs):
95
94
  # pylint: disable=missing-docstring
96
95
  opts = config.get_or_create_options(ctx)
97
- profile = kwargs.pop("profile") or ctx.meta.get("profile")
98
- config_file = kwargs.pop("config_file") or ctx.meta.get("config_file")
99
- creds_file = kwargs.pop("credentials_file") or ctx.meta.get("creds_file")
100
-
101
- # Store in context for subcommands to inherit
102
- ctx.meta["profile"] = profile
103
- ctx.meta["config_file"] = config_file
104
- ctx.meta["creds_file"] = creds_file
105
-
96
+ profile = kwargs.pop("profile")
97
+ config_file = kwargs.pop("config_file")
98
+ creds_file = kwargs.pop("credentials_file")
106
99
  opts.load_config_file(path=config_file, profile=profile)
107
100
  opts.load_creds_file(path=creds_file, profile=profile)
108
101
  kwargs["opts"] = opts
@@ -337,40 +330,3 @@ def initialise_api(f):
337
330
  return ctx.invoke(f, *args, **kwargs)
338
331
 
339
332
  return wrapper
340
-
341
-
342
- def initialise_mcp(f):
343
- @click.option(
344
- "-a",
345
- "--all-tools",
346
- default=False,
347
- is_flag=True,
348
- help="Show all tools",
349
- )
350
- @click.option(
351
- "-d",
352
- "--allow-destructive-tools",
353
- default=False,
354
- is_flag=True,
355
- help="Allow destructive tools to be used",
356
- )
357
- @click.pass_context
358
- @functools.wraps(f)
359
- def wrapper(ctx, *args, **kwargs):
360
- opts = kwargs.get("opts")
361
-
362
- all_tools = kwargs.pop("all_tools")
363
- allow_destructive_tools = kwargs.pop("allow_destructive_tools")
364
-
365
- mcp_server = server.DynamicMCPServer(
366
- api_config=opts.api_config,
367
- debug_mode=opts.debug,
368
- allow_destructive_tools=allow_destructive_tools,
369
- allowed_tool_groups=opts.mcp_allowed_tool_groups,
370
- allowed_tools=opts.mcp_allowed_tools,
371
- force_all_tools=all_tools,
372
- )
373
- kwargs["mcp_server"] = mcp_server
374
- return ctx.invoke(f, *args, **kwargs)
375
-
376
- return wrapper
@@ -0,0 +1,54 @@
1
+ import json
2
+
3
+ import pytest
4
+
5
+ from ....core.api.version import get_version as get_api_version
6
+ from ....core.version import get_version
7
+ from ...commands.main import main
8
+
9
+
10
+ class TestMainCommand:
11
+ @pytest.mark.parametrize("option", ["-V", "--version"])
12
+ def test_main_version(self, runner, option):
13
+ """Test the output of `cloudsmith --version`."""
14
+ result = runner.invoke(main, [option])
15
+ assert result.exit_code == 0
16
+ assert (
17
+ result.output == "Versions:\n"
18
+ "CLI Package Version: " + get_version() + "\n"
19
+ "API Package Version: " + get_api_version() + "\n"
20
+ )
21
+
22
+ @pytest.mark.parametrize("option", ["-V", "--version"])
23
+ @pytest.mark.parametrize(
24
+ "format_option,format_value",
25
+ [("-F", "json"), ("--output-format", "json")],
26
+ )
27
+ def test_main_version_json(self, runner, option, format_option, format_value):
28
+ """Test the JSON output of `cloudsmith --version --output-format json`."""
29
+ result = runner.invoke(main, [option, format_option, format_value])
30
+ assert result.exit_code == 0
31
+ output = json.loads(result.output)
32
+ assert "data" in output
33
+ assert output["data"]["cli_version"] == get_version()
34
+ assert output["data"]["api_version"] == get_api_version()
35
+
36
+ @pytest.mark.parametrize("option", ["-V", "--version"])
37
+ def test_main_version_pretty_json(self, runner, option):
38
+ """Test the pretty JSON output of `cloudsmith --version --output-format pretty_json`."""
39
+ result = runner.invoke(main, [option, "--output-format", "pretty_json"])
40
+ assert result.exit_code == 0
41
+ output = json.loads(result.output)
42
+ assert "data" in output
43
+ assert output["data"]["cli_version"] == get_version()
44
+ assert output["data"]["api_version"] == get_api_version()
45
+ # Verify it's formatted with indentation
46
+ assert " " in result.output
47
+
48
+ @pytest.mark.parametrize("option", ["-h", "--help"])
49
+ def test_main_help(self, runner, option):
50
+ """Test the output of `cloudsmith --help`."""
51
+ result = runner.invoke(main, [option])
52
+ assert result.exit_code == 0
53
+ # TODO: assert something specific about output
54
+ assert result.output
@@ -35,13 +35,13 @@ def parse_table(output):
35
35
  Results: 1 repository visible
36
36
  ```
37
37
  """
38
- seperator = "|"
38
+ separator = "|"
39
39
  column_headers = []
40
40
  row_values = []
41
41
 
42
42
  for line in output.split("\n"):
43
- if seperator in line:
44
- raw_values = [raw_value.strip() for raw_value in line.split(seperator)]
43
+ if separator in line:
44
+ raw_values = [raw_value.strip() for raw_value in line.split(separator)]
45
45
  if not column_headers:
46
46
  # If we don't have keys yet, then this must be the column headers
47
47
  column_headers = raw_values
@@ -40,7 +40,7 @@ class RateLimitsInfo:
40
40
  info.remaining = int(data["remaining"])
41
41
  if "reset" in data:
42
42
  info.reset = datetime.datetime.utcfromtimestamp(int(data["reset"]))
43
- if "throtted" in data:
43
+ if "throttled" in data:
44
44
  info.throttled = bool(data["throttled"])
45
45
  else:
46
46
  info.throttled = info.remaining == 0
@@ -58,7 +58,7 @@ def mocked_update_refresh_attempted_at():
58
58
 
59
59
  class TestInitialiseApi:
60
60
  def setup_class(cls): # pylint: disable=no-self-argument
61
- # For the purposes of these tests, we need to explcitly call set_default(None) at the
61
+ # For the purposes of these tests, we need to explicitly call set_default(None) at the
62
62
  # outset because other tests in the suite may have called initialise_api() already.
63
63
  # Resetting Configuration._default to None here effectively reverts the
64
64
  # Configuration class to its vanilla, unmodified behaviour/state.
@@ -0,0 +1 @@
1
+ 1.12.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cloudsmith-cli
3
- Version: 1.11.0
3
+ Version: 1.12.0
4
4
  Summary: Cloudsmith Command-Line Interface (CLI)
5
5
  Home-page: https://github.com/cloudsmith-io/cloudsmith-cli
6
6
  Author: Cloudsmith Ltd
@@ -15,7 +15,6 @@ Classifier: Intended Audience :: System Administrators
15
15
  Classifier: License :: OSI Approved :: Apache Software License
16
16
  Classifier: Operating System :: POSIX :: Linux
17
17
  Classifier: Programming Language :: Python
18
- Classifier: Programming Language :: Python :: 3.9
19
18
  Classifier: Programming Language :: Python :: 3.10
20
19
  Classifier: Programming Language :: Python :: 3.11
21
20
  Classifier: Programming Language :: Python :: 3.12
@@ -31,10 +30,8 @@ Requires-Dist: click!=8.3.0,>=8.1.8
31
30
  Requires-Dist: click-configfile>=0.2.3
32
31
  Requires-Dist: click-didyoumean>=0.0.3
33
32
  Requires-Dist: click-spinner>=0.1.7
34
- Requires-Dist: cloudsmith-api<3.0,>=2.0.22
33
+ Requires-Dist: cloudsmith-api<3.0,>=2.0.24
35
34
  Requires-Dist: keyring>=25.4.1
36
- Requires-Dist: mcp==1.9.1
37
- Requires-Dist: toon-python==0.1.2
38
35
  Requires-Dist: requests>=2.18.4
39
36
  Requires-Dist: requests_toolbelt>=1.0.0
40
37
  Requires-Dist: semver>=2.7.9
@@ -58,7 +55,7 @@ Dynamic: summary
58
55
  [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/badges/version/cloudsmith/cli/python/cloudsmith-cli/latest/xf=bdist_wheel;xn=cloudsmith-cli;xv=py2.py3/?render=true)](https://cloudsmith.io/~cloudsmith/repos/cli/packages/detail/python/cloudsmith-cli/latest/xf=bdist_wheel;xn=cloudsmith-cli;xv=py2.py3/)
59
56
  [![Python Versions](https://img.shields.io/pypi/pyversions/cloudsmith-cli.svg)](https://pypi.python.org/pypi/cloudsmith-cli)
60
57
  [![PyPI Version](https://img.shields.io/pypi/v/cloudsmith-cli.svg)](https://pypi.python.org/pypi/cloudsmith-cli)
61
- [![CircleCI](https://circleci.com/gh/cloudsmith-io/cloudsmith-cli.svg?style=svg)](https://circleci.com/gh/cloudsmith-io/cloudsmith-cli)
58
+ [![GitHub Actions](https://github.com/cloudsmith-io/cloudsmith-cli/actions/workflows/test.yml/badge.svg)](https://github.com/cloudsmith-io/cloudsmith-cli/actions/workflows/test.yml)
62
59
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
63
60
 
64
61
 
@@ -36,7 +36,6 @@ cloudsmith_cli/cli/commands/help_.py
36
36
  cloudsmith_cli/cli/commands/list_.py
37
37
  cloudsmith_cli/cli/commands/login.py
38
38
  cloudsmith_cli/cli/commands/main.py
39
- cloudsmith_cli/cli/commands/mcp.py
40
39
  cloudsmith_cli/cli/commands/move.py
41
40
  cloudsmith_cli/cli/commands/push.py
42
41
  cloudsmith_cli/cli/commands/quarantine.py
@@ -72,7 +71,6 @@ cloudsmith_cli/cli/tests/commands/test_download.py
72
71
  cloudsmith_cli/cli/tests/commands/test_entitlements.py
73
72
  cloudsmith_cli/cli/tests/commands/test_login.py
74
73
  cloudsmith_cli/cli/tests/commands/test_main.py
75
- cloudsmith_cli/cli/tests/commands/test_mcp.py
76
74
  cloudsmith_cli/cli/tests/commands/test_package_commands.py
77
75
  cloudsmith_cli/cli/tests/commands/test_repos.py
78
76
  cloudsmith_cli/cli/tests/commands/test_tokens.py
@@ -106,9 +104,6 @@ cloudsmith_cli/core/api/status.py
106
104
  cloudsmith_cli/core/api/upstreams.py
107
105
  cloudsmith_cli/core/api/user.py
108
106
  cloudsmith_cli/core/api/version.py
109
- cloudsmith_cli/core/mcp/__init__.py
110
- cloudsmith_cli/core/mcp/data.py
111
- cloudsmith_cli/core/mcp/server.py
112
107
  cloudsmith_cli/core/tests/__init__.py
113
108
  cloudsmith_cli/core/tests/test_download.py
114
109
  cloudsmith_cli/core/tests/test_init.py
@@ -2,10 +2,8 @@ click!=8.3.0,>=8.1.8
2
2
  click-configfile>=0.2.3
3
3
  click-didyoumean>=0.0.3
4
4
  click-spinner>=0.1.7
5
- cloudsmith-api<3.0,>=2.0.22
5
+ cloudsmith-api<3.0,>=2.0.24
6
6
  keyring>=25.4.1
7
- mcp==1.9.1
8
- toon-python==0.1.2
9
7
  requests>=2.18.4
10
8
  requests_toolbelt>=1.0.0
11
9
  semver>=2.7.9
@@ -53,10 +53,8 @@ setup(
53
53
  "click-configfile>=0.2.3",
54
54
  "click-didyoumean>=0.0.3",
55
55
  "click-spinner>=0.1.7",
56
- "cloudsmith-api>=2.0.22,<3.0", # Compatible upto (but excluding) 3.0+
56
+ "cloudsmith-api>=2.0.24,<3.0", # Compatible upto (but excluding) 3.0+
57
57
  "keyring>=25.4.1",
58
- "mcp==1.9.1",
59
- "toon-python==0.1.2",
60
58
  "requests>=2.18.4",
61
59
  "requests_toolbelt>=1.0.0",
62
60
  "semver>=2.7.9",
@@ -81,7 +79,6 @@ setup(
81
79
  "License :: OSI Approved :: Apache Software License",
82
80
  "Operating System :: POSIX :: Linux",
83
81
  "Programming Language :: Python",
84
- "Programming Language :: Python :: 3.9",
85
82
  "Programming Language :: Python :: 3.10",
86
83
  "Programming Language :: Python :: 3.11",
87
84
  "Programming Language :: Python :: 3.12",