awsettings 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.
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation of a Source form, including but not limited to
33
+ compiled object code, generated documentation, and conversions to
34
+ other media types.
35
+
36
+ "Work" shall mean the work of authorship, Source or Object form,
37
+ made available under the License, as indicated by a copyright
38
+ notice included in or attached to the work (an example is provided
39
+ in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other
44
+ modifications represent, as a whole, an original work of authorship.
45
+ For the purposes of this License, Derivative Works shall not include
46
+ works that remain separable from, or merely link (or bind by name)
47
+ to the interfaces of, the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including the
50
+ original version of the Work and any modifications or additions to
51
+ that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright
53
+ owner or by an individual or Legal Entity authorized to submit on
54
+ behalf of the copyright owner. For the purposes of this definition,
55
+ "submitted" means any form of electronic, verbal, or written
56
+ communication sent to the Licensor or its representatives, including
57
+ but not limited to communication on electronic mailing lists, source
58
+ code control systems, and issue tracking systems managed by, or on
59
+ behalf of, the Licensor for the purpose of discussing and improving
60
+ the Work, but excluding communication conspicuously marked or
61
+ otherwise designated in writing by the copyright owner as "Not a
62
+ Contribution."
63
+
64
+ "Contributor" shall mean Licensor and any individual or Legal Entity
65
+ on whose behalf a Contribution has been received by Licensor and
66
+ subsequently incorporated within the Work.
67
+
68
+ 2. Grant of Copyright License. Subject to the terms and conditions of
69
+ this License, each Contributor hereby grants to You a perpetual,
70
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
71
+ copyright license to reproduce, prepare Derivative Works of,
72
+ publicly display, publicly perform, sublicense, and distribute the
73
+ Work and such Derivative Works in Source or Object form.
74
+
75
+ 3. Grant of Patent License. Subject to the terms and conditions of
76
+ this License, each Contributor hereby grants to You a perpetual,
77
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
78
+ (except as stated in this section) patent license to make, have
79
+ made, use, offer to sell, sell, import, and otherwise transfer the
80
+ Work, where such patent license applies only to those patent claims
81
+ licensable by such Contributor that are necessarily infringed by
82
+ their Contribution(s) alone or by combination of their Contribution(s)
83
+ with the Work to which such Contribution(s) was submitted. If You
84
+ institute patent litigation against any entity (including a
85
+ cross-claim or counterclaim in a lawsuit) alleging that the Work or
86
+ a Contribution incorporated within the Work constitutes direct or
87
+ contributory patent infringement, then any patent licenses granted
88
+ to You under this License for that Work shall terminate as of the
89
+ date such litigation is filed.
90
+
91
+ 4. Redistribution. You may reproduce and distribute copies of the Work
92
+ or Derivative Works thereof in any medium, with or without
93
+ modifications, in Source or Object form, provided that You meet the
94
+ following conditions:
95
+
96
+ (a) You must give any other recipients of the Work or Derivative
97
+ Works a copy of this License; and
98
+
99
+ (b) You must cause any modified files to carry prominent notices
100
+ stating that You changed the files; and
101
+
102
+ (c) You must retain, in the Source form of any Derivative Works
103
+ that You distribute, all copyright, patent, trademark, and
104
+ attribution notices from the Source form of the Work,
105
+ excluding those notices that do not pertain to any part of the
106
+ Derivative Works; and
107
+
108
+ (d) If the Work includes a "NOTICE" text file as part of its
109
+ distribution, then any Derivative Works that You distribute must
110
+ include a readable copy of the attribution notices contained
111
+ within such NOTICE file, excluding those notices that do not
112
+ pertain to any part of the Derivative Works, in at least one of
113
+ the following places: within a NOTICE text file distributed as
114
+ part of the Derivative Works; within the Source form or
115
+ documentation, if provided along with the Derivative Works; or,
116
+ within a display generated by the Derivative Works, if and
117
+ wherever such third-party notices normally appear. The contents
118
+ of the NOTICE file are for informational purposes only and do
119
+ not modify the License. You may add Your own attribution notices
120
+ within Derivative Works that You distribute, alongside or as an
121
+ addendum to the NOTICE text from the Work, provided that such
122
+ additional attribution notices cannot be construed as modifying
123
+ the License.
124
+
125
+ You may add Your own copyright statement to Your modifications and
126
+ may provide additional or different license terms and conditions for
127
+ use, reproduction, or distribution of Your modifications, or for any
128
+ such Derivative Works as a whole, provided Your use, reproduction,
129
+ and distribution of the Work otherwise complies with the conditions
130
+ in this License.
131
+
132
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
133
+ any Contribution intentionally submitted for inclusion in the Work by
134
+ You to the Licensor shall be under the terms and conditions of this
135
+ License, without any additional terms. Notwithstanding the above,
136
+ nothing herein shall supersede or modify the terms of any separate
137
+ license agreement You may have executed with Licensor regarding such
138
+ Contributions.
139
+
140
+ 6. Trademarks. This License does not grant permission to use the trade
141
+ names, trademarks, service marks, or product names of the Licensor,
142
+ except as required for reasonable and customary use in describing the
143
+ origin of the Work and reproducing the content of the NOTICE file.
144
+
145
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed
146
+ to in writing, Licensor provides the Work (and each Contributor
147
+ provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES
148
+ OR CONDITIONS OF ANY KIND, either express or implied, including,
149
+ without limitation, any warranties or conditions of TITLE,
150
+ NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR
151
+ PURPOSE. You are solely responsible for determining the
152
+ appropriateness of using or redistributing the Work and assume any
153
+ risks associated with Your exercise of permissions under this License.
154
+
155
+ 8. Limitation of Liability. In no event and under no legal theory,
156
+ whether in tort (including negligence), contract, or otherwise,
157
+ unless required by applicable law (such as deliberate and grossly
158
+ negligent acts) or agreed to in writing, shall any Contributor be
159
+ liable to You for damages, including any direct, indirect, special,
160
+ incidental, or consequential damages of any character arising as a
161
+ result of this License or out of the use or inability to use the
162
+ Work (including but not limited to damages for loss of goodwill,
163
+ work stoppage, computer failure or malfunction, or any and all
164
+ other commercial damages or losses), even if such Contributor has
165
+ been advised of the possibility of such damages.
166
+
167
+ 9. Accepting Warranty or Additional Liability. While redistributing the
168
+ Work or Derivative Works thereof, You may choose to offer, and charge
169
+ a fee for, acceptance of support, warranty, indemnity, or other
170
+ liability obligations and/or rights consistent with this License.
171
+ However, accepting such obligations, You act only on Your own behalf
172
+ and on Your sole responsibility, not on behalf of any other
173
+ Contributor, and only if You agree to indemnify, defend, and hold
174
+ each Contributor harmless for any liability incurred by, or claims
175
+ asserted against, such Contributor by reason of Your accepting any
176
+ such warranty or additional liability.
177
+
178
+ END OF TERMS AND CONDITIONS
179
+
180
+ APPENDIX: How to apply the Apache License to your work.
181
+
182
+ To apply the Apache License to your work, attach the following
183
+ boilerplate notice, with the fields enclosed by brackets "[]"
184
+ replaced with your own identifying information. (Don't include the
185
+ brackets!) The text should be enclosed in the appropriate comment
186
+ syntax for the file format. We recommend also including a file or
187
+ class name and description of purpose in the same "printed page" as
188
+ the copyright notice for easier identification in archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,142 @@
1
+ Metadata-Version: 2.4
2
+ Name: awsettings
3
+ Version: 0.1.0
4
+ Summary: Your agent's permissions and config, following you to the next machine.
5
+ License: Apache-2.0
6
+ Project-URL: Homepage, https://github.com/Aitherium/awsettings
7
+ Project-URL: Documentation, https://github.com/Aitherium/awsettings#readme
8
+ Project-URL: Repository, https://github.com/Aitherium/awsettings.git
9
+ Project-URL: Issues, https://github.com/Aitherium/awsettings/issues
10
+ Requires-Python: >=3.10
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Provides-Extra: http
14
+ Requires-Dist: httpx>=0.25.0; extra == "http"
15
+ Provides-Extra: dev
16
+ Requires-Dist: pytest>=7.0; extra == "dev"
17
+ Requires-Dist: httpx>=0.25.0; extra == "dev"
18
+ Dynamic: license-file
19
+
20
+ # awsettings
21
+
22
+ **Your agent's permissions and config, following you to the next machine.**
23
+
24
+ ```bash
25
+ pip install git+https://github.com/Aitherium/awsettings.git
26
+ awsettings hook install # and never think about it again
27
+ ```
28
+
29
+ <sub>Installed from git until the first PyPI release — `pip install awsettings` is
30
+ not live yet, and advertising an install that 404s is worse than a longer one.
31
+ This line goes when the release does.</sub>
32
+
33
+ Your coding agent keeps its permission allowlist, its enabled tool servers and its
34
+ hooks in a local file. Open a session on a second machine — a laptop, a shell on a
35
+ server, a dev container your phone just spun up — and none of it is there.
36
+
37
+ So you approve the same action again. By hand. Once per surface. Forever. And the
38
+ copies drift apart while every one of them looks perfectly correct.
39
+
40
+ ## What you get
41
+
42
+ ```
43
+ $ awsettings status
44
+ local: /home/you/project/.claude/settings.local.json (present)
45
+ remote: file:/home/you/.awsettings/profile.json
46
+ hooks: PostToolUse, SessionStart
47
+ a pull would apply 2 change(s):
48
+ + permissions.allow: Bash(python tools/deploy.py:*)
49
+ + enabledMcpjsonServers: my-server
50
+ ```
51
+
52
+ ```
53
+ $ awsettings pull
54
+ applied 2 change(s) to /home/you/project/.claude/settings.local.json:
55
+ + permissions.allow: Bash(python tools/deploy.py:*)
56
+ + enabledMcpjsonServers: my-server
57
+ ```
58
+
59
+ ## Three rules it will not break
60
+
61
+ **Credentials never travel** — and they are dropped by *name*, not by inspecting
62
+ the value. A "does this look like a token" heuristic passes every secret that does
63
+ not look like one, and that failure is invisible until the secret is already
64
+ published. `env`, `apiKeyHelper`, `awsCredentialExport`, `sandbox.credentials` and
65
+ their kin stay on the machine they were typed on. `awsettings push --dry-run`
66
+ prints exactly what would leave.
67
+
68
+ **Arrays union; they are never replaced.** Two machines both edit this file. With
69
+ replace semantics, machine B silently loses the rule machine A never had — and
70
+ neither of them can tell. Every list here merges.
71
+
72
+ **A deny is one-way.** A sync may *add* a deny or ask rule. It may never drop one.
73
+ A lost allow rule costs you a prompt; a lost deny rule costs you the thing the deny
74
+ existed to prevent, quietly, on a machine whose owner still believes it is there.
75
+ If you genuinely want to remove one everywhere, `--prune-denies` says so out loud.
76
+
77
+ ## It writes the personal file, not the shared one
78
+
79
+ Only `.claude/settings.local.json` — gitignored, yours. Never the committed
80
+ `.claude/settings.json`, because syncing your permission allowlist into a file
81
+ your team reviews as policy hands everyone rules they never approved.
82
+
83
+ ## Autonomy is a hook, not a daemon
84
+
85
+ ```bash
86
+ awsettings hook install
87
+ ```
88
+
89
+ * **SessionStart → pull.** A new machine is stale before its first tool call, so
90
+ that is when it catches up.
91
+ * **A settings write → push**, debounced. A rule you approve here is on its way to
92
+ the others before you have finished the thought.
93
+
94
+ No background process. A daemon is a second thing to keep alive on every surface
95
+ this exists to stop hand-maintaining — and when it dies, it dies quietly, which is
96
+ the same failure as the drift it was meant to fix. Both hooks end in `|| true`:
97
+ a settings sync must never be able to fail a session open, because offline is the
98
+ normal state of a laptop and the correct behaviour offline is to carry on.
99
+
100
+ ## Where the profile lives
101
+
102
+ No account required. The default is a plain JSON file in a folder you already sync
103
+ — a git repo, a drive folder, a USB stick:
104
+
105
+ ```bash
106
+ export AWSETTINGS_PROFILE=~/Dropbox/awsettings.json
107
+ ```
108
+
109
+ Or point it at any endpoint that serves a JSON object on `GET` and merges one on
110
+ `PUT`:
111
+
112
+ ```bash
113
+ export AWSETTINGS_URL=https://example.com/api/settings/preferences
114
+ export AWSETTINGS_TOKEN=... # environment only — never a command-line flag,
115
+ # which lands in shell history and the process list
116
+ ```
117
+
118
+ A transport failure is never read as "no settings": both backends raise, and the
119
+ CLI exits **2** rather than merging nothing and reporting success.
120
+
121
+ ## Exit codes
122
+
123
+ | code | meaning |
124
+ |---|---|
125
+ | 0 | did the thing (or there was nothing to do — it says which) |
126
+ | 1 | a rule refused it |
127
+ | 2 | could not judge: profile unreachable, or a settings file would not parse |
128
+
129
+ ## Prove it before you trust it
130
+
131
+ ```bash
132
+ awsettings --self-test
133
+ ```
134
+
135
+ Runs offline. Asserts that credentials neither leave nor arrive, that arrays union
136
+ instead of replacing, that a deny is never dropped by default, that installing the
137
+ hooks twice leaves one hook and does not clobber somebody else's, that a malformed
138
+ settings file refuses rather than reading as empty, and that writes are atomic.
139
+
140
+ ## Licence
141
+
142
+ Apache-2.0.
@@ -0,0 +1,123 @@
1
+ # awsettings
2
+
3
+ **Your agent's permissions and config, following you to the next machine.**
4
+
5
+ ```bash
6
+ pip install git+https://github.com/Aitherium/awsettings.git
7
+ awsettings hook install # and never think about it again
8
+ ```
9
+
10
+ <sub>Installed from git until the first PyPI release — `pip install awsettings` is
11
+ not live yet, and advertising an install that 404s is worse than a longer one.
12
+ This line goes when the release does.</sub>
13
+
14
+ Your coding agent keeps its permission allowlist, its enabled tool servers and its
15
+ hooks in a local file. Open a session on a second machine — a laptop, a shell on a
16
+ server, a dev container your phone just spun up — and none of it is there.
17
+
18
+ So you approve the same action again. By hand. Once per surface. Forever. And the
19
+ copies drift apart while every one of them looks perfectly correct.
20
+
21
+ ## What you get
22
+
23
+ ```
24
+ $ awsettings status
25
+ local: /home/you/project/.claude/settings.local.json (present)
26
+ remote: file:/home/you/.awsettings/profile.json
27
+ hooks: PostToolUse, SessionStart
28
+ a pull would apply 2 change(s):
29
+ + permissions.allow: Bash(python tools/deploy.py:*)
30
+ + enabledMcpjsonServers: my-server
31
+ ```
32
+
33
+ ```
34
+ $ awsettings pull
35
+ applied 2 change(s) to /home/you/project/.claude/settings.local.json:
36
+ + permissions.allow: Bash(python tools/deploy.py:*)
37
+ + enabledMcpjsonServers: my-server
38
+ ```
39
+
40
+ ## Three rules it will not break
41
+
42
+ **Credentials never travel** — and they are dropped by *name*, not by inspecting
43
+ the value. A "does this look like a token" heuristic passes every secret that does
44
+ not look like one, and that failure is invisible until the secret is already
45
+ published. `env`, `apiKeyHelper`, `awsCredentialExport`, `sandbox.credentials` and
46
+ their kin stay on the machine they were typed on. `awsettings push --dry-run`
47
+ prints exactly what would leave.
48
+
49
+ **Arrays union; they are never replaced.** Two machines both edit this file. With
50
+ replace semantics, machine B silently loses the rule machine A never had — and
51
+ neither of them can tell. Every list here merges.
52
+
53
+ **A deny is one-way.** A sync may *add* a deny or ask rule. It may never drop one.
54
+ A lost allow rule costs you a prompt; a lost deny rule costs you the thing the deny
55
+ existed to prevent, quietly, on a machine whose owner still believes it is there.
56
+ If you genuinely want to remove one everywhere, `--prune-denies` says so out loud.
57
+
58
+ ## It writes the personal file, not the shared one
59
+
60
+ Only `.claude/settings.local.json` — gitignored, yours. Never the committed
61
+ `.claude/settings.json`, because syncing your permission allowlist into a file
62
+ your team reviews as policy hands everyone rules they never approved.
63
+
64
+ ## Autonomy is a hook, not a daemon
65
+
66
+ ```bash
67
+ awsettings hook install
68
+ ```
69
+
70
+ * **SessionStart → pull.** A new machine is stale before its first tool call, so
71
+ that is when it catches up.
72
+ * **A settings write → push**, debounced. A rule you approve here is on its way to
73
+ the others before you have finished the thought.
74
+
75
+ No background process. A daemon is a second thing to keep alive on every surface
76
+ this exists to stop hand-maintaining — and when it dies, it dies quietly, which is
77
+ the same failure as the drift it was meant to fix. Both hooks end in `|| true`:
78
+ a settings sync must never be able to fail a session open, because offline is the
79
+ normal state of a laptop and the correct behaviour offline is to carry on.
80
+
81
+ ## Where the profile lives
82
+
83
+ No account required. The default is a plain JSON file in a folder you already sync
84
+ — a git repo, a drive folder, a USB stick:
85
+
86
+ ```bash
87
+ export AWSETTINGS_PROFILE=~/Dropbox/awsettings.json
88
+ ```
89
+
90
+ Or point it at any endpoint that serves a JSON object on `GET` and merges one on
91
+ `PUT`:
92
+
93
+ ```bash
94
+ export AWSETTINGS_URL=https://example.com/api/settings/preferences
95
+ export AWSETTINGS_TOKEN=... # environment only — never a command-line flag,
96
+ # which lands in shell history and the process list
97
+ ```
98
+
99
+ A transport failure is never read as "no settings": both backends raise, and the
100
+ CLI exits **2** rather than merging nothing and reporting success.
101
+
102
+ ## Exit codes
103
+
104
+ | code | meaning |
105
+ |---|---|
106
+ | 0 | did the thing (or there was nothing to do — it says which) |
107
+ | 1 | a rule refused it |
108
+ | 2 | could not judge: profile unreachable, or a settings file would not parse |
109
+
110
+ ## Prove it before you trust it
111
+
112
+ ```bash
113
+ awsettings --self-test
114
+ ```
115
+
116
+ Runs offline. Asserts that credentials neither leave nor arrive, that arrays union
117
+ instead of replacing, that a deny is never dropped by default, that installing the
118
+ hooks twice leaves one hook and does not clobber somebody else's, that a malformed
119
+ settings file refuses rather than reading as empty, and that writes are atomic.
120
+
121
+ ## Licence
122
+
123
+ Apache-2.0.
@@ -0,0 +1,15 @@
1
+ """awsettings — your agent's permissions and config, following you to the next machine.
2
+
3
+ An agent harness keeps its permission allowlist, enabled tool servers and hooks in
4
+ a local file. Work from a second machine and none of it is there: you re-approve
5
+ the same action, by hand, once per surface, forever, while the copies drift apart
6
+ and every one of them looks correct.
7
+
8
+ awsettings status
9
+ awsettings pull
10
+ awsettings push
11
+ awsettings hook install
12
+ """
13
+ __version__ = "0.1.0"
14
+
15
+ __all__ = ["__version__"]