clua 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.
clua-0.1.0/LICENSE ADDED
@@ -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 or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided 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 modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party 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.
clua-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,116 @@
1
+ Metadata-Version: 2.4
2
+ Name: clua
3
+ Version: 0.1.0
4
+ Summary: Clua command-line access
5
+ License-Expression: Apache-2.0
6
+ License-File: LICENSE
7
+ Classifier: Environment :: Console
8
+ Classifier: Operating System :: MacOS
9
+ Classifier: Operating System :: POSIX :: Linux
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.14
12
+ Requires-Dist: xiii-cli-core>=0.1.0,<0.2
13
+ Requires-Python: >=3.14, <3.15
14
+ Project-URL: Source, https://github.com/clua-hq/clua-cli
15
+ Project-URL: Issues, https://github.com/clua-hq/clua-cli/issues
16
+ Description-Content-Type: text/markdown
17
+
18
+ # Clua CLI
19
+
20
+ Command-line access to Clua: sign in, call the product modules and the API.
21
+
22
+ ## Install
23
+
24
+ ```console
25
+ uv tool install clua
26
+ ```
27
+
28
+ The CLI needs Python 3.14; [uv](https://docs.astral.sh/uv/) downloads it when
29
+ the machine does not have it. With pipx, name the interpreter yourself:
30
+ `pipx install --python 3.14 clua`. Update with `uv tool upgrade clua`.
31
+ The CLI runs on macOS and Linux.
32
+
33
+ ## Use
34
+
35
+ ```console
36
+ clua login
37
+ clua doctor
38
+ clua tasks list --json
39
+ clua --help
40
+ ```
41
+
42
+ The CLI talks to the production API (`https://api.clua.nulara.de/v1/app`)
43
+ unless `--api-url`, `CLUA_API_URL` or the nearest `.clua.toml`
44
+ (`api_url = "…"`) names another one.
45
+
46
+ `clua login` opens the browser for consent, or prints a code to approve on
47
+ another device when no browser can be opened here. It stores an hour-long token
48
+ and its refresh token in the operating-system keyring (service `clua-cli`) and
49
+ renews it automatically. For automation, set `CLUA_API_TOKEN` to a personal
50
+ access token from the app's API key settings instead. Which workspace a command
51
+ acts as is kept in `~/.config/clua/state.json` (`$XDG_CONFIG_HOME/clua/` when
52
+ that is set); the file holds no secrets.
53
+
54
+ `clua.nulara.de` runs without a language model, so `clua agent run` and the
55
+ `agents`, `skills` and `threads` commands answer 404 there.
56
+
57
+ ## Claude Code
58
+
59
+ ```console
60
+ clua claude-code install
61
+ ```
62
+
63
+ installs a skill that teaches Claude Code the CLI: signing in, `--json`,
64
+ `--dry-run` and `--yes`, the exit codes, `--all` and `describe`. It goes to
65
+ `~/.claude/skills/clua/`; `--project` puts it into `.claude/skills/` of the
66
+ current directory instead. `clua claude-code show` prints it for other agents.
67
+
68
+ ## Scripts and agents
69
+
70
+ Every command that prints data takes `--json` and then writes exactly one JSON
71
+ document to stdout. A failure writes one JSON object to stderr instead and
72
+ exits with a code that names the kind of failure:
73
+
74
+ | Exit | `error` | Meaning |
75
+ | ---- | -------------------------- | ----------------------------------------------- |
76
+ | 0 | | Success |
77
+ | 1 | `runtime_error` | Local failure, e.g. a mutation without `--yes` |
78
+ | 2 | `configuration_error` | Configuration or workspace selection is invalid |
79
+ | 3 | `authentication_error` | No token, or the API rejected it (401) |
80
+ | 4 | `authorization_error` | The token may not do this (403) |
81
+ | 5 | `api_error` | Any other API error response |
82
+ | 7 | `thread_protocol_error` | The agent stream broke its protocol |
83
+ | 8 | `thread_expectation_error` | An agent run missed an expectation |
84
+ | 9 | `usage_error` | The command line did not parse |
85
+ | 10 | `network_error` | The API could not be reached |
86
+ | 11 | `rate_limit_error` | Still rate limited after the retries (429) |
87
+
88
+ A command that changes data asks for confirmation; in a script pass `--yes`,
89
+ and `--dry-run` prints the request without sending it. `clua describe tasks
90
+ create` prints a command's arguments, options, request schema and an example
91
+ command line as JSON, without signing in.
92
+
93
+ ## Layout
94
+
95
+ The product-neutral core is the package
96
+ [`xiii-cli-core`](https://github.com/xiii-hq/xiii-cli-core), which the
97
+ Nulara CLI shares: `clua` builds a `xiii_cli_core.config.Product` and hands
98
+ it to `xiii_cli_core.main.build_app`. `src/clua/spec.json` is the command
99
+ manifest, generated from the app API's OpenAPI document; it is never edited by
100
+ hand.
101
+
102
+ ## Development
103
+
104
+ ```console
105
+ uv sync --locked
106
+ uv run pytest --cov=clua
107
+ uv run ruff check && uv run ruff format --check && uv run pyright
108
+ ```
109
+
110
+ A release is a GitHub release whose tag is `v<version>` from `pyproject.toml`;
111
+ `.github/workflows/publish.yml` builds, verifies and publishes it to PyPI with
112
+ an attestation.
113
+
114
+ ## License
115
+
116
+ [Apache-2.0](LICENSE)
clua-0.1.0/README.md ADDED
@@ -0,0 +1,99 @@
1
+ # Clua CLI
2
+
3
+ Command-line access to Clua: sign in, call the product modules and the API.
4
+
5
+ ## Install
6
+
7
+ ```console
8
+ uv tool install clua
9
+ ```
10
+
11
+ The CLI needs Python 3.14; [uv](https://docs.astral.sh/uv/) downloads it when
12
+ the machine does not have it. With pipx, name the interpreter yourself:
13
+ `pipx install --python 3.14 clua`. Update with `uv tool upgrade clua`.
14
+ The CLI runs on macOS and Linux.
15
+
16
+ ## Use
17
+
18
+ ```console
19
+ clua login
20
+ clua doctor
21
+ clua tasks list --json
22
+ clua --help
23
+ ```
24
+
25
+ The CLI talks to the production API (`https://api.clua.nulara.de/v1/app`)
26
+ unless `--api-url`, `CLUA_API_URL` or the nearest `.clua.toml`
27
+ (`api_url = "…"`) names another one.
28
+
29
+ `clua login` opens the browser for consent, or prints a code to approve on
30
+ another device when no browser can be opened here. It stores an hour-long token
31
+ and its refresh token in the operating-system keyring (service `clua-cli`) and
32
+ renews it automatically. For automation, set `CLUA_API_TOKEN` to a personal
33
+ access token from the app's API key settings instead. Which workspace a command
34
+ acts as is kept in `~/.config/clua/state.json` (`$XDG_CONFIG_HOME/clua/` when
35
+ that is set); the file holds no secrets.
36
+
37
+ `clua.nulara.de` runs without a language model, so `clua agent run` and the
38
+ `agents`, `skills` and `threads` commands answer 404 there.
39
+
40
+ ## Claude Code
41
+
42
+ ```console
43
+ clua claude-code install
44
+ ```
45
+
46
+ installs a skill that teaches Claude Code the CLI: signing in, `--json`,
47
+ `--dry-run` and `--yes`, the exit codes, `--all` and `describe`. It goes to
48
+ `~/.claude/skills/clua/`; `--project` puts it into `.claude/skills/` of the
49
+ current directory instead. `clua claude-code show` prints it for other agents.
50
+
51
+ ## Scripts and agents
52
+
53
+ Every command that prints data takes `--json` and then writes exactly one JSON
54
+ document to stdout. A failure writes one JSON object to stderr instead and
55
+ exits with a code that names the kind of failure:
56
+
57
+ | Exit | `error` | Meaning |
58
+ | ---- | -------------------------- | ----------------------------------------------- |
59
+ | 0 | | Success |
60
+ | 1 | `runtime_error` | Local failure, e.g. a mutation without `--yes` |
61
+ | 2 | `configuration_error` | Configuration or workspace selection is invalid |
62
+ | 3 | `authentication_error` | No token, or the API rejected it (401) |
63
+ | 4 | `authorization_error` | The token may not do this (403) |
64
+ | 5 | `api_error` | Any other API error response |
65
+ | 7 | `thread_protocol_error` | The agent stream broke its protocol |
66
+ | 8 | `thread_expectation_error` | An agent run missed an expectation |
67
+ | 9 | `usage_error` | The command line did not parse |
68
+ | 10 | `network_error` | The API could not be reached |
69
+ | 11 | `rate_limit_error` | Still rate limited after the retries (429) |
70
+
71
+ A command that changes data asks for confirmation; in a script pass `--yes`,
72
+ and `--dry-run` prints the request without sending it. `clua describe tasks
73
+ create` prints a command's arguments, options, request schema and an example
74
+ command line as JSON, without signing in.
75
+
76
+ ## Layout
77
+
78
+ The product-neutral core is the package
79
+ [`xiii-cli-core`](https://github.com/xiii-hq/xiii-cli-core), which the
80
+ Nulara CLI shares: `clua` builds a `xiii_cli_core.config.Product` and hands
81
+ it to `xiii_cli_core.main.build_app`. `src/clua/spec.json` is the command
82
+ manifest, generated from the app API's OpenAPI document; it is never edited by
83
+ hand.
84
+
85
+ ## Development
86
+
87
+ ```console
88
+ uv sync --locked
89
+ uv run pytest --cov=clua
90
+ uv run ruff check && uv run ruff format --check && uv run pyright
91
+ ```
92
+
93
+ A release is a GitHub release whose tag is `v<version>` from `pyproject.toml`;
94
+ `.github/workflows/publish.yml` builds, verifies and publishes it to PyPI with
95
+ an attestation.
96
+
97
+ ## License
98
+
99
+ [Apache-2.0](LICENSE)
@@ -0,0 +1,65 @@
1
+ [project]
2
+ name = "clua"
3
+ version = "0.1.0"
4
+ description = "Clua command-line access"
5
+ readme = "README.md"
6
+ license = "Apache-2.0"
7
+ license-files = ["LICENSE"]
8
+ requires-python = ">=3.14,<3.15"
9
+ classifiers = [
10
+ "Environment :: Console",
11
+ "Operating System :: MacOS",
12
+ "Operating System :: POSIX :: Linux",
13
+ "Programming Language :: Python :: 3",
14
+ "Programming Language :: Python :: 3.14",
15
+ ]
16
+ dependencies = [
17
+ "xiii-cli-core>=0.1.0,<0.2",
18
+ ]
19
+
20
+ [project.urls]
21
+ Source = "https://github.com/clua-hq/clua-cli"
22
+ Issues = "https://github.com/clua-hq/clua-cli/issues"
23
+
24
+ [project.scripts]
25
+ clua = "clua:main"
26
+
27
+ [dependency-groups]
28
+ dev = [
29
+ "pyright~=1.1.400",
30
+ "pytest~=9.0.3",
31
+ "pytest-cov~=7.0.0",
32
+ "ruff~=0.14.0",
33
+ ]
34
+
35
+ [build-system]
36
+ requires = ["uv_build>=0.11.15,<0.12.0"]
37
+ build-backend = "uv_build"
38
+
39
+ [tool.pyright]
40
+ include = ["src", "tests"]
41
+ pythonVersion = "3.14"
42
+ typeCheckingMode = "basic"
43
+ venvPath = "."
44
+ venv = ".venv"
45
+
46
+ [tool.ruff]
47
+ target-version = "py314"
48
+ line-length = 88
49
+
50
+ [tool.ruff.lint]
51
+ select = ["E", "W", "F", "I", "B", "C4", "UP", "SIM"]
52
+ ignore = ["E501"]
53
+
54
+ [tool.ruff.format]
55
+ quote-style = "double"
56
+
57
+ [tool.coverage.run]
58
+ branch = true
59
+ source = ["clua"]
60
+
61
+ [tool.coverage.report]
62
+ fail_under = 98
63
+ precision = 2
64
+ show_missing = true
65
+ skip_empty = true
@@ -0,0 +1,22 @@
1
+ from importlib.metadata import version
2
+ from importlib.resources import files
3
+
4
+ from xiii_cli_core.config import Product, Surface
5
+ from xiii_cli_core.main import build_app, run
6
+
7
+ PRODUCT = Product(
8
+ name="clua",
9
+ display_name="Clua",
10
+ api_url="https://api.clua.nulara.de/v1/app",
11
+ oauth_client_id="clua-cli",
12
+ manifest=files(__name__).joinpath("spec.json"),
13
+ version=version("clua"),
14
+ skill=files(__name__).joinpath("skill/SKILL.md"),
15
+ )
16
+
17
+
18
+ def main() -> None:
19
+ run(lambda: build_app(PRODUCT, Surface.CUSTOMER))
20
+
21
+
22
+ __all__ = ["PRODUCT", "main"]
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: clua
3
+ description: Work in a Clua workspace through the `clua` command-line tool. Use when the user asks to read, create or change tasks, projects, companies, contacts, deals, time entries, calendar events, knowledge articles or other Clua data, or to read anything from their Clua workspace.
4
+ ---
5
+
6
+ # Clua CLI
7
+
8
+ `clua` calls the Clua API for the workspace the user signed in to. Every
9
+ product module is a command group (`clua tasks …`, `clua time-entries …`)
10
+ whose commands mirror the API one to one.
11
+
12
+ ## Rules
13
+
14
+ - Pass `--json` to every command. Data goes to stdout as one JSON document; a
15
+ failure is one JSON object on stderr and a non-zero exit code. Never parse
16
+ the human output.
17
+ - A command that changes data refuses to run without `--yes` outside a
18
+ terminal. Before the first change, show the user what you will do; run the
19
+ same command with `--dry-run` to print the request without sending it.
20
+ - Never guess a command or option. Ask the CLI:
21
+ - `clua describe` lists the modules and their commands,
22
+ - `clua describe <module>` lists one module's commands,
23
+ - `clua describe <module> <command>` prints arguments, options, the
24
+ request schema, required fields and an example command line.
25
+ - A list that pages takes `--all` and then prints `{"items": […], "total": n}`;
26
+ add `--max-items N` to stop early. Without `--all` you get one page.
27
+ - A field whose value is JSON, or a whole body, can be passed as a file with
28
+ `--input body.json` (or `--input -` for stdin) instead of single options.
29
+ - A command that returns a file (an export, an attachment) needs
30
+ `--output <path>`; with `--json` it reports where the file went.
31
+ - `clua.nulara.de` runs without a language model. `clua agent run` and the
32
+ `agents`, `skills` and `threads` commands answer 404 there; you are the
33
+ model, so use the typed commands.
34
+
35
+ ## Sign in
36
+
37
+ Check first: `clua doctor --json`. Exit 0 means ready. Exit 3 means the user
38
+ has to sign in; ask them to run `clua login` themselves (it opens a browser
39
+ for their consent). In CI the environment variable `CLUA_API_TOKEN` holds an
40
+ API key instead. `clua workspace use <name>` switches between workspaces the
41
+ user signed in to; `--workspace <name>` overrides it for one command.
42
+
43
+ ## Exit codes
44
+
45
+ | Exit | `error` | What to do |
46
+ | ---- | ---------------------- | ---------------------------------------------------------- |
47
+ | 0 | | Success |
48
+ | 1 | `runtime_error` | Read `message`; often a missing `--yes` |
49
+ | 2 | `configuration_error` | Configuration or workspace selection is wrong |
50
+ | 3 | `authentication_error` | Ask the user to run `clua login` |
51
+ | 4 | `authorization_error` | The user or key lacks the right; tell the user |
52
+ | 5 | `api_error` | The API refused; `code` names why, `detail` has the fields |
53
+ | 9 | `usage_error` | The command line was wrong; check `describe` |
54
+ | 10 | `network_error` | The API was unreachable; retry later |
55
+ | 11 | `rate_limit_error` | Wait `retry_after` seconds, then retry |
56
+
57
+ Reads are retried on network errors and server errors already, and every
58
+ request on a rate limit, so do not wrap commands in your own retry loop.
59
+ A 422 `api_error` lists the invalid fields in `detail`; fix them and send the
60
+ command again.
61
+
62
+ ## Common work
63
+
64
+ ```console
65
+ clua tasks list --all --json
66
+ clua tasks create --title "Angebot nachfassen" --project-id <project-id> --yes --json
67
+ clua time-entries start-timer --dry-run --json
68
+ clua time-entries get-timesheet --week-start 2026-11-23 --json
69
+ clua companies list --search "<name>" --json
70
+ clua deals list --all --json
71
+ ```
72
+
73
+ Check every option with `clua describe <module> <command>` before the first
74
+ call; the examples above only show the shape.