naturally-linux 0.1.0__py3-none-any.whl → 0.1.2__py3-none-any.whl

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.
naturally_linux/cli.py CHANGED
@@ -56,9 +56,12 @@ def run(
56
56
  safety_color = typer.colors.GREEN if safety_label == "SAFE" else typer.colors.RED
57
57
  typer.secho(f"\nSafety check: {safety_label}", fg=safety_color)
58
58
 
59
+ executed = False
59
60
  if auto_approve or typer.confirm("Run this command now?", default=False):
60
61
  stdout, stderr, returncode = run_command(command)
61
62
 
63
+ executed = True
64
+
62
65
  if stdout:
63
66
  typer.echo(stdout)
64
67
 
@@ -68,6 +71,9 @@ def run(
68
71
  if returncode != 0:
69
72
  raise typer.Exit(code=returncode)
70
73
 
74
+ if executed:
75
+ return
76
+
71
77
  typer.secho(
72
78
  "\nDry run mode — command not executed.",
73
79
  fg=typer.colors.YELLOW,
@@ -0,0 +1,55 @@
1
+ Metadata-Version: 2.4
2
+ Name: naturally-linux
3
+ Version: 0.1.2
4
+ Summary: Natural-language to Linux shell command AI CLI tool with safety checks
5
+ Requires-Python: >=3.13
6
+ Description-Content-Type: text/markdown
7
+ Requires-Dist: groq>=1.0.0
8
+ Requires-Dist: mkdocs>=1.6.1
9
+ Requires-Dist: mkdocs-material>=9.5.49
10
+ Requires-Dist: pytest>=9.0.2
11
+ Requires-Dist: python-dotenv>=1.2.1
12
+ Requires-Dist: typer>=0.21.1
13
+
14
+ # Naturally Linux
15
+
16
+ Naturally Linux is a command-line tool that turns natural-language requests into safe, reviewable Linux shell commands. It shows you the proposed command, explains what it does, and runs it only after confirmation.
17
+
18
+ ## Features
19
+
20
+ - Natural-language → shell command generation
21
+ - Command preview and explanation
22
+ - Safety checks before execution
23
+ - Confirmation before running commands
24
+
25
+ ## Install
26
+
27
+ ```
28
+ pip install naturally-linux
29
+ ```
30
+
31
+ ## Setup
32
+
33
+ Set your Groq API key:
34
+
35
+ ```
36
+ export GROQ_API_KEY="your-key"
37
+ ```
38
+
39
+ ## Usage
40
+
41
+ Generate and run a command:
42
+
43
+ ```
44
+ naturally-linux run "list files larger than 10MB"
45
+ ```
46
+
47
+ Preview with explanation only:
48
+
49
+ ```
50
+ naturally-linux run "list files larger than 10MB" --dry-run
51
+ ```
52
+
53
+ ## License
54
+
55
+ MIT
@@ -1,11 +1,11 @@
1
1
  naturally_linux/__init__.py,sha256=AwhUWkgAwReb7gputr0g0O66BhtLS-NnHA7QCA7rfrw,150
2
2
  naturally_linux/__main__.py,sha256=NQdXVdfWdKOovDREIaA9dSVnBDPC9d2Gnya7CpZXw9U,251
3
- naturally_linux/cli.py,sha256=c_tGFwTI7rGUd-JVCxpXnDOvkPuXhVqPfwfKLt8Kjxs,2996
3
+ naturally_linux/cli.py,sha256=m3JCGomxvG_hPco8bvhDnrSVQMwLM6XFAT_CoY_08OI,3091
4
4
  naturally_linux/executor.py,sha256=Ajb3AggqmXkrUpEsluLpB91WHDmh8UUM7P0KHydRA5Y,520
5
5
  naturally_linux/generator.py,sha256=g22VfYxNzpDAKbYCwaVPaIjcl7Ls1YElCvtTKkCHhcc,2185
6
6
  naturally_linux/safety.py,sha256=-jYNkwvU-qlsHf4jrv3mJHe0IURi0ShcDOB2OmD9K_A,791
7
- naturally_linux-0.1.0.dist-info/METADATA,sha256=EqvpK1uwptY1kMfGRcZ294cLEewguj5yu9xwzBfl-eU,279
8
- naturally_linux-0.1.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
9
- naturally_linux-0.1.0.dist-info/entry_points.txt,sha256=zRxt5J_zOY94Ijs4Y0Yj2b7DlFKXNUA77xUZRC_IpMQ,60
10
- naturally_linux-0.1.0.dist-info/top_level.txt,sha256=5lYicPTSDEtiFpblhG34QIdpy0mUR_IsDGO_gY8raQw,16
11
- naturally_linux-0.1.0.dist-info/RECORD,,
7
+ naturally_linux-0.1.2.dist-info/METADATA,sha256=y4KUZXKwJUm2S9SJkwFPB8QKjFB8kp2FpQuu0cCJ_U0,1134
8
+ naturally_linux-0.1.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
9
+ naturally_linux-0.1.2.dist-info/entry_points.txt,sha256=zRxt5J_zOY94Ijs4Y0Yj2b7DlFKXNUA77xUZRC_IpMQ,60
10
+ naturally_linux-0.1.2.dist-info/top_level.txt,sha256=5lYicPTSDEtiFpblhG34QIdpy0mUR_IsDGO_gY8raQw,16
11
+ naturally_linux-0.1.2.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: naturally-linux
3
- Version: 0.1.0
4
- Summary: Add your description here
5
- Requires-Python: >=3.13
6
- Description-Content-Type: text/markdown
7
- Requires-Dist: groq>=1.0.0
8
- Requires-Dist: pytest>=9.0.2
9
- Requires-Dist: python-dotenv>=1.2.1
10
- Requires-Dist: typer>=0.21.1