scriptvault 0.0.1__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,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Majwt
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,230 @@
1
+ Metadata-Version: 2.4
2
+ Name: scriptvault
3
+ Version: 0.0.1
4
+ Summary: Store and run project commands in a hidden vault directory
5
+ Author: Majwt
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/Majwt/ScriptVault
8
+ Project-URL: Repository, https://github.com/Majwt/ScriptVault
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Programming Language :: Python :: 3.14
14
+ Requires-Python: >=3.11
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Provides-Extra: dev
18
+ Requires-Dist: pytest>=8; extra == "dev"
19
+ Dynamic: license-file
20
+
21
+ # ScriptVault (`sv`)
22
+
23
+ Store and run project commands in a hidden vault directory.
24
+
25
+ `sv` keeps scripts, orchestrations, and environment files under a hidden `.sv/` directory so projects do not need a pile of top-level Makefile targets, shell scripts, or ad-hoc commands.
26
+
27
+ ## Install
28
+
29
+ Requires Python 3.11+.
30
+
31
+ From PyPI:
32
+
33
+ ```sh
34
+ pipx install scriptvault
35
+ ```
36
+
37
+ From a checkout:
38
+
39
+ ```sh
40
+ pipx install --editable .
41
+ ```
42
+
43
+ ## Quick start
44
+
45
+ Initialize a vault in a project directory:
46
+
47
+ ```sh
48
+ sv init
49
+ ```
50
+
51
+ Create a script:
52
+
53
+ ```sh
54
+ sv add hello
55
+ ```
56
+
57
+ Run it:
58
+
59
+ ```sh
60
+ sv hello
61
+ # or
62
+ sv run hello
63
+ ```
64
+
65
+ List targets:
66
+
67
+ ```sh
68
+ sv list
69
+ ```
70
+
71
+ ## Vault layout
72
+
73
+ ```text
74
+ .sv/
75
+ vault.toml
76
+ .env
77
+ scripts/
78
+ hello.sh
79
+ hello.env
80
+ ```
81
+
82
+ - `vault.toml` defines inline scripts and orchestrations.
83
+ - `.env` is the global dotenv file.
84
+ - `scripts/*.sh` are executable file scripts.
85
+ - `scripts/NAME.env` is the per-script dotenv file.
86
+
87
+ ## Scripts
88
+
89
+ ### File scripts
90
+
91
+ A file at `.sv/scripts/hello.sh` becomes `sv hello`.
92
+
93
+ ```sh
94
+ #!/bin/sh
95
+ echo "Hello from $SV_NAME"
96
+ ```
97
+
98
+ ### Inline scripts
99
+
100
+ Define a command in `vault.toml`:
101
+
102
+ ```toml
103
+ [scripts.hello]
104
+ cmd = "echo hello"
105
+ ```
106
+
107
+ ### Creating scripts
108
+
109
+ ```sh
110
+ sv add hello
111
+ sv add hello --in < script.sh
112
+ ```
113
+
114
+ ## Running targets
115
+
116
+ ```sh
117
+ sv hello
118
+ sv run hello arg1 arg2
119
+ sv run hello -- --special-arg
120
+ ```
121
+
122
+ Arguments after the target are passed to the script. Use `--` to pass a leading dash safely.
123
+
124
+ ## Orchestrations
125
+
126
+ An orchestration is a named sequence of steps in `vault.toml`.
127
+
128
+ ```toml
129
+ [orchestrate.ci]
130
+ steps = [
131
+ { sh = "echo build" },
132
+ { run = "hello" },
133
+ { parallel = ["test", "lint"] },
134
+ ]
135
+ ```
136
+
137
+ Run it like any other target:
138
+
139
+ ```sh
140
+ sv ci
141
+ ```
142
+
143
+ Orchestrations can call scripts and other orchestrations. `sv` detects cycles and reports them.
144
+
145
+ ## Environment
146
+
147
+ Environment files are dotenv-style `KEY=VALUE` files.
148
+
149
+ Precedence, from lowest to highest:
150
+
151
+ 1. `.sv/.env`
152
+ 2. `.sv/scripts/NAME.env`
153
+ 3. The real environment
154
+ 4. Injected `SV_*` variables
155
+
156
+ Injected variables:
157
+
158
+ - `SV_ROOT`: project root
159
+ - `SV_DIR`: `.sv` directory
160
+ - `SV_CWD`: current working directory at invocation
161
+ - `SV_NAME`: target name, when running a named script
162
+
163
+ ## Editing
164
+
165
+ Open the interactive target picker:
166
+
167
+ ```sh
168
+ sv edit
169
+ ```
170
+
171
+ `sv edit` uses `fzf` when available and stdin/stdout are a TTY; otherwise it falls back to a numbered prompt.
172
+
173
+ Edit a specific target:
174
+
175
+ ```sh
176
+ sv edit hello
177
+ ```
178
+
179
+ Edit a script's environment:
180
+
181
+ ```sh
182
+ sv edit hello env
183
+ ```
184
+
185
+ Edit a target's configuration in `vault.toml`:
186
+
187
+ ```sh
188
+ sv edit hello config
189
+ ```
190
+
191
+ Edit the global vault config or global env:
192
+
193
+ ```sh
194
+ sv edit config
195
+ sv edit env
196
+ ```
197
+
198
+ ## Shell completion
199
+
200
+ Print a completion script for your shell:
201
+
202
+ ```sh
203
+ sv completion bash
204
+ sv completion zsh
205
+ sv completion fish
206
+ ```
207
+
208
+ Examples:
209
+
210
+ ```sh
211
+ # bash
212
+ eval "$(sv completion bash)"
213
+ ```
214
+
215
+ ```sh
216
+ # zsh
217
+ eval "$(sv completion zsh)"
218
+ ```
219
+
220
+ ```sh
221
+ # fish
222
+ sv completion fish | source
223
+ ```
224
+
225
+ ## Help
226
+
227
+ ```sh
228
+ sv help
229
+ sv --version
230
+ ```
@@ -0,0 +1,210 @@
1
+ # ScriptVault (`sv`)
2
+
3
+ Store and run project commands in a hidden vault directory.
4
+
5
+ `sv` keeps scripts, orchestrations, and environment files under a hidden `.sv/` directory so projects do not need a pile of top-level Makefile targets, shell scripts, or ad-hoc commands.
6
+
7
+ ## Install
8
+
9
+ Requires Python 3.11+.
10
+
11
+ From PyPI:
12
+
13
+ ```sh
14
+ pipx install scriptvault
15
+ ```
16
+
17
+ From a checkout:
18
+
19
+ ```sh
20
+ pipx install --editable .
21
+ ```
22
+
23
+ ## Quick start
24
+
25
+ Initialize a vault in a project directory:
26
+
27
+ ```sh
28
+ sv init
29
+ ```
30
+
31
+ Create a script:
32
+
33
+ ```sh
34
+ sv add hello
35
+ ```
36
+
37
+ Run it:
38
+
39
+ ```sh
40
+ sv hello
41
+ # or
42
+ sv run hello
43
+ ```
44
+
45
+ List targets:
46
+
47
+ ```sh
48
+ sv list
49
+ ```
50
+
51
+ ## Vault layout
52
+
53
+ ```text
54
+ .sv/
55
+ vault.toml
56
+ .env
57
+ scripts/
58
+ hello.sh
59
+ hello.env
60
+ ```
61
+
62
+ - `vault.toml` defines inline scripts and orchestrations.
63
+ - `.env` is the global dotenv file.
64
+ - `scripts/*.sh` are executable file scripts.
65
+ - `scripts/NAME.env` is the per-script dotenv file.
66
+
67
+ ## Scripts
68
+
69
+ ### File scripts
70
+
71
+ A file at `.sv/scripts/hello.sh` becomes `sv hello`.
72
+
73
+ ```sh
74
+ #!/bin/sh
75
+ echo "Hello from $SV_NAME"
76
+ ```
77
+
78
+ ### Inline scripts
79
+
80
+ Define a command in `vault.toml`:
81
+
82
+ ```toml
83
+ [scripts.hello]
84
+ cmd = "echo hello"
85
+ ```
86
+
87
+ ### Creating scripts
88
+
89
+ ```sh
90
+ sv add hello
91
+ sv add hello --in < script.sh
92
+ ```
93
+
94
+ ## Running targets
95
+
96
+ ```sh
97
+ sv hello
98
+ sv run hello arg1 arg2
99
+ sv run hello -- --special-arg
100
+ ```
101
+
102
+ Arguments after the target are passed to the script. Use `--` to pass a leading dash safely.
103
+
104
+ ## Orchestrations
105
+
106
+ An orchestration is a named sequence of steps in `vault.toml`.
107
+
108
+ ```toml
109
+ [orchestrate.ci]
110
+ steps = [
111
+ { sh = "echo build" },
112
+ { run = "hello" },
113
+ { parallel = ["test", "lint"] },
114
+ ]
115
+ ```
116
+
117
+ Run it like any other target:
118
+
119
+ ```sh
120
+ sv ci
121
+ ```
122
+
123
+ Orchestrations can call scripts and other orchestrations. `sv` detects cycles and reports them.
124
+
125
+ ## Environment
126
+
127
+ Environment files are dotenv-style `KEY=VALUE` files.
128
+
129
+ Precedence, from lowest to highest:
130
+
131
+ 1. `.sv/.env`
132
+ 2. `.sv/scripts/NAME.env`
133
+ 3. The real environment
134
+ 4. Injected `SV_*` variables
135
+
136
+ Injected variables:
137
+
138
+ - `SV_ROOT`: project root
139
+ - `SV_DIR`: `.sv` directory
140
+ - `SV_CWD`: current working directory at invocation
141
+ - `SV_NAME`: target name, when running a named script
142
+
143
+ ## Editing
144
+
145
+ Open the interactive target picker:
146
+
147
+ ```sh
148
+ sv edit
149
+ ```
150
+
151
+ `sv edit` uses `fzf` when available and stdin/stdout are a TTY; otherwise it falls back to a numbered prompt.
152
+
153
+ Edit a specific target:
154
+
155
+ ```sh
156
+ sv edit hello
157
+ ```
158
+
159
+ Edit a script's environment:
160
+
161
+ ```sh
162
+ sv edit hello env
163
+ ```
164
+
165
+ Edit a target's configuration in `vault.toml`:
166
+
167
+ ```sh
168
+ sv edit hello config
169
+ ```
170
+
171
+ Edit the global vault config or global env:
172
+
173
+ ```sh
174
+ sv edit config
175
+ sv edit env
176
+ ```
177
+
178
+ ## Shell completion
179
+
180
+ Print a completion script for your shell:
181
+
182
+ ```sh
183
+ sv completion bash
184
+ sv completion zsh
185
+ sv completion fish
186
+ ```
187
+
188
+ Examples:
189
+
190
+ ```sh
191
+ # bash
192
+ eval "$(sv completion bash)"
193
+ ```
194
+
195
+ ```sh
196
+ # zsh
197
+ eval "$(sv completion zsh)"
198
+ ```
199
+
200
+ ```sh
201
+ # fish
202
+ sv completion fish | source
203
+ ```
204
+
205
+ ## Help
206
+
207
+ ```sh
208
+ sv help
209
+ sv --version
210
+ ```
@@ -0,0 +1,34 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "scriptvault"
7
+ version = "0.0.1"
8
+ description = "Store and run project commands in a hidden vault directory"
9
+ readme = "README.md"
10
+ requires-python = ">=3.11"
11
+ license = "MIT"
12
+ license-files = ["LICENSE"]
13
+ authors = [{ name = "Majwt" }]
14
+ urls = { Homepage = "https://github.com/Majwt/ScriptVault", Repository = "https://github.com/Majwt/ScriptVault" }
15
+ classifiers = [
16
+ "Programming Language :: Python :: 3",
17
+ "Programming Language :: Python :: 3.11",
18
+ "Programming Language :: Python :: 3.12",
19
+ "Programming Language :: Python :: 3.13",
20
+ "Programming Language :: Python :: 3.14",
21
+ ]
22
+
23
+ [project.scripts]
24
+ sv = "scriptvault.cli:main"
25
+
26
+ [project.optional-dependencies]
27
+ dev = ["pytest>=8"]
28
+
29
+ [tool.setuptools.packages.find]
30
+ where = ["src"]
31
+
32
+ [tool.pytest.ini_options]
33
+ testpaths = ["tests"]
34
+ pythonpath = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,8 @@
1
+ """ScriptVault: store and run project commands in a hidden vault directory."""
2
+
3
+ from importlib.metadata import PackageNotFoundError, version
4
+
5
+ try:
6
+ __version__ = version("scriptvault")
7
+ except PackageNotFoundError:
8
+ __version__ = "0.0.0"
@@ -0,0 +1,6 @@
1
+ import sys
2
+
3
+ from .cli import main
4
+
5
+ if __name__ == "__main__":
6
+ sys.exit(main())