datex-studio-cli 0.1.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 (52) hide show
  1. datex_studio_cli-0.1.0/.gitignore +71 -0
  2. datex_studio_cli-0.1.0/PKG-INFO +172 -0
  3. datex_studio_cli-0.1.0/README.md +135 -0
  4. datex_studio_cli-0.1.0/pyproject.toml +126 -0
  5. datex_studio_cli-0.1.0/src/dxs/__init__.py +4 -0
  6. datex_studio_cli-0.1.0/src/dxs/__main__.py +6 -0
  7. datex_studio_cli-0.1.0/src/dxs/cli.py +381 -0
  8. datex_studio_cli-0.1.0/src/dxs/commands/__init__.py +1 -0
  9. datex_studio_cli-0.1.0/src/dxs/commands/api.py +135 -0
  10. datex_studio_cli-0.1.0/src/dxs/commands/auth.py +431 -0
  11. datex_studio_cli-0.1.0/src/dxs/commands/branch.py +890 -0
  12. datex_studio_cli-0.1.0/src/dxs/commands/config.py +118 -0
  13. datex_studio_cli-0.1.0/src/dxs/commands/crm.py +1230 -0
  14. datex_studio_cli-0.1.0/src/dxs/commands/devops.py +245 -0
  15. datex_studio_cli-0.1.0/src/dxs/commands/document.py +2084 -0
  16. datex_studio_cli-0.1.0/src/dxs/commands/explore.py +2882 -0
  17. datex_studio_cli-0.1.0/src/dxs/commands/marketplace.py +220 -0
  18. datex_studio_cli-0.1.0/src/dxs/commands/organization.py +151 -0
  19. datex_studio_cli-0.1.0/src/dxs/commands/repo.py +472 -0
  20. datex_studio_cli-0.1.0/src/dxs/commands/source.py +3063 -0
  21. datex_studio_cli-0.1.0/src/dxs/core/__init__.py +1 -0
  22. datex_studio_cli-0.1.0/src/dxs/core/api/__init__.py +67 -0
  23. datex_studio_cli-0.1.0/src/dxs/core/api/client.py +299 -0
  24. datex_studio_cli-0.1.0/src/dxs/core/api/endpoints.py +254 -0
  25. datex_studio_cli-0.1.0/src/dxs/core/api/models.py +507 -0
  26. datex_studio_cli-0.1.0/src/dxs/core/auth/__init__.py +13 -0
  27. datex_studio_cli-0.1.0/src/dxs/core/auth/decorators.py +105 -0
  28. datex_studio_cli-0.1.0/src/dxs/core/auth/msal_client.py +445 -0
  29. datex_studio_cli-0.1.0/src/dxs/core/auth/token_cache.py +216 -0
  30. datex_studio_cli-0.1.0/src/dxs/core/cache.py +493 -0
  31. datex_studio_cli-0.1.0/src/dxs/core/devops/__init__.py +9 -0
  32. datex_studio_cli-0.1.0/src/dxs/core/devops/client.py +356 -0
  33. datex_studio_cli-0.1.0/src/dxs/core/devops/models.py +140 -0
  34. datex_studio_cli-0.1.0/src/dxs/core/dynamics/__init__.py +7 -0
  35. datex_studio_cli-0.1.0/src/dxs/core/dynamics/client.py +610 -0
  36. datex_studio_cli-0.1.0/src/dxs/core/graph.py +439 -0
  37. datex_studio_cli-0.1.0/src/dxs/core/output/__init__.py +5 -0
  38. datex_studio_cli-0.1.0/src/dxs/core/output/csv_fmt.py +137 -0
  39. datex_studio_cli-0.1.0/src/dxs/core/output/formatter.py +162 -0
  40. datex_studio_cli-0.1.0/src/dxs/core/output/json_fmt.py +44 -0
  41. datex_studio_cli-0.1.0/src/dxs/core/output/yaml_fmt.py +77 -0
  42. datex_studio_cli-0.1.0/src/dxs/core/responses.py +157 -0
  43. datex_studio_cli-0.1.0/src/dxs/models/__init__.py +1 -0
  44. datex_studio_cli-0.1.0/src/dxs/utils/__init__.py +47 -0
  45. datex_studio_cli-0.1.0/src/dxs/utils/click_options.py +165 -0
  46. datex_studio_cli-0.1.0/src/dxs/utils/config.py +212 -0
  47. datex_studio_cli-0.1.0/src/dxs/utils/errors.py +119 -0
  48. datex_studio_cli-0.1.0/src/dxs/utils/filtering.py +248 -0
  49. datex_studio_cli-0.1.0/src/dxs/utils/paths.py +38 -0
  50. datex_studio_cli-0.1.0/src/dxs/utils/resolvers.py +215 -0
  51. datex_studio_cli-0.1.0/src/dxs/utils/responses.py +117 -0
  52. datex_studio_cli-0.1.0/src/dxs/utils/sorting.py +118 -0
