stata-cli 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.
@@ -0,0 +1,338 @@
1
+ Metadata-Version: 2.4
2
+ Name: stata-cli
3
+ Version: 0.2.0
4
+ Summary: Command-line interface for running Stata commands via PyStata
5
+ License: MIT
6
+ Keywords: stata,cli,statistics,data-science
7
+ Requires-Python: >=3.9
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: click>=8.0
10
+ Provides-Extra: data
11
+ Requires-Dist: numpy; extra == "data"
12
+ Requires-Dist: pandas; extra == "data"
13
+
14
+ # stata-cli
15
+
16
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
17
+ [![Python Version](https://img.shields.io/badge/python-%3E%3D3.9-blue.svg)](https://www.python.org/)
18
+ [![npm version](https://img.shields.io/npm/v/stata-cli.svg)](https://www.npmjs.com/package/stata-cli)
19
+
20
+ [中文版](README.zh.md) | [English](README.md)
21
+
22
+ A command-line interface for [Stata](https://www.stata.com/) via PyStata — built for humans and AI Agents. Run Stata code, `.do` files, view data, get help, and export graphs, all from the terminal. Includes a daemon mode for sub-second execution.
23
+
24
+ [Install](#installation--quick-start) · [AI Agent](#quick-start-ai-agent) · [Commands](#commands) · [Daemon](#daemon-mode) · [Advanced](#advanced-usage) · [Contributing](#contributing)
25
+
26
+ ## Why stata-cli?
27
+
28
+ - **Agent-Native Design** — Structured JSON output, exit codes, and a [SKILL.md](SKILL.md) definition out of the box — AI Agents can operate Stata with zero extra setup
29
+ - **Sub-Second Execution** — Daemon mode keeps PyStata alive in the background, reducing startup from ~2-3s to ~85ms (35x speedup)
30
+ - **Full Coverage** — Run code, execute `.do` files, view data, browse help, export graphs, interrupt execution — everything you need from one binary
31
+ - **AI-Friendly & Optimized** — Compact output mode, token limit management, structured JSON responses, and graph auto-naming — designed for Agent tool-use
32
+ - **Open Source, Zero Barriers** — MIT license, ready to use, just `pip install`
33
+ - **Up and Running in Seconds** — Auto-detects your Stata installation, from install to first command in 2 steps
34
+
35
+ ## Features
36
+
37
+ | Category | Capabilities |
38
+ |----------|-------------|
39
+ | **Run Code** | Execute inline Stata code, multi-line blocks, or pipe from stdin |
40
+ | **Do Files** | Run `.do` files with `///` line continuation support and graph auto-naming |
41
+ | **Data Viewer** | View current dataset as JSON with `if`-condition filtering and row limits |
42
+ | **Help System** | Browse Stata help topics with SMCL-to-plain-text conversion |
43
+ | **Graph Export** | Auto-detect and export graphs as PNG to `~/.stata-cli/graphs/` |
44
+ | **Daemon Mode** | Persistent background process for sub-second execution via Unix socket |
45
+ | **Output Control** | Compact mode, JSON output, token limit management with full-output file save |
46
+ | **Interruption** | Send break signal to stop long-running commands |
47
+
48
+ ## Installation & Quick Start
49
+
50
+ ### Requirements
51
+
52
+ - **Stata 17+** installed on your machine (provides the PyStata library)
53
+ - Python 3.9+
54
+
55
+ ### Quick Start (Human Users)
56
+
57
+ #### Install
58
+
59
+ Choose **one** of the following methods:
60
+
61
+ **Option 1 — From pip (recommended):**
62
+
63
+ ```bash
64
+ pip install stata-cli
65
+ ```
66
+
67
+ **Option 2 — From npm / npx (zero Python setup):**
68
+
69
+ ```bash
70
+ # One-shot usage
71
+ npx stata-cli run "display 1+1"
72
+
73
+ # Global install
74
+ npm install -g stata-cli
75
+ ```
76
+
77
+ The npm package is a thin wrapper that delegates to `uvx`, `pipx`, or `python3`.
78
+
79
+ **Option 3 — From source:**
80
+
81
+ ```bash
82
+ git clone https://github.com/ashuiGordon/stata-cli.git
83
+ cd stata-cli
84
+ pip install -e ".[data]"
85
+ ```
86
+
87
+ #### Use
88
+
89
+ ```bash
90
+ # 1. Verify Stata is detected
91
+ stata-cli detect
92
+
93
+ # 2. Run your first command
94
+ stata-cli run "display 1+1"
95
+
96
+ # 3. Start daemon for fast execution
97
+ stata-cli daemon start
98
+ stata-cli run "sysuse auto, clear" # ~85ms!
99
+ ```
100
+
101
+ ## Quick Start (AI Agent)
102
+
103
+ > The following steps are for AI Agents calling `stata-cli` via the Bash tool.
104
+
105
+ **Step 1 — Install**
106
+
107
+ ```bash
108
+ pip install stata-cli
109
+ ```
110
+
111
+ **Step 2 — Verify Stata path**
112
+
113
+ ```bash
114
+ stata-cli detect
115
+ ```
116
+
117
+ **Step 3 — Start daemon (recommended)**
118
+
119
+ ```bash
120
+ stata-cli daemon start
121
+ ```
122
+
123
+ **Step 4 — Run commands**
124
+
125
+ ```bash
126
+ # Inline code
127
+ stata-cli run "sysuse auto, clear
128
+ regress price mpg weight
129
+ predict yhat"
130
+
131
+ # Structured JSON output
132
+ stata-cli --json run "summarize price"
133
+
134
+ # View data
135
+ stata-cli data --if "price>10000" --rows 50
136
+
137
+ # Lookup command syntax
138
+ stata-cli help regress
139
+ ```
140
+
141
+ ## Commands
142
+
143
+ ### `run` — Execute Stata Code
144
+
145
+ ```bash
146
+ stata-cli run "sysuse auto, clear"
147
+
148
+ # Multi-line
149
+ stata-cli run "sysuse auto, clear
150
+ summarize price mpg
151
+ regress price mpg weight"
152
+
153
+ # Pipe from stdin
154
+ echo "display 42" | stata-cli run -
155
+ ```
156
+
157
+ ### `do` — Execute a .do File
158
+
159
+ ```bash
160
+ stata-cli do analysis.do
161
+ stata-cli --compact do long_script.do
162
+ ```
163
+
164
+ Do files are preprocessed: `///` line continuations are joined, and unnamed graph commands are auto-named for reliable export.
165
+
166
+ ### `data` — View Current Dataset
167
+
168
+ ```bash
169
+ stata-cli data
170
+ stata-cli data --if "price>5000" --rows 50
171
+ ```
172
+
173
+ Returns the current dataset as JSON with columns, data, types, and row counts.
174
+
175
+ ### `help` — Browse Stata Help
176
+
177
+ ```bash
178
+ stata-cli help regress
179
+ stata-cli help summarize
180
+ ```
181
+
182
+ Displays help as plain text (SMCL markup is automatically converted).
183
+
184
+ ### `stop` — Interrupt Execution
185
+
186
+ ```bash
187
+ stata-cli stop
188
+ ```
189
+
190
+ Sends a break signal to the running Stata command (daemon mode).
191
+
192
+ ### `detect` — Find Stata Installation
193
+
194
+ ```bash
195
+ stata-cli detect
196
+ ```
197
+
198
+ Prints the auto-detected Stata installation path.
199
+
200
+ ## Daemon Mode
201
+
202
+ The daemon keeps PyStata alive in the background — reduces execution time from **~2-3s to ~85ms** (35x speedup).
203
+
204
+ ```bash
205
+ stata-cli daemon start # Start background daemon
206
+ stata-cli run "display 1" # Fast — auto-routes through daemon
207
+ stata-cli daemon status # Check daemon state (PID, uptime, idle)
208
+ stata-cli daemon restart # Clean restart (reset Stata state)
209
+ stata-cli daemon stop # Shut down
210
+ ```
211
+
212
+ | Command | Description |
213
+ |---------|-------------|
214
+ | `daemon start` | Start the background daemon process |
215
+ | `daemon stop` | Graceful shutdown |
216
+ | `daemon status` | Show PID, Stata path, uptime, idle time |
217
+ | `daemon restart` | Stop + start (clean Stata state) |
218
+
219
+ Commands auto-route through the daemon when it is running. Use `--no-daemon` to force direct execution.
220
+
221
+ The daemon auto-shuts down after 1 hour of inactivity (configurable with `--idle-timeout`).
222
+
223
+ ## Advanced Usage
224
+
225
+ ### Global Options
226
+
227
+ | Option | Description | Default |
228
+ |--------|-------------|---------|
229
+ | `--stata-path PATH` | Stata installation directory | auto-detected |
230
+ | `--edition [mp\|se\|be]` | Stata edition | `mp` |
231
+ | `--compact` | Strip verbose output noise | off |
232
+ | `--json` | Structured JSON output | off |
233
+ | `--timeout SECONDS` | Execution timeout | 600 |
234
+ | `--max-tokens N` | Max output tokens (0=unlimited) | 0 |
235
+ | `--no-daemon` | Force direct execution | off |
236
+ | `--graphs-dir PATH` | Graph export directory | `~/.stata-cli/graphs/` |
237
+
238
+ ### JSON Output
239
+
240
+ ```bash
241
+ stata-cli --json run "display 1+1"
242
+ ```
243
+
244
+ ```json
245
+ {
246
+ "success": true,
247
+ "output": ". display 1+1\n2",
248
+ "error": "",
249
+ "execution_time": 0.04,
250
+ "return_code": 0,
251
+ "extra": {}
252
+ }
253
+ ```
254
+
255
+ | Field | Type | Description |
256
+ |-------|------|-------------|
257
+ | `success` | bool | Whether the command succeeded |
258
+ | `output` | string | Stata output text |
259
+ | `error` | string | Error message (if any) |
260
+ | `execution_time` | float | Seconds elapsed |
261
+ | `return_code` | int | Stata r-code (0 = ok) |
262
+ | `extra` | dict | May contain `graphs` list with exported file paths |
263
+
264
+ ### Graph Export
265
+
266
+ When Stata code creates graphs, they are automatically detected and exported as PNG:
267
+
268
+ ```bash
269
+ stata-cli run "sysuse auto, clear
270
+ scatter price mpg"
271
+ ```
272
+
273
+ ```
274
+ [graph] graph1: /Users/you/.stata-cli/graphs/exec-.../graph1.png
275
+ ```
276
+
277
+ In JSON mode, graph paths appear under `extra.graphs`.
278
+
279
+ ### Token Limit Management
280
+
281
+ For long outputs, use `--max-tokens` to truncate and save the full output to a file:
282
+
283
+ ```bash
284
+ stata-cli --max-tokens 500 run "sysuse auto, clear
285
+ describe"
286
+ ```
287
+
288
+ When output exceeds the limit, a preview is shown with a path to the full saved output.
289
+
290
+ ### Environment Variables
291
+
292
+ | Variable | Description |
293
+ |----------|-------------|
294
+ | `STATA_PATH` | Override Stata installation path |
295
+ | `STATA_CLI_GRAPHS_DIR` | Override graph export directory |
296
+
297
+ ### Exit Codes
298
+
299
+ | Code | Meaning |
300
+ |------|---------|
301
+ | 0 | Success |
302
+ | 1 | Stata command error |
303
+ | 2 | CLI usage error |
304
+ | 3 | Stata not found / init failure |
305
+
306
+ ## Agent Usage Pattern
307
+
308
+ ```bash
309
+ # Full analysis workflow
310
+ stata-cli run "sysuse auto, clear
311
+ summarize price mpg
312
+ regress price mpg weight
313
+ predict yhat
314
+ list make price yhat in 1/5"
315
+
316
+ # Check data after loading
317
+ stata-cli data --if "price>10000"
318
+
319
+ # Lookup command syntax
320
+ stata-cli help anova
321
+
322
+ # Compact mode for less noise
323
+ stata-cli --compact run "sysuse auto, clear
324
+ describe"
325
+
326
+ # JSON mode for structured parsing
327
+ stata-cli --json run "display 1+1"
328
+ ```
329
+
330
+ ## Contributing
331
+
332
+ Community contributions are welcome! If you find a bug or have feature suggestions, please submit an [Issue](https://github.com/ashuiGordon/stata-cli/issues) or [Pull Request](https://github.com/ashuiGordon/stata-cli/pulls).
333
+
334
+ For major changes, we recommend discussing with us first via an Issue.
335
+
336
+ ## License
337
+
338
+ This project is licensed under the **MIT License**.
@@ -0,0 +1,325 @@
1
+ # stata-cli
2
+
3
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
+ [![Python Version](https://img.shields.io/badge/python-%3E%3D3.9-blue.svg)](https://www.python.org/)
5
+ [![npm version](https://img.shields.io/npm/v/stata-cli.svg)](https://www.npmjs.com/package/stata-cli)
6
+
7
+ [中文版](README.zh.md) | [English](README.md)
8
+
9
+ A command-line interface for [Stata](https://www.stata.com/) via PyStata — built for humans and AI Agents. Run Stata code, `.do` files, view data, get help, and export graphs, all from the terminal. Includes a daemon mode for sub-second execution.
10
+
11
+ [Install](#installation--quick-start) · [AI Agent](#quick-start-ai-agent) · [Commands](#commands) · [Daemon](#daemon-mode) · [Advanced](#advanced-usage) · [Contributing](#contributing)
12
+
13
+ ## Why stata-cli?
14
+
15
+ - **Agent-Native Design** — Structured JSON output, exit codes, and a [SKILL.md](SKILL.md) definition out of the box — AI Agents can operate Stata with zero extra setup
16
+ - **Sub-Second Execution** — Daemon mode keeps PyStata alive in the background, reducing startup from ~2-3s to ~85ms (35x speedup)
17
+ - **Full Coverage** — Run code, execute `.do` files, view data, browse help, export graphs, interrupt execution — everything you need from one binary
18
+ - **AI-Friendly & Optimized** — Compact output mode, token limit management, structured JSON responses, and graph auto-naming — designed for Agent tool-use
19
+ - **Open Source, Zero Barriers** — MIT license, ready to use, just `pip install`
20
+ - **Up and Running in Seconds** — Auto-detects your Stata installation, from install to first command in 2 steps
21
+
22
+ ## Features
23
+
24
+ | Category | Capabilities |
25
+ |----------|-------------|
26
+ | **Run Code** | Execute inline Stata code, multi-line blocks, or pipe from stdin |
27
+ | **Do Files** | Run `.do` files with `///` line continuation support and graph auto-naming |
28
+ | **Data Viewer** | View current dataset as JSON with `if`-condition filtering and row limits |
29
+ | **Help System** | Browse Stata help topics with SMCL-to-plain-text conversion |
30
+ | **Graph Export** | Auto-detect and export graphs as PNG to `~/.stata-cli/graphs/` |
31
+ | **Daemon Mode** | Persistent background process for sub-second execution via Unix socket |
32
+ | **Output Control** | Compact mode, JSON output, token limit management with full-output file save |
33
+ | **Interruption** | Send break signal to stop long-running commands |
34
+
35
+ ## Installation & Quick Start
36
+
37
+ ### Requirements
38
+
39
+ - **Stata 17+** installed on your machine (provides the PyStata library)
40
+ - Python 3.9+
41
+
42
+ ### Quick Start (Human Users)
43
+
44
+ #### Install
45
+
46
+ Choose **one** of the following methods:
47
+
48
+ **Option 1 — From pip (recommended):**
49
+
50
+ ```bash
51
+ pip install stata-cli
52
+ ```
53
+
54
+ **Option 2 — From npm / npx (zero Python setup):**
55
+
56
+ ```bash
57
+ # One-shot usage
58
+ npx stata-cli run "display 1+1"
59
+
60
+ # Global install
61
+ npm install -g stata-cli
62
+ ```
63
+
64
+ The npm package is a thin wrapper that delegates to `uvx`, `pipx`, or `python3`.
65
+
66
+ **Option 3 — From source:**
67
+
68
+ ```bash
69
+ git clone https://github.com/ashuiGordon/stata-cli.git
70
+ cd stata-cli
71
+ pip install -e ".[data]"
72
+ ```
73
+
74
+ #### Use
75
+
76
+ ```bash
77
+ # 1. Verify Stata is detected
78
+ stata-cli detect
79
+
80
+ # 2. Run your first command
81
+ stata-cli run "display 1+1"
82
+
83
+ # 3. Start daemon for fast execution
84
+ stata-cli daemon start
85
+ stata-cli run "sysuse auto, clear" # ~85ms!
86
+ ```
87
+
88
+ ## Quick Start (AI Agent)
89
+
90
+ > The following steps are for AI Agents calling `stata-cli` via the Bash tool.
91
+
92
+ **Step 1 — Install**
93
+
94
+ ```bash
95
+ pip install stata-cli
96
+ ```
97
+
98
+ **Step 2 — Verify Stata path**
99
+
100
+ ```bash
101
+ stata-cli detect
102
+ ```
103
+
104
+ **Step 3 — Start daemon (recommended)**
105
+
106
+ ```bash
107
+ stata-cli daemon start
108
+ ```
109
+
110
+ **Step 4 — Run commands**
111
+
112
+ ```bash
113
+ # Inline code
114
+ stata-cli run "sysuse auto, clear
115
+ regress price mpg weight
116
+ predict yhat"
117
+
118
+ # Structured JSON output
119
+ stata-cli --json run "summarize price"
120
+
121
+ # View data
122
+ stata-cli data --if "price>10000" --rows 50
123
+
124
+ # Lookup command syntax
125
+ stata-cli help regress
126
+ ```
127
+
128
+ ## Commands
129
+
130
+ ### `run` — Execute Stata Code
131
+
132
+ ```bash
133
+ stata-cli run "sysuse auto, clear"
134
+
135
+ # Multi-line
136
+ stata-cli run "sysuse auto, clear
137
+ summarize price mpg
138
+ regress price mpg weight"
139
+
140
+ # Pipe from stdin
141
+ echo "display 42" | stata-cli run -
142
+ ```
143
+
144
+ ### `do` — Execute a .do File
145
+
146
+ ```bash
147
+ stata-cli do analysis.do
148
+ stata-cli --compact do long_script.do
149
+ ```
150
+
151
+ Do files are preprocessed: `///` line continuations are joined, and unnamed graph commands are auto-named for reliable export.
152
+
153
+ ### `data` — View Current Dataset
154
+
155
+ ```bash
156
+ stata-cli data
157
+ stata-cli data --if "price>5000" --rows 50
158
+ ```
159
+
160
+ Returns the current dataset as JSON with columns, data, types, and row counts.
161
+
162
+ ### `help` — Browse Stata Help
163
+
164
+ ```bash
165
+ stata-cli help regress
166
+ stata-cli help summarize
167
+ ```
168
+
169
+ Displays help as plain text (SMCL markup is automatically converted).
170
+
171
+ ### `stop` — Interrupt Execution
172
+
173
+ ```bash
174
+ stata-cli stop
175
+ ```
176
+
177
+ Sends a break signal to the running Stata command (daemon mode).
178
+
179
+ ### `detect` — Find Stata Installation
180
+
181
+ ```bash
182
+ stata-cli detect
183
+ ```
184
+
185
+ Prints the auto-detected Stata installation path.
186
+
187
+ ## Daemon Mode
188
+
189
+ The daemon keeps PyStata alive in the background — reduces execution time from **~2-3s to ~85ms** (35x speedup).
190
+
191
+ ```bash
192
+ stata-cli daemon start # Start background daemon
193
+ stata-cli run "display 1" # Fast — auto-routes through daemon
194
+ stata-cli daemon status # Check daemon state (PID, uptime, idle)
195
+ stata-cli daemon restart # Clean restart (reset Stata state)
196
+ stata-cli daemon stop # Shut down
197
+ ```
198
+
199
+ | Command | Description |
200
+ |---------|-------------|
201
+ | `daemon start` | Start the background daemon process |
202
+ | `daemon stop` | Graceful shutdown |
203
+ | `daemon status` | Show PID, Stata path, uptime, idle time |
204
+ | `daemon restart` | Stop + start (clean Stata state) |
205
+
206
+ Commands auto-route through the daemon when it is running. Use `--no-daemon` to force direct execution.
207
+
208
+ The daemon auto-shuts down after 1 hour of inactivity (configurable with `--idle-timeout`).
209
+
210
+ ## Advanced Usage
211
+
212
+ ### Global Options
213
+
214
+ | Option | Description | Default |
215
+ |--------|-------------|---------|
216
+ | `--stata-path PATH` | Stata installation directory | auto-detected |
217
+ | `--edition [mp\|se\|be]` | Stata edition | `mp` |
218
+ | `--compact` | Strip verbose output noise | off |
219
+ | `--json` | Structured JSON output | off |
220
+ | `--timeout SECONDS` | Execution timeout | 600 |
221
+ | `--max-tokens N` | Max output tokens (0=unlimited) | 0 |
222
+ | `--no-daemon` | Force direct execution | off |
223
+ | `--graphs-dir PATH` | Graph export directory | `~/.stata-cli/graphs/` |
224
+
225
+ ### JSON Output
226
+
227
+ ```bash
228
+ stata-cli --json run "display 1+1"
229
+ ```
230
+
231
+ ```json
232
+ {
233
+ "success": true,
234
+ "output": ". display 1+1\n2",
235
+ "error": "",
236
+ "execution_time": 0.04,
237
+ "return_code": 0,
238
+ "extra": {}
239
+ }
240
+ ```
241
+
242
+ | Field | Type | Description |
243
+ |-------|------|-------------|
244
+ | `success` | bool | Whether the command succeeded |
245
+ | `output` | string | Stata output text |
246
+ | `error` | string | Error message (if any) |
247
+ | `execution_time` | float | Seconds elapsed |
248
+ | `return_code` | int | Stata r-code (0 = ok) |
249
+ | `extra` | dict | May contain `graphs` list with exported file paths |
250
+
251
+ ### Graph Export
252
+
253
+ When Stata code creates graphs, they are automatically detected and exported as PNG:
254
+
255
+ ```bash
256
+ stata-cli run "sysuse auto, clear
257
+ scatter price mpg"
258
+ ```
259
+
260
+ ```
261
+ [graph] graph1: /Users/you/.stata-cli/graphs/exec-.../graph1.png
262
+ ```
263
+
264
+ In JSON mode, graph paths appear under `extra.graphs`.
265
+
266
+ ### Token Limit Management
267
+
268
+ For long outputs, use `--max-tokens` to truncate and save the full output to a file:
269
+
270
+ ```bash
271
+ stata-cli --max-tokens 500 run "sysuse auto, clear
272
+ describe"
273
+ ```
274
+
275
+ When output exceeds the limit, a preview is shown with a path to the full saved output.
276
+
277
+ ### Environment Variables
278
+
279
+ | Variable | Description |
280
+ |----------|-------------|
281
+ | `STATA_PATH` | Override Stata installation path |
282
+ | `STATA_CLI_GRAPHS_DIR` | Override graph export directory |
283
+
284
+ ### Exit Codes
285
+
286
+ | Code | Meaning |
287
+ |------|---------|
288
+ | 0 | Success |
289
+ | 1 | Stata command error |
290
+ | 2 | CLI usage error |
291
+ | 3 | Stata not found / init failure |
292
+
293
+ ## Agent Usage Pattern
294
+
295
+ ```bash
296
+ # Full analysis workflow
297
+ stata-cli run "sysuse auto, clear
298
+ summarize price mpg
299
+ regress price mpg weight
300
+ predict yhat
301
+ list make price yhat in 1/5"
302
+
303
+ # Check data after loading
304
+ stata-cli data --if "price>10000"
305
+
306
+ # Lookup command syntax
307
+ stata-cli help anova
308
+
309
+ # Compact mode for less noise
310
+ stata-cli --compact run "sysuse auto, clear
311
+ describe"
312
+
313
+ # JSON mode for structured parsing
314
+ stata-cli --json run "display 1+1"
315
+ ```
316
+
317
+ ## Contributing
318
+
319
+ Community contributions are welcome! If you find a bug or have feature suggestions, please submit an [Issue](https://github.com/ashuiGordon/stata-cli/issues) or [Pull Request](https://github.com/ashuiGordon/stata-cli/pulls).
320
+
321
+ For major changes, we recommend discussing with us first via an Issue.
322
+
323
+ ## License
324
+
325
+ This project is licensed under the **MIT License**.
@@ -0,0 +1,25 @@
1
+ [project]
2
+ name = "stata-cli"
3
+ version = "0.2.0"
4
+ description = "Command-line interface for running Stata commands via PyStata"
5
+ readme = "README.md"
6
+ requires-python = ">=3.9"
7
+ license = {text = "MIT"}
8
+ keywords = ["stata", "cli", "statistics", "data-science"]
9
+
10
+ dependencies = [
11
+ "click>=8.0",
12
+ ]
13
+
14
+ [project.optional-dependencies]
15
+ data = ["numpy", "pandas"]
16
+
17
+ [project.scripts]
18
+ stata-cli = "stata_cli.main:cli"
19
+
20
+ [build-system]
21
+ requires = ["setuptools>=61.0"]
22
+ build-backend = "setuptools.build_meta"
23
+
24
+ [tool.setuptools.packages.find]
25
+ where = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1 @@
1
+ __version__ = "0.2.0"
@@ -0,0 +1,5 @@
1
+ """Allow ``python -m stata_cli``."""
2
+
3
+ from .main import cli
4
+
5
+ cli()