wirk 0.3.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.
- wirk-0.3.0/.github/CODEOWNERS +1 -0
- wirk-0.3.0/.github/workflows/ci.yml +42 -0
- wirk-0.3.0/.github/workflows/release.yml +59 -0
- wirk-0.3.0/.gitignore +14 -0
- wirk-0.3.0/LICENSE +201 -0
- wirk-0.3.0/PKG-INFO +80 -0
- wirk-0.3.0/README.md +66 -0
- wirk-0.3.0/install.sh +131 -0
- wirk-0.3.0/pyproject.toml +28 -0
- wirk-0.3.0/src/wirk_cli/__init__.py +3 -0
- wirk-0.3.0/src/wirk_cli/__main__.py +5 -0
- wirk-0.3.0/src/wirk_cli/cli.py +412 -0
- wirk-0.3.0/src/wirk_cli/client.py +213 -0
- wirk-0.3.0/src/wirk_cli/context.py +50 -0
- wirk-0.3.0/src/wirk_cli/grammar.py +197 -0
- wirk-0.3.0/src/wirk_cli/help.py +132 -0
- wirk-0.3.0/tests/conftest.py +66 -0
- wirk-0.3.0/tests/fixtures/service_lines.json +218 -0
- wirk-0.3.0/tests/test_client.py +134 -0
- wirk-0.3.0/tests/test_context.py +70 -0
- wirk-0.3.0/tests/test_contract.py +215 -0
- wirk-0.3.0/tests/test_files.py +148 -0
- wirk-0.3.0/tests/test_grammar.py +107 -0
- wirk-0.3.0/tests/test_help.py +134 -0
- wirk-0.3.0/tests/test_install.py +183 -0
- wirk-0.3.0/tests/test_login.py +184 -0
- wirk-0.3.0/tests/test_person.py +129 -0
- wirk-0.3.0/tests/test_release.py +28 -0
- wirk-0.3.0/tests/test_review_fixes.py +226 -0
- wirk-0.3.0/tests/test_show_admin.py +41 -0
- wirk-0.3.0/tests/test_write.py +163 -0
- wirk-0.3.0/uv.lock +161 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* @saml212
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: Tests and package
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [main]
|
|
5
|
+
pull_request:
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
concurrency:
|
|
8
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
9
|
+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
jobs:
|
|
13
|
+
verify:
|
|
14
|
+
# GitHub's free runners once the repository is public; the project's own runner while it is private.
|
|
15
|
+
runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux"]') || 'ubuntu-latest' }}
|
|
16
|
+
timeout-minutes: 15
|
|
17
|
+
env:
|
|
18
|
+
WIRK_PRIVACY_HISTORY: ${{ github.event.repository.private && '0' || '1' }}
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
21
|
+
with:
|
|
22
|
+
fetch-depth: 0 # the privacy scan reads every reachable commit
|
|
23
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: '3.12'
|
|
26
|
+
- name: zsh, for the shell-safety tests
|
|
27
|
+
run: command -v zsh || { sudo apt-get update -q && sudo apt-get install -y -q zsh; }
|
|
28
|
+
- run: python -m pip install build uv ".[test]" # uv runs install.sh's real install test
|
|
29
|
+
- run: python -m pytest tests -q -rs
|
|
30
|
+
- run: python -m build
|
|
31
|
+
install-macos:
|
|
32
|
+
# install.sh on macOS's sh, once the repository is public and GitHub's macOS runners are free for it.
|
|
33
|
+
if: ${{ !github.event.repository.private }}
|
|
34
|
+
runs-on: macos-latest
|
|
35
|
+
timeout-minutes: 15
|
|
36
|
+
steps:
|
|
37
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
38
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
39
|
+
with:
|
|
40
|
+
python-version: '3.12'
|
|
41
|
+
- run: python -m pip install uv ".[test]"
|
|
42
|
+
- run: python -m pytest tests/test_install.py -q -rs
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
tags: ['v*']
|
|
5
|
+
permissions:
|
|
6
|
+
contents: read
|
|
7
|
+
jobs:
|
|
8
|
+
build:
|
|
9
|
+
runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux"]') || 'ubuntu-latest' }}
|
|
10
|
+
timeout-minutes: 15
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
13
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
14
|
+
with:
|
|
15
|
+
python-version: '3.12'
|
|
16
|
+
- name: The tag names the package's version
|
|
17
|
+
run: test "v$(python -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')" = "$GITHUB_REF_NAME"
|
|
18
|
+
- name: zsh, for the shell-safety tests
|
|
19
|
+
run: command -v zsh || { sudo apt-get update -q && sudo apt-get install -y -q zsh; }
|
|
20
|
+
- run: python -m pip install build uv ".[test]"
|
|
21
|
+
- run: python -m pytest tests -q -rs
|
|
22
|
+
- run: python -m build
|
|
23
|
+
- name: SHA-256 sums of what is released
|
|
24
|
+
run: cd dist && sha256sum -- * > SHA256SUMS && cat SHA256SUMS
|
|
25
|
+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
|
26
|
+
with:
|
|
27
|
+
name: dist
|
|
28
|
+
path: dist/
|
|
29
|
+
github-release:
|
|
30
|
+
needs: build
|
|
31
|
+
runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux"]') || 'ubuntu-latest' }}
|
|
32
|
+
permissions:
|
|
33
|
+
contents: write
|
|
34
|
+
steps:
|
|
35
|
+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
|
36
|
+
with:
|
|
37
|
+
name: dist
|
|
38
|
+
path: dist
|
|
39
|
+
- name: Attach the wheel, the sdist and their sums to the release
|
|
40
|
+
env:
|
|
41
|
+
GH_TOKEN: ${{ github.token }}
|
|
42
|
+
run: >-
|
|
43
|
+
gh release create "$GITHUB_REF_NAME" dist/* --repo "$GITHUB_REPOSITORY" --title "$GITHUB_REF_NAME" --verify-tag
|
|
44
|
+
--notes "Install everything with: curl -fsSL https://wirk.life/install | sh. Check downloads against SHA256SUMS."
|
|
45
|
+
pypi:
|
|
46
|
+
# Off until the PyPI project and its trusted publisher exist and the repository variable PYPI_PUBLISH is true.
|
|
47
|
+
needs: build
|
|
48
|
+
if: ${{ vars.PYPI_PUBLISH == 'true' }}
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
environment: pypi
|
|
51
|
+
permissions:
|
|
52
|
+
id-token: write
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
|
55
|
+
with:
|
|
56
|
+
name: dist
|
|
57
|
+
path: dist
|
|
58
|
+
- run: rm dist/SHA256SUMS
|
|
59
|
+
- uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1
|
wirk-0.3.0/.gitignore
ADDED
wirk-0.3.0/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
wirk-0.3.0/PKG-INFO
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: wirk
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: The wirk command: status, query, write and review for people and agents in a WIRK wirkspace
|
|
5
|
+
Project-URL: Homepage, https://wirk.life
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Python: >=3.12
|
|
9
|
+
Requires-Dist: httpx<1,>=0.27
|
|
10
|
+
Provides-Extra: test
|
|
11
|
+
Requires-Dist: pytest<10,>=8; extra == 'test'
|
|
12
|
+
Requires-Dist: pyyaml>=6; extra == 'test'
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
|
|
15
|
+
# wirk
|
|
16
|
+
|
|
17
|
+
`wirk` is the command-line client for [WIRK](https://wirk.life): coordination and ticketing built for agents and the people they work with. Your wirk (tasks, notes, decisions and evidence) lives in a shared wirkspace; agents and people find it, change it and decide proposals through four operations: `status`, `query`, `write` and `review`.
|
|
18
|
+
|
|
19
|
+
## Install and connect
|
|
20
|
+
|
|
21
|
+
One command, on macOS or Linux:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
curl -fsSL https://wirk.life/install | sh
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
It installs [uv](https://docs.astral.sh/uv/) if you have none (it asks first), then the `wirk` command and the `wirk-mcp` server from this release's wheels after checking their SHA-256 sums. It registers the MCP server with Claude Code and Codex when they are installed, offers them the WIRK skill, and runs `wirk login`. It never uses sudo, and running it again is safe. `sh install.sh --dry-run` prints every step without doing any; `--yes` answers its questions; `--url URL` logs in to another service.
|
|
28
|
+
|
|
29
|
+
`wirk login` makes a token for this machine, keeps it in `~/.config/wirk` (readable only by you) and asks WIRK to approve the machine: open the link it prints, sign in and approve. Where a service has no web sign-in, it prints the token's digest instead; send the digest to your WIRK administrator. The default service is `https://api.wirk.life`.
|
|
30
|
+
|
|
31
|
+
By hand: `uv tool install wirk` (or the wheel attached to a [release](https://github.com/wirkspace/wirk-cli/releases)), then `wirk login`. For agents, also [wirk-mcp](https://github.com/wirkspace/wirk-mcp) and the skill ([wirk-skill](https://github.com/wirkspace/wirk-skill)).
|
|
32
|
+
|
|
33
|
+
## Use
|
|
34
|
+
|
|
35
|
+
Start with `wirk status`. `wirk --help` lists every command with an example you can run as printed.
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
wirk status 'fix the webhook retries' who you are, your wirk, what needs you, and what matters for the task
|
|
39
|
+
wirk query about='webhook retries' what matters for these words
|
|
40
|
+
wirk query status=open kind=work owner=me a list with filters
|
|
41
|
+
wirk write new 'What I did' --body-file note.md --link related_to:5c1e7a90
|
|
42
|
+
wirk write edit 5c1e7a90@4 status=completed --evidence 'tests/test_retry.py passes'
|
|
43
|
+
wirk review c4a1e902@1 accept --reason 'Matches the agreed criteria'
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
`ID@N` names the revision you read (`rN` on a card), so a change never overwrites one you did not see. Results are text; `--json` gives the data. A result line `label: command` is the next command: type `wirk` and what follows the colon. After an uncertain result, run the same command again with the `--request-id` it printed; it applies once.
|
|
47
|
+
|
|
48
|
+
## For people
|
|
49
|
+
|
|
50
|
+
Agents work with their own token; a person keeps a second one for their own decisions and administration. These commands read only that person token, and each runs only at a terminal, after you type a confirmation that names the action:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
wirk login --person make or check your own token
|
|
54
|
+
wirk review c4a1e902@1 accept --reason 'Checked it' --person decide a proposal your agents made, as yourself
|
|
55
|
+
wirk admin show account what your account holds (administrators)
|
|
56
|
+
wirk admin --request batch.json people, tokens, wirkspaces and fields (administrators)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Agents never need them, and the agent help, the skill and the MCP server do not mention them. The check is a speed bump against an agent being misled into acting as you, not a boundary: the service's rules are the boundary (nobody decides their own proposal, and agents are never administrators).
|
|
60
|
+
|
|
61
|
+
## What leaves your machine
|
|
62
|
+
|
|
63
|
+
- The requests you or your agents make, and their content.
|
|
64
|
+
- The token, only as the bearer header to the address it was made for: never to another address, a redirect or a storage link, and never in output, logs or errors.
|
|
65
|
+
- With `status`, the client's name and version, a session hash, the repository as `host/owner/name` (or a hash when it has no plain remote) and the branch name. WIRK shows these as reported, never as authority.
|
|
66
|
+
- File bytes you upload, straight to storage through short-lived links.
|
|
67
|
+
|
|
68
|
+
There is no telemetry. People keep a separate token of their own for their own decisions and administration; agents never use it.
|
|
69
|
+
|
|
70
|
+
## Development
|
|
71
|
+
|
|
72
|
+
`uv run --extra test python -m pytest tests -q` runs the tests. The contract tests run against a scratch WIRK service when `WIRK_TEST_URL` and `WIRK_TEST_ADMIN_TOKEN_FILE` are set.
|
|
73
|
+
|
|
74
|
+
## Releasing
|
|
75
|
+
|
|
76
|
+
A `v*` tag that matches the version in `pyproject.toml` runs the release workflow: tests, the wheel and the sdist, a GitHub Release with `SHA256SUMS`, and PyPI through trusted publishing. The PyPI step stays off until the `wirk` project on PyPI has this repository's `release.yml` and its `pypi` environment as a trusted publisher and the repository variable `PYPI_PUBLISH` is `true`. No token is stored anywhere.
|
|
77
|
+
|
|
78
|
+
## License
|
|
79
|
+
|
|
80
|
+
Apache-2.0. See [LICENSE](LICENSE).
|
wirk-0.3.0/README.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# wirk
|
|
2
|
+
|
|
3
|
+
`wirk` is the command-line client for [WIRK](https://wirk.life): coordination and ticketing built for agents and the people they work with. Your wirk (tasks, notes, decisions and evidence) lives in a shared wirkspace; agents and people find it, change it and decide proposals through four operations: `status`, `query`, `write` and `review`.
|
|
4
|
+
|
|
5
|
+
## Install and connect
|
|
6
|
+
|
|
7
|
+
One command, on macOS or Linux:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
curl -fsSL https://wirk.life/install | sh
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
It installs [uv](https://docs.astral.sh/uv/) if you have none (it asks first), then the `wirk` command and the `wirk-mcp` server from this release's wheels after checking their SHA-256 sums. It registers the MCP server with Claude Code and Codex when they are installed, offers them the WIRK skill, and runs `wirk login`. It never uses sudo, and running it again is safe. `sh install.sh --dry-run` prints every step without doing any; `--yes` answers its questions; `--url URL` logs in to another service.
|
|
14
|
+
|
|
15
|
+
`wirk login` makes a token for this machine, keeps it in `~/.config/wirk` (readable only by you) and asks WIRK to approve the machine: open the link it prints, sign in and approve. Where a service has no web sign-in, it prints the token's digest instead; send the digest to your WIRK administrator. The default service is `https://api.wirk.life`.
|
|
16
|
+
|
|
17
|
+
By hand: `uv tool install wirk` (or the wheel attached to a [release](https://github.com/wirkspace/wirk-cli/releases)), then `wirk login`. For agents, also [wirk-mcp](https://github.com/wirkspace/wirk-mcp) and the skill ([wirk-skill](https://github.com/wirkspace/wirk-skill)).
|
|
18
|
+
|
|
19
|
+
## Use
|
|
20
|
+
|
|
21
|
+
Start with `wirk status`. `wirk --help` lists every command with an example you can run as printed.
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
wirk status 'fix the webhook retries' who you are, your wirk, what needs you, and what matters for the task
|
|
25
|
+
wirk query about='webhook retries' what matters for these words
|
|
26
|
+
wirk query status=open kind=work owner=me a list with filters
|
|
27
|
+
wirk write new 'What I did' --body-file note.md --link related_to:5c1e7a90
|
|
28
|
+
wirk write edit 5c1e7a90@4 status=completed --evidence 'tests/test_retry.py passes'
|
|
29
|
+
wirk review c4a1e902@1 accept --reason 'Matches the agreed criteria'
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`ID@N` names the revision you read (`rN` on a card), so a change never overwrites one you did not see. Results are text; `--json` gives the data. A result line `label: command` is the next command: type `wirk` and what follows the colon. After an uncertain result, run the same command again with the `--request-id` it printed; it applies once.
|
|
33
|
+
|
|
34
|
+
## For people
|
|
35
|
+
|
|
36
|
+
Agents work with their own token; a person keeps a second one for their own decisions and administration. These commands read only that person token, and each runs only at a terminal, after you type a confirmation that names the action:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
wirk login --person make or check your own token
|
|
40
|
+
wirk review c4a1e902@1 accept --reason 'Checked it' --person decide a proposal your agents made, as yourself
|
|
41
|
+
wirk admin show account what your account holds (administrators)
|
|
42
|
+
wirk admin --request batch.json people, tokens, wirkspaces and fields (administrators)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Agents never need them, and the agent help, the skill and the MCP server do not mention them. The check is a speed bump against an agent being misled into acting as you, not a boundary: the service's rules are the boundary (nobody decides their own proposal, and agents are never administrators).
|
|
46
|
+
|
|
47
|
+
## What leaves your machine
|
|
48
|
+
|
|
49
|
+
- The requests you or your agents make, and their content.
|
|
50
|
+
- The token, only as the bearer header to the address it was made for: never to another address, a redirect or a storage link, and never in output, logs or errors.
|
|
51
|
+
- With `status`, the client's name and version, a session hash, the repository as `host/owner/name` (or a hash when it has no plain remote) and the branch name. WIRK shows these as reported, never as authority.
|
|
52
|
+
- File bytes you upload, straight to storage through short-lived links.
|
|
53
|
+
|
|
54
|
+
There is no telemetry. People keep a separate token of their own for their own decisions and administration; agents never use it.
|
|
55
|
+
|
|
56
|
+
## Development
|
|
57
|
+
|
|
58
|
+
`uv run --extra test python -m pytest tests -q` runs the tests. The contract tests run against a scratch WIRK service when `WIRK_TEST_URL` and `WIRK_TEST_ADMIN_TOKEN_FILE` are set.
|
|
59
|
+
|
|
60
|
+
## Releasing
|
|
61
|
+
|
|
62
|
+
A `v*` tag that matches the version in `pyproject.toml` runs the release workflow: tests, the wheel and the sdist, a GitHub Release with `SHA256SUMS`, and PyPI through trusted publishing. The PyPI step stays off until the `wirk` project on PyPI has this repository's `release.yml` and its `pypi` environment as a trusted publisher and the repository variable `PYPI_PUBLISH` is `true`. No token is stored anywhere.
|
|
63
|
+
|
|
64
|
+
## License
|
|
65
|
+
|
|
66
|
+
Apache-2.0. See [LICENSE](LICENSE).
|
wirk-0.3.0/install.sh
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Install WIRK on this machine: https://wirk.life/install
|
|
3
|
+
#
|
|
4
|
+
# curl -fsSL https://wirk.life/install | sh
|
|
5
|
+
# sh install.sh --dry-run show the steps without changing anything
|
|
6
|
+
# sh install.sh --yes answer yes to every question
|
|
7
|
+
# sh install.sh --url URL connect to another WIRK service
|
|
8
|
+
#
|
|
9
|
+
# It installs uv if it is missing (after asking), installs the wirk command and the wirk-mcp server from the
|
|
10
|
+
# release, checking their SHA-256 sums, sets up Claude Code and Codex when they are present (after asking), and
|
|
11
|
+
# runs wirk login. It never uses sudo, and running it again is safe.
|
|
12
|
+
set -eu
|
|
13
|
+
|
|
14
|
+
VERSION="${WIRK_VERSION:-0.3.0}"
|
|
15
|
+
BASE="${WIRK_RELEASE_BASE:-https://github.com/wirkspace}" # where the releases live; a mirror or a test may change it
|
|
16
|
+
DRY=0
|
|
17
|
+
YES=0
|
|
18
|
+
URL=""
|
|
19
|
+
|
|
20
|
+
while [ $# -gt 0 ]; do
|
|
21
|
+
case "$1" in
|
|
22
|
+
--dry-run) DRY=1 ;;
|
|
23
|
+
--yes | -y) YES=1 ;;
|
|
24
|
+
--url) shift; URL="${1:?--url needs the service address}" ;;
|
|
25
|
+
-h | --help) sed -n '2,11p' "$0" 2> /dev/null || true; exit 0 ;;
|
|
26
|
+
*) echo "install.sh: unknown option $1 (try --help)" >&2; exit 2 ;;
|
|
27
|
+
esac
|
|
28
|
+
shift
|
|
29
|
+
done
|
|
30
|
+
|
|
31
|
+
TMP=$(mktemp -d)
|
|
32
|
+
trap 'rm -rf "$TMP"' EXIT
|
|
33
|
+
|
|
34
|
+
ok() { printf ' \342\234\223 %s\n' "$*"; } # ✓
|
|
35
|
+
note() { printf ' - %s\n' "$*"; }
|
|
36
|
+
fail() { printf '\n%s\n' "$*" >&2; exit 1; }
|
|
37
|
+
|
|
38
|
+
quietly() { # run a step without its chatter; show the chatter only if it fails (a dry run shows the command)
|
|
39
|
+
if [ "$DRY" -eq 1 ]; then printf ' would run: %s\n' "$*"; return 0; fi
|
|
40
|
+
"$@" > "$TMP/log" 2>&1 || { cat "$TMP/log" >&2; fail "This step failed: $*"; }
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
ask() { # yes or no from the person at the terminal; --yes and --dry-run say yes, no terminal says no
|
|
44
|
+
if [ "$YES" -eq 1 ] || [ "$DRY" -eq 1 ]; then return 0; fi
|
|
45
|
+
answer=n
|
|
46
|
+
{ printf '%s [Y/n] ' "$1" > /dev/tty && read -r answer < /dev/tty; } 2> /dev/null || answer=n
|
|
47
|
+
case "$answer" in "" | y | Y | yes | Yes) return 0 ;; *) return 1 ;; esac
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
sha256() {
|
|
51
|
+
if command -v sha256sum > /dev/null 2>&1; then sha256sum "$1" | cut -d' ' -f1; else shasum -a 256 "$1" | cut -d' ' -f1; fi
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
fetch() { # fetch REPO FILE: one release file, checked against that release's SHA256SUMS
|
|
55
|
+
quietly curl -fsSL -o "$TMP/$1.sums" "$BASE/$1/releases/download/v$VERSION/SHA256SUMS"
|
|
56
|
+
quietly curl -fsSL -o "$TMP/$2" "$BASE/$1/releases/download/v$VERSION/$2"
|
|
57
|
+
if [ "$DRY" -eq 1 ]; then return 0; fi
|
|
58
|
+
want=$(awk -v name="$2" '$2 == name { print $1 }' "$TMP/$1.sums")
|
|
59
|
+
if [ -z "$want" ] || [ "$want" != "$(sha256 "$TMP/$2")" ]; then
|
|
60
|
+
fail "$2 does not match its SHA-256 sum in the $1 release; nothing was installed."
|
|
61
|
+
fi
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
printf 'Installing WIRK %s\n' "$VERSION"
|
|
65
|
+
if [ "$DRY" -eq 1 ]; then printf '(dry run: nothing will be changed)\n'; fi
|
|
66
|
+
printf '\n'
|
|
67
|
+
|
|
68
|
+
# uv installs the two commands, each in its own environment
|
|
69
|
+
UV=$(command -v uv 2> /dev/null || true)
|
|
70
|
+
for candidate in "${XDG_BIN_HOME:-}/uv" "$HOME/.local/bin/uv"; do
|
|
71
|
+
if [ -z "$UV" ] && [ -x "$candidate" ]; then UV="$candidate"; fi
|
|
72
|
+
done
|
|
73
|
+
if [ -n "$UV" ]; then
|
|
74
|
+
ok "uv is installed"
|
|
75
|
+
elif ask "WIRK installs with uv, which is missing. Install uv from astral.sh into your home folder?"; then
|
|
76
|
+
quietly sh -c 'curl -LsSf https://astral.sh/uv/install.sh | sh'
|
|
77
|
+
UV="${XDG_BIN_HOME:-$HOME/.local/bin}/uv"
|
|
78
|
+
ok "uv installed"
|
|
79
|
+
else
|
|
80
|
+
fail "WIRK needs uv. Install it (curl -LsSf https://astral.sh/uv/install.sh | sh, or brew install uv), then run this again."
|
|
81
|
+
fi
|
|
82
|
+
|
|
83
|
+
# the wirk command and the wirk-mcp server
|
|
84
|
+
CLI="wirk-$VERSION-py3-none-any.whl"
|
|
85
|
+
MCP="wirk_mcp-$VERSION-py3-none-any.whl"
|
|
86
|
+
installed() { [ "$DRY" -eq 0 ] && "$UV" tool list 2> /dev/null | grep -qx "$1 v$VERSION"; }
|
|
87
|
+
if installed wirk && installed wirk-mcp; then
|
|
88
|
+
ok "wirk and wirk-mcp $VERSION are already installed"
|
|
89
|
+
else
|
|
90
|
+
fetch wirk-cli "$CLI"
|
|
91
|
+
fetch wirk-mcp "$MCP"
|
|
92
|
+
ok "Downloaded wirk and wirk-mcp $VERSION; their SHA-256 sums match the release"
|
|
93
|
+
quietly "$UV" tool install --force "$TMP/$CLI"
|
|
94
|
+
quietly "$UV" tool install --force "$TMP/$MCP" --with "$TMP/$CLI"
|
|
95
|
+
ok "Installed wirk and wirk-mcp"
|
|
96
|
+
fi
|
|
97
|
+
BIN=$("$UV" tool dir --bin 2> /dev/null || printf '%s' "$HOME/.local/bin")
|
|
98
|
+
|
|
99
|
+
# the agent hosts on this machine: the MCP server and the WIRK skill
|
|
100
|
+
for host in claude codex; do
|
|
101
|
+
if [ "$host" = claude ]; then name="Claude Code"; add="claude mcp add --scope user"; else name="Codex"; add="codex mcp add"; fi
|
|
102
|
+
if ! command -v "$host" > /dev/null 2>&1; then
|
|
103
|
+
note "$name is not installed; skipped"
|
|
104
|
+
continue
|
|
105
|
+
fi
|
|
106
|
+
if ! ask "Set up $name with the WIRK MCP server and skill?"; then
|
|
107
|
+
note "$name left as it is (later: $add wirk -- $BIN/wirk-mcp)"
|
|
108
|
+
continue
|
|
109
|
+
fi
|
|
110
|
+
if [ "$DRY" -eq 0 ] && "$host" mcp get wirk > /dev/null 2>&1; then
|
|
111
|
+
note "$name already has an MCP server named wirk; left as it is"
|
|
112
|
+
else
|
|
113
|
+
# shellcheck disable=SC2086 # $add is two or three words on purpose
|
|
114
|
+
quietly $add wirk -- "$BIN/wirk-mcp"
|
|
115
|
+
fi
|
|
116
|
+
if [ -z "${SKILL:-}" ]; then fetch wirk-skill SKILL.md; SKILL=1; fi
|
|
117
|
+
quietly mkdir -p "$HOME/.$host/skills/wirk"
|
|
118
|
+
quietly cp "$TMP/SKILL.md" "$HOME/.$host/skills/wirk/SKILL.md"
|
|
119
|
+
ok "$name: the WIRK MCP server and skill"
|
|
120
|
+
done
|
|
121
|
+
|
|
122
|
+
# connect this machine
|
|
123
|
+
case ":$PATH:" in *":$BIN:"*) ;; *) note "To type wirk directly, add $BIN to your PATH (uv tool update-shell does it)" ;; esac
|
|
124
|
+
printf '\nConnecting this machine (wirk login)\n'
|
|
125
|
+
if [ -n "$URL" ]; then set -- login --url "$URL"; else set -- login; fi
|
|
126
|
+
if [ "$DRY" -eq 1 ]; then
|
|
127
|
+
printf ' would run: %s/wirk %s\n' "$BIN" "$*"
|
|
128
|
+
elif ! "$BIN/wirk" "$@"; then
|
|
129
|
+
printf '\nwirk login did not finish; run it again when you are ready: wirk login\n'
|
|
130
|
+
fi
|
|
131
|
+
printf '\nDone. Start with: wirk status\n'
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling>=1.27"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "wirk"
|
|
7
|
+
version = "0.3.0"
|
|
8
|
+
description = "The wirk command: status, query, write and review for people and agents in a WIRK wirkspace"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "Apache-2.0"
|
|
11
|
+
license-files = ["LICENSE"]
|
|
12
|
+
requires-python = ">=3.12"
|
|
13
|
+
dependencies = ["httpx>=0.27,<1"]
|
|
14
|
+
|
|
15
|
+
[project.optional-dependencies]
|
|
16
|
+
test = ["pytest>=8,<10", "pyyaml>=6"]
|
|
17
|
+
|
|
18
|
+
[project.urls]
|
|
19
|
+
Homepage = "https://wirk.life"
|
|
20
|
+
|
|
21
|
+
[project.scripts]
|
|
22
|
+
wirk = "wirk_cli.cli:main"
|
|
23
|
+
|
|
24
|
+
[tool.hatch.build.targets.wheel]
|
|
25
|
+
packages = ["src/wirk_cli"]
|
|
26
|
+
|
|
27
|
+
[tool.pytest.ini_options]
|
|
28
|
+
testpaths = ["tests"]
|