@@ -0,0 +1,71 @@
1
+ exclude/
2
+ exploration/
3
+
4
+ # Environment
5
+ .env
6
+ .env.local
7
+ .env.*.local
8
+
9
+ # Python
10
+ __pycache__/
11
+ *.py[cod]
12
+ *$py.class
13
+ *.so
14
+
15
+ # Distribution / packaging
16
+ .Python
17
+ build/
18
+ develop-eggs/
19
+ dist/
20
+ downloads/
21
+ eggs/
22
+ .eggs/
23
+ lib/
24
+ lib64/
25
+ parts/
26
+ sdist/
27
+ var/
28
+ wheels/
29
+ *.egg-info/
30
+ .installed.cfg
31
+ *.egg
32
+
33
+ # Virtual environments
34
+ .venv/
35
+ venv/
36
+ ENV/
37
+ env/
38
+
39
+ # IDE
40
+ .idea/
41
+ .vscode/
42
+ *.swp
43
+ *.swo
44
+ *~
45
+
46
+ # Testing
47
+ .tox/
48
+ .nox/
49
+ .coverage
50
+ .coverage.*
51
+ htmlcov/
52
+ .pytest_cache/
53
+ .hypothesis/
54
+
55
+ # Type checking
56
+ .mypy_cache/
57
+ .dmypy.json
58
+ dmypy.json
59
+
60
+ # Ruff
61
+ .ruff_cache/
62
+
63
+ # Documentation
64
+ docs/_build/
65
+
66
+ # Datex CLI config (for development)
67
+ # Don't ignore ~/.datex/ as it's outside the repo
68
+
69
+ # OS files
70
+ .DS_Store
71
+ Thumbs.db
@@ -0,0 +1,172 @@
1
+ Metadata-Version: 2.4
2
+ Name: datex-studio-cli
3
+ Version: 0.1.0
4
+ Summary: CLI for Datex Studio low-code platform, designed for LLM-based AI agents
5
+ Project-URL: Homepage, https://github.com/datex/datex-studio-cli
6
+ Project-URL: Documentation, https://github.com/datex/datex-studio-cli
7
+ Project-URL: Repository, https://github.com/datex/datex-studio-cli
8
+ Author: Datex
9
+ License-Expression: MIT
10
+ Keywords: ai,cli,datex,llm,low-code
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
21
+ Requires-Python: >=3.10
22
+ Requires-Dist: click>=8.1.0
23
+ Requires-Dist: httpx>=0.27.0
24
+ Requires-Dist: markdownify>=0.13.0
25
+ Requires-Dist: msal>=1.28.0
26
+ Requires-Dist: pydantic-settings>=2.0.0
27
+ Requires-Dist: pydantic>=2.5.0
28
+ Requires-Dist: pyyaml>=6.0
29
+ Provides-Extra: dev
30
+ Requires-Dist: mypy>=1.8.0; extra == 'dev'
31
+ Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
32
+ Requires-Dist: pytest-httpx>=0.30.0; extra == 'dev'
33
+ Requires-Dist: pytest>=8.0.0; extra == 'dev'
34
+ Requires-Dist: ruff>=0.4.0; extra == 'dev'
35
+ Requires-Dist: types-pyyaml>=6.0.0; extra == 'dev'
36
+ Description-Content-Type: text/markdown
37
+
38
+ # Datex Studio CLI (`dxs`)
39
+
40
+ Command-line interface for Datex Studio low-code platform, designed for LLM-based AI agents.
41
+
42
+ ## Installation
43
+
44
+ ```bash
45
+ # Using uv
46
+ uv pip install datex-studio-cli
47
+
48
+ # Using pip
49
+ pip install datex-studio-cli
50
+ ```
51
+
52
+ ## Quick Start
53
+
54
+ ```bash
55
+ # Authenticate with Azure Entra
56
+ dxs auth login
57
+
58
+ # View commit history
59
+ dxs source log --repo 10
60
+
61
+ # View configuration history
62
+ dxs source history userGrid --branch 100
63
+
64
+ # View current locks
65
+ dxs source locks --repo 10
66
+ ```
67
+
68
+ ## Output Formats
69
+
70
+ The CLI supports multiple output formats optimized for LLM consumption:
71
+
72
+ ```bash
73
+ # YAML (default)
74
+ dxs source log --repo 10
75
+
76
+ # JSON
77
+ dxs source log --repo 10 --output json
78
+
79
+ # CSV
80
+ dxs source log --repo 10 --output csv
81
+ ```
82
+
83
+ ## Configuration
84
+
85
+ Configuration is stored in `~/.datex/config.yaml`. You can also use environment variables:
86
+
87
+ ```bash
88
+ # Set via environment
89
+ export DXS_API_BASE_URL=https://api.datex.io
90
+ export DXS_DEFAULT_BRANCH=100
91
+ export DXS_DEFAULT_REPO=10
92
+
93
+ # Set via CLI
94
+ dxs config set api_base_url https://api.datex.io
95
+ dxs config set default_branch 100
96
+ dxs config set default_repo 10
97
+
98
+ # View configuration
99
+ dxs config list
100
+ ```
101
+
102
+ ## Commands
103
+
104
+ ### Authentication
105
+
106
+ - `dxs auth login` - Authenticate with Azure Entra
107
+ - `dxs auth logout` - Clear stored credentials
108
+ - `dxs auth status` - Show authentication status
109
+
110
+ ### Configuration
111
+
112
+ - `dxs config get <key>` - Get a configuration value
113
+ - `dxs config set <key> <value>` - Set a configuration value
114
+ - `dxs config list` - List all configuration values
115
+
116
+ ### Source Control
117
+
118
+ - `dxs source log` - Show commit history
119
+ - `dxs source history <ref>` - Show configuration version history
120
+ - `dxs source diff` - Show pending changes (draft vs last commit)
121
+ - `dxs source changes` - Show pending changes in detail
122
+ - `dxs source locks` - Show current lock status
123
+ - `dxs source deps` - Show configuration dependencies
124
+ - `dxs source compare` - Compare two branches
125
+
126
+ ### Exploration
127
+
128
+ - `dxs source explore info` - Show application overview
129
+ - `dxs source explore configs` - List all configurations
130
+ - `dxs source explore config <ref>` - View a specific configuration
131
+ - `dxs source explore summary <ref>` - Show structural summary
132
+ - `dxs source explore trace <ref>` - Show configuration dependencies
133
+
134
+ ### Branch & Repository Management
135
+
136
+ - `dxs source branch list` - List branches
137
+ - `dxs source branch show <id>` - Show branch details
138
+ - `dxs source repo list` - List repositories
139
+ - `dxs source repo show <id>` - Show repository details
140
+
141
+ ### Integrations
142
+
143
+ - `dxs devops workitem <id>` - Get Azure DevOps work item
144
+ - `dxs crm case <id>` - Get Dynamics CRM case
145
+ - `dxs organization list` - List organizations
146
+ - `dxs marketplace list` - List marketplace applications
147
+ - `dxs api <method> <url>` - Make raw API requests
148
+
149
+ ## Development
150
+
151
+ ```bash
152
+ # Clone and install
153
+ git clone https://github.com/datex/datex-studio-cli.git
154
+ cd datex-studio-cli
155
+ uv venv
156
+ source .venv/bin/activate
157
+ uv pip install -e ".[dev]"
158
+
159
+ # Run tests
160
+ pytest
161
+
162
+ # Lint and format
163
+ ruff check .
164
+ ruff format .
165
+
166
+ # Type check
167
+ mypy src/dxs
168
+ ```
169
+
170
+ ## License
171
+
172
+ MIT
@@ -0,0 +1,135 @@
1
+ # Datex Studio CLI (`dxs`)
2
+
3
+ Command-line interface for Datex Studio low-code platform, designed for LLM-based AI agents.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ # Using uv
9
+ uv pip install datex-studio-cli
10
+
11
+ # Using pip
12
+ pip install datex-studio-cli
13
+ ```
14
+
15
+ ## Quick Start
16
+
17
+ ```bash
18
+ # Authenticate with Azure Entra
19
+ dxs auth login
20
+
21
+ # View commit history
22
+ dxs source log --repo 10
23
+
24
+ # View configuration history
25
+ dxs source history userGrid --branch 100
26
+
27
+ # View current locks
28
+ dxs source locks --repo 10
29
+ ```
30
+
31
+ ## Output Formats
32
+
33
+ The CLI supports multiple output formats optimized for LLM consumption:
34
+
35
+ ```bash
36
+ # YAML (default)
37
+ dxs source log --repo 10
38
+
39
+ # JSON
40
+ dxs source log --repo 10 --output json
41
+
42
+ # CSV
43
+ dxs source log --repo 10 --output csv
44
+ ```
45
+
46
+ ## Configuration
47
+
48
+ Configuration is stored in `~/.datex/config.yaml`. You can also use environment variables:
49
+
50
+ ```bash
51
+ # Set via environment
52
+ export DXS_API_BASE_URL=https://api.datex.io
53
+ export DXS_DEFAULT_BRANCH=100
54
+ export DXS_DEFAULT_REPO=10
55
+
56
+ # Set via CLI
57
+ dxs config set api_base_url https://api.datex.io
58
+ dxs config set default_branch 100
59
+ dxs config set default_repo 10
60
+
61
+ # View configuration
62
+ dxs config list
63
+ ```
64
+
65
+ ## Commands
66
+
67
+ ### Authentication
68
+
69
+ - `dxs auth login` - Authenticate with Azure Entra
70
+ - `dxs auth logout` - Clear stored credentials
71
+ - `dxs auth status` - Show authentication status
72
+
73
+ ### Configuration
74
+
75
+ - `dxs config get <key>` - Get a configuration value
76
+ - `dxs config set <key> <value>` - Set a configuration value
77
+ - `dxs config list` - List all configuration values
78
+
79
+ ### Source Control
80
+
81
+ - `dxs source log` - Show commit history
82
+ - `dxs source history <ref>` - Show configuration version history
83
+ - `dxs source diff` - Show pending changes (draft vs last commit)
84
+ - `dxs source changes` - Show pending changes in detail
85
+ - `dxs source locks` - Show current lock status
86
+ - `dxs source deps` - Show configuration dependencies
87
+ - `dxs source compare` - Compare two branches
88
+
89
+ ### Exploration
90
+
91
+ - `dxs source explore info` - Show application overview
92
+ - `dxs source explore configs` - List all configurations
93
+ - `dxs source explore config <ref>` - View a specific configuration
94
+ - `dxs source explore summary <ref>` - Show structural summary
95
+ - `dxs source explore trace <ref>` - Show configuration dependencies
96
+
97
+ ### Branch & Repository Management
98
+
99
+ - `dxs source branch list` - List branches
100
+ - `dxs source branch show <id>` - Show branch details
101
+ - `dxs source repo list` - List repositories
102
+ - `dxs source repo show <id>` - Show repository details
103
+
104
+ ### Integrations
105
+
106
+ - `dxs devops workitem <id>` - Get Azure DevOps work item
107
+ - `dxs crm case <id>` - Get Dynamics CRM case
108
+ - `dxs organization list` - List organizations
109
+ - `dxs marketplace list` - List marketplace applications
110
+ - `dxs api <method> <url>` - Make raw API requests
111
+
112
+ ## Development
113
+
114
+ ```bash
115
+ # Clone and install
116
+ git clone https://github.com/datex/datex-studio-cli.git
117
+ cd datex-studio-cli
118
+ uv venv
119
+ source .venv/bin/activate
120
+ uv pip install -e ".[dev]"
121
+
122
+ # Run tests
123
+ pytest
124
+
125
+ # Lint and format
126
+ ruff check .
127
+ ruff format .
128
+
129
+ # Type check
130
+ mypy src/dxs
131
+ ```
132
+
133
+ ## License
134
+
135
+ MIT
@@ -0,0 +1,126 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "datex-studio-cli"
7
+ version = "0.1.0"
8
+ description = "CLI for Datex Studio low-code platform, designed for LLM-based AI agents"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.10"
12
+ authors = [
13
+ { name = "Datex" }
14
+ ]
15
+ keywords = ["cli", "datex", "low-code", "llm", "ai"]
16
+ classifiers = [
17
+ "Development Status :: 3 - Alpha",
18
+ "Environment :: Console",
19
+ "Intended Audience :: Developers",
20
+ "License :: OSI Approved :: MIT License",
21
+ "Operating System :: OS Independent",
22
+ "Programming Language :: Python :: 3",
23
+ "Programming Language :: Python :: 3.10",
24
+ "Programming Language :: Python :: 3.11",
25
+ "Programming Language :: Python :: 3.12",
26
+ "Topic :: Software Development :: Libraries :: Application Frameworks",
27
+ ]
28
+ dependencies = [
29
+ "click>=8.1.0",
30
+ "httpx>=0.27.0",
31
+ "markdownify>=0.13.0",
32
+ "msal>=1.28.0",
33
+ "pydantic>=2.5.0",
34
+ "pydantic-settings>=2.0.0",
35
+ "pyyaml>=6.0",
36
+ ]
37
+
38
+ [project.optional-dependencies]
39
+ dev = [
40
+ "pytest>=8.0.0",
41
+ "pytest-cov>=4.0.0",
42
+ "pytest-httpx>=0.30.0",
43
+ "ruff>=0.4.0",
44
+ "mypy>=1.8.0",
45
+ "types-PyYAML>=6.0.0",
46
+ ]
47
+
48
+ [project.scripts]
49
+ dxs = "dxs.cli:main"
50
+
51
+ [project.urls]
52
+ Homepage = "https://github.com/datex/datex-studio-cli"
53
+ Documentation = "https://github.com/datex/datex-studio-cli"
54
+ Repository = "https://github.com/datex/datex-studio-cli"
55
+
56
+ [tool.hatch.build.targets.wheel]
57
+ packages = ["src/dxs"]
58
+
59
+ [tool.hatch.build.targets.sdist]
60
+ exclude = [
61
+ ".claude/",
62
+ ".mypy_cache/",
63
+ ".pytest_cache/",
64
+ ".ruff_cache/",
65
+ ".serena/",
66
+ ".venv/",
67
+ ".gitignore",
68
+ "CLAUDE.md",
69
+ "documentation/",
70
+ "exploration/",
71
+ "exclude/",
72
+ "tests/",
73
+ "*.analysis.md",
74
+ "explore-*.md",
75
+ "uv.lock",
76
+ ]
77
+
78
+ [tool.ruff]
79
+ target-version = "py310"
80
+ line-length = 100
81
+ src = ["src", "tests"]
82
+
83
+ [tool.ruff.lint]
84
+ select = [
85
+ "E", # pycodestyle errors
86
+ "W", # pycodestyle warnings
87
+ "F", # Pyflakes
88
+ "I", # isort
89
+ "B", # flake8-bugbear
90
+ "C4", # flake8-comprehensions
91
+ "UP", # pyupgrade
92
+ ]
93
+ ignore = [
94
+ "E501", # line too long (handled by formatter)
95
+ ]
96
+
97
+ [tool.ruff.lint.isort]
98
+ known-first-party = ["dxs"]
99
+
100
+ [tool.mypy]
101
+ python_version = "3.10"
102
+ warn_return_any = true
103
+ warn_unused_configs = true
104
+ disallow_untyped_defs = true
105
+ plugins = ["pydantic.mypy"]
106
+
107
+ [[tool.mypy.overrides]]
108
+ module = ["msal.*"]
109
+ ignore_missing_imports = true
110
+
111
+ [tool.pytest.ini_options]
112
+ testpaths = ["tests"]
113
+ python_files = ["test_*.py"]
114
+ python_functions = ["test_*"]
115
+ addopts = "-v --tb=short"
116
+
117
+ [tool.coverage.run]
118
+ source = ["src/dxs"]
119
+ branch = true
120
+
121
+ [tool.coverage.report]
122
+ exclude_lines = [
123
+ "pragma: no cover",
124
+ "if TYPE_CHECKING:",
125
+ "raise NotImplementedError",
126
+ ]
@@ -0,0 +1,4 @@
1
+ """Datex Studio CLI - Command-line interface for Datex Studio platform."""
2
+
3
+ __version__ = "0.1.0"
4
+ __app_name__ = "dxs"
@@ -0,0 +1,6 @@
1
+ """Entry point for running dxs as a module: python -m dxs"""
2
+
3
+ from dxs.cli import cli
4
+
5
+ if __name__ == "__main__":
6
+ cli()