rylees 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,12 @@
1
+ # Required
2
+ #RYLEES_API_URL=http://api.rylees.test/v1
3
+ RYLEES_API_URL=https://api.rylees.ai/v1
4
+ RYLEES_API_TOKEN=
5
+ RYLEES_PROJECT_TOKEN=
6
+ OPENAI_API_KEY=
7
+
8
+ # Optional — overrides the temperature fetched from the API
9
+ # RYLEES_LLM_TEMPERATURE=0.5
10
+
11
+ # Optional — overrides the default model
12
+ RYLEES_LLM_MODEL=GPT-5.4
@@ -0,0 +1,9 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.pyc
4
+ *.egg-info/
5
+ .pytest_cache/
6
+ build/
7
+ dist/
8
+ .env
9
+ .idea
rylees-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,172 @@
1
+ Metadata-Version: 2.4
2
+ Name: rylees
3
+ Version: 0.1.0
4
+ Summary: LLM-assisted release note generator and publisher
5
+ Project-URL: Repository, https://github.com/zihmm/rylees
6
+ Author-email: Marc Zimmerli <marc@uniqode.ch>
7
+ License-Expression: MIT
8
+ Keywords: cli,git,llm,release-notes
9
+ Classifier: Environment :: Console
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Requires-Python: >=3.12
13
+ Requires-Dist: gitpython>=3.1
14
+ Requires-Dist: httpx>=0.27
15
+ Requires-Dist: langchain-openai>=0.2
16
+ Requires-Dist: python-dotenv>=1.0
17
+ Requires-Dist: typer>=0.12
18
+ Provides-Extra: dev
19
+ Requires-Dist: pytest-httpx>=0.30; extra == 'dev'
20
+ Requires-Dist: pytest>=8; extra == 'dev'
21
+ Requires-Dist: respx>=0.21; extra == 'dev'
22
+ Description-Content-Type: text/markdown
23
+
24
+ # Rylees CLI
25
+
26
+ An LLM-assisted release-note generator and publisher. `rylees` reads the diff
27
+ between two points in your Git history, asks an LLM to draft a release note in
28
+ your project's configured tone, lets you review or edit it, and publishes it to
29
+ the Rylees backend.
30
+
31
+ ## Requirements
32
+
33
+ - Python **3.12** or newer
34
+ - A Git repository to generate notes from
35
+ - A Rylees API token and project token (from the developer console)
36
+ - An OpenAI API key
37
+
38
+ ## Installation
39
+
40
+ The CLI is a standard PEP 517 package. Install it from the `src/cli` directory.
41
+
42
+ ### Using a virtual environment (recommended)
43
+
44
+ ```bash
45
+ cd src/cli
46
+ python3.12 -m venv .venv
47
+ source .venv/bin/activate
48
+ pip install .
49
+ ```
50
+
51
+ For development, install in editable mode with the dev dependencies:
52
+
53
+ ```bash
54
+ pip install -e ".[dev]"
55
+ ```
56
+
57
+ ### Using uv
58
+
59
+ ```bash
60
+ cd src/cli
61
+ uv venv
62
+ uv pip install -e ".[dev]"
63
+ ```
64
+
65
+ Once installed, the `rylees` command is available on your `PATH` (inside the
66
+ activated environment):
67
+
68
+ ```bash
69
+ rylees --version
70
+ ```
71
+
72
+ ## Configuration
73
+
74
+ `rylees` reads configuration from a `.env` file in your **current working
75
+ directory** (it searches upward from the cwd, not from the CLI's install
76
+ location). Copy the bundled example and fill in your values:
77
+
78
+ ```bash
79
+ cp .env.example .env
80
+ ```
81
+
82
+ | Variable | Required | Description |
83
+ | --- | --- | --- |
84
+ | `RYLEES_API_TOKEN` | yes | Authenticates you against the Rylees API. |
85
+ | `RYLEES_PROJECT_TOKEN` | yes | Identifies the project to publish notes to. |
86
+ | `OPENAI_API_KEY` | yes | Used by the LLM to draft the release note. |
87
+ | `RYLEES_API_URL` | no | Override the base API URL. Default: `https://api.rylees.ai/v1`. |
88
+ | `RYLEES_LLM_TEMPERATURE` | no | Override the temperature configured on the project. |
89
+ | `RYLEES_LLM_MODEL` | no | Override the model. Default: `GPT-5.4`. |
90
+
91
+ If a required variable is missing, the CLI exits with an error naming the
92
+ variable.
93
+
94
+ ## Usage
95
+
96
+ Run `rylees` from the root of the Git repository you want to generate notes for.
97
+
98
+ ```bash
99
+ rylees generate --start <ref> [options]
100
+ ```
101
+
102
+ ### Options
103
+
104
+ | Option | Alias | Default | Description |
105
+ | --- | --- | --- | --- |
106
+ | `--start` | `-s` | *(required)* | Start tag or commit hash. |
107
+ | `--end` | `-e` | `HEAD` | End tag or commit hash. |
108
+ | `--type` | `-t` | `tag` | Reference type: `tag` or `commit`. |
109
+ | `--major` | | | Bump the major version. |
110
+ | `--minor` | | (default) | Bump the minor version. |
111
+ | `--patch` | | | Bump the patch version. |
112
+ | `--publish` | `-p` | off | Skip the review step and publish immediately. |
113
+
114
+ Only one of `--major`, `--minor`, `--patch` may be set. If none is given,
115
+ `--minor` is assumed.
116
+
117
+ ### Examples
118
+
119
+ Generate a note for the changes between two tags and review it interactively:
120
+
121
+ ```bash
122
+ rylees generate --start v1.2.0 --end v1.3.0 --minor
123
+ ```
124
+
125
+ Generate from a range of commits instead of tags:
126
+
127
+ ```bash
128
+ rylees generate --type commit --start a1b2c3d --end HEAD
129
+ ```
130
+
131
+ Generate and publish a major release without manual review (use with care —
132
+ this skips human review and prints a warning to stderr):
133
+
134
+ ```bash
135
+ rylees generate --start v1.0.0 --major --publish
136
+ ```
137
+
138
+ ### Interactive review (HITL)
139
+
140
+ Without `--publish`, the CLI prints the generated draft and prompts for an
141
+ action:
142
+
143
+ ```
144
+ [A] Accept and publish [R] Regenerate [E] Edit
145
+ ```
146
+
147
+ - **A** — publish the current draft to the Rylees backend.
148
+ - **R** — regenerate a fresh draft from the same diff.
149
+ - **E** — open the draft in your editor (`$EDITOR`, default `nano`), then return
150
+ to the prompt with your edits.
151
+
152
+ On a successful publish, the CLI prints the resulting status and version.
153
+
154
+ ## How it works
155
+
156
+ 1. Loads and validates configuration from `.env`.
157
+ 2. Fetches the project's configuration (tone, temperature) from the Rylees API.
158
+ 3. Opens the local Git repository and computes the diff between `--start` and
159
+ `--end`.
160
+ 4. Strips noise (binary and lock-file diffs) and truncates the diff to fit the
161
+ LLM context window.
162
+ 5. Generates a release-note draft in the project's configured tonality.
163
+ 6. Lets you review, regenerate, or edit the draft — then publishes it.
164
+
165
+ ## Development
166
+
167
+ Run the test suite from `src/cli`:
168
+
169
+ ```bash
170
+ pip install -e ".[dev]"
171
+ pytest
172
+ ```
rylees-0.1.0/README.md ADDED
@@ -0,0 +1,149 @@
1
+ # Rylees CLI
2
+
3
+ An LLM-assisted release-note generator and publisher. `rylees` reads the diff
4
+ between two points in your Git history, asks an LLM to draft a release note in
5
+ your project's configured tone, lets you review or edit it, and publishes it to
6
+ the Rylees backend.
7
+
8
+ ## Requirements
9
+
10
+ - Python **3.12** or newer
11
+ - A Git repository to generate notes from
12
+ - A Rylees API token and project token (from the developer console)
13
+ - An OpenAI API key
14
+
15
+ ## Installation
16
+
17
+ The CLI is a standard PEP 517 package. Install it from the `src/cli` directory.
18
+
19
+ ### Using a virtual environment (recommended)
20
+
21
+ ```bash
22
+ cd src/cli
23
+ python3.12 -m venv .venv
24
+ source .venv/bin/activate
25
+ pip install .
26
+ ```
27
+
28
+ For development, install in editable mode with the dev dependencies:
29
+
30
+ ```bash
31
+ pip install -e ".[dev]"
32
+ ```
33
+
34
+ ### Using uv
35
+
36
+ ```bash
37
+ cd src/cli
38
+ uv venv
39
+ uv pip install -e ".[dev]"
40
+ ```
41
+
42
+ Once installed, the `rylees` command is available on your `PATH` (inside the
43
+ activated environment):
44
+
45
+ ```bash
46
+ rylees --version
47
+ ```
48
+
49
+ ## Configuration
50
+
51
+ `rylees` reads configuration from a `.env` file in your **current working
52
+ directory** (it searches upward from the cwd, not from the CLI's install
53
+ location). Copy the bundled example and fill in your values:
54
+
55
+ ```bash
56
+ cp .env.example .env
57
+ ```
58
+
59
+ | Variable | Required | Description |
60
+ | --- | --- | --- |
61
+ | `RYLEES_API_TOKEN` | yes | Authenticates you against the Rylees API. |
62
+ | `RYLEES_PROJECT_TOKEN` | yes | Identifies the project to publish notes to. |
63
+ | `OPENAI_API_KEY` | yes | Used by the LLM to draft the release note. |
64
+ | `RYLEES_API_URL` | no | Override the base API URL. Default: `https://api.rylees.ai/v1`. |
65
+ | `RYLEES_LLM_TEMPERATURE` | no | Override the temperature configured on the project. |
66
+ | `RYLEES_LLM_MODEL` | no | Override the model. Default: `GPT-5.4`. |
67
+
68
+ If a required variable is missing, the CLI exits with an error naming the
69
+ variable.
70
+
71
+ ## Usage
72
+
73
+ Run `rylees` from the root of the Git repository you want to generate notes for.
74
+
75
+ ```bash
76
+ rylees generate --start <ref> [options]
77
+ ```
78
+
79
+ ### Options
80
+
81
+ | Option | Alias | Default | Description |
82
+ | --- | --- | --- | --- |
83
+ | `--start` | `-s` | *(required)* | Start tag or commit hash. |
84
+ | `--end` | `-e` | `HEAD` | End tag or commit hash. |
85
+ | `--type` | `-t` | `tag` | Reference type: `tag` or `commit`. |
86
+ | `--major` | | | Bump the major version. |
87
+ | `--minor` | | (default) | Bump the minor version. |
88
+ | `--patch` | | | Bump the patch version. |
89
+ | `--publish` | `-p` | off | Skip the review step and publish immediately. |
90
+
91
+ Only one of `--major`, `--minor`, `--patch` may be set. If none is given,
92
+ `--minor` is assumed.
93
+
94
+ ### Examples
95
+
96
+ Generate a note for the changes between two tags and review it interactively:
97
+
98
+ ```bash
99
+ rylees generate --start v1.2.0 --end v1.3.0 --minor
100
+ ```
101
+
102
+ Generate from a range of commits instead of tags:
103
+
104
+ ```bash
105
+ rylees generate --type commit --start a1b2c3d --end HEAD
106
+ ```
107
+
108
+ Generate and publish a major release without manual review (use with care —
109
+ this skips human review and prints a warning to stderr):
110
+
111
+ ```bash
112
+ rylees generate --start v1.0.0 --major --publish
113
+ ```
114
+
115
+ ### Interactive review (HITL)
116
+
117
+ Without `--publish`, the CLI prints the generated draft and prompts for an
118
+ action:
119
+
120
+ ```
121
+ [A] Accept and publish [R] Regenerate [E] Edit
122
+ ```
123
+
124
+ - **A** — publish the current draft to the Rylees backend.
125
+ - **R** — regenerate a fresh draft from the same diff.
126
+ - **E** — open the draft in your editor (`$EDITOR`, default `nano`), then return
127
+ to the prompt with your edits.
128
+
129
+ On a successful publish, the CLI prints the resulting status and version.
130
+
131
+ ## How it works
132
+
133
+ 1. Loads and validates configuration from `.env`.
134
+ 2. Fetches the project's configuration (tone, temperature) from the Rylees API.
135
+ 3. Opens the local Git repository and computes the diff between `--start` and
136
+ `--end`.
137
+ 4. Strips noise (binary and lock-file diffs) and truncates the diff to fit the
138
+ LLM context window.
139
+ 5. Generates a release-note draft in the project's configured tonality.
140
+ 6. Lets you review, regenerate, or edit the draft — then publishes it.
141
+
142
+ ## Development
143
+
144
+ Run the test suite from `src/cli`:
145
+
146
+ ```bash
147
+ pip install -e ".[dev]"
148
+ pytest
149
+ ```
File without changes
@@ -0,0 +1,40 @@
1
+ import httpx
2
+ from app.models import ProjectConfig, PublishPayload, PublishResponse
3
+
4
+ BASE_URL = "https://api.rylees.ai/v1"
5
+
6
+ class ApiClient:
7
+ def __init__(self, api_token: str, base_url: str = BASE_URL):
8
+ self._client = httpx.Client(
9
+ base_url=base_url,
10
+ headers={"Authorization": f"Bearer {api_token}"},
11
+ timeout=30.0,
12
+ )
13
+
14
+ def get_project(self, project_token: str) -> ProjectConfig:
15
+ response = self._client.get(f"/projects/{project_token}")
16
+ response.raise_for_status()
17
+ data = response.json()
18
+ return ProjectConfig(
19
+ id=data["id"],
20
+ name=data["name"],
21
+ key=data["key"],
22
+ description=data.get("description", ""),
23
+ customer_name=data["customer"]["name"],
24
+ customer_industry=data["customer"]["industry"],
25
+ llm_temperature=data["llm"]["temperature"],
26
+ llm_tonality=data["llm"]["tonality"],
27
+ )
28
+
29
+ def publish_release_note(
30
+ self, project_token: str, payload: PublishPayload
31
+ ) -> PublishResponse:
32
+ response = self._client.post(
33
+ f"/projects/{project_token}/release-history",
34
+ json=payload,
35
+ )
36
+ response.raise_for_status()
37
+ return response.json()
38
+
39
+ def close(self):
40
+ self._client.close()