blog-cli 0.4.0__tar.gz → 0.4.2__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.
Files changed (28) hide show
  1. {blog_cli-0.4.0 → blog_cli-0.4.2}/PKG-INFO +15 -74
  2. {blog_cli-0.4.0 → blog_cli-0.4.2}/README.md +12 -71
  3. {blog_cli-0.4.0 → blog_cli-0.4.2}/pyproject.toml +3 -6
  4. {blog_cli-0.4.0 → blog_cli-0.4.2}/src/blog_cli.egg-info/PKG-INFO +15 -74
  5. {blog_cli-0.4.0 → blog_cli-0.4.2}/src/blog_cli.egg-info/SOURCES.txt +2 -7
  6. {blog_cli-0.4.0 → blog_cli-0.4.2}/src/personal_cli/cli.py +142 -248
  7. {blog_cli-0.4.0 → blog_cli-0.4.2}/src/personal_cli/client.py +12 -36
  8. {blog_cli-0.4.0 → blog_cli-0.4.2}/src/personal_cli/credentials.py +4 -13
  9. blog_cli-0.4.2/src/personal_cli/docker_keyring.py +59 -0
  10. {blog_cli-0.4.0 → blog_cli-0.4.2}/src/personal_cli/setup_server.py +15 -5
  11. {blog_cli-0.4.0 → blog_cli-0.4.2}/tests/test_cli.py +87 -111
  12. blog_cli-0.4.2/tests/test_setup_server.py +87 -0
  13. blog_cli-0.4.0/src/personal_cli/skill.py +0 -34
  14. blog_cli-0.4.0/src/personal_cli/skill_data/SKILL.md +0 -30
  15. blog_cli-0.4.0/src/personal_cli/skill_data/agents/openai.yaml +0 -7
  16. blog_cli-0.4.0/src/personal_cli/skill_data/references/articles.md +0 -46
  17. blog_cli-0.4.0/src/personal_cli/skill_data/references/pages.md +0 -132
  18. blog_cli-0.4.0/src/personal_cli/skill_data/references/projects.md +0 -50
  19. blog_cli-0.4.0/tests/test_pages_categories.py +0 -254
  20. {blog_cli-0.4.0 → blog_cli-0.4.2}/setup.cfg +0 -0
  21. {blog_cli-0.4.0 → blog_cli-0.4.2}/src/blog_cli.egg-info/dependency_links.txt +0 -0
  22. {blog_cli-0.4.0 → blog_cli-0.4.2}/src/blog_cli.egg-info/entry_points.txt +0 -0
  23. {blog_cli-0.4.0 → blog_cli-0.4.2}/src/blog_cli.egg-info/requires.txt +0 -0
  24. {blog_cli-0.4.0 → blog_cli-0.4.2}/src/blog_cli.egg-info/top_level.txt +0 -0
  25. {blog_cli-0.4.0 → blog_cli-0.4.2}/src/personal_cli/__init__.py +0 -0
  26. {blog_cli-0.4.0 → blog_cli-0.4.2}/src/personal_cli/__main__.py +0 -0
  27. {blog_cli-0.4.0 → blog_cli-0.4.2}/src/personal_cli/formatting.py +0 -0
  28. {blog_cli-0.4.0 → blog_cli-0.4.2}/tests/test_client.py +0 -0
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: blog-cli
3
- Version: 0.4.0
4
- Summary: Agent-friendly CLI for managing a personal site. Articles, projects, categories, private pages, media, and a bundled ChatGPT/Codex skill.
3
+ Version: 0.4.2
4
+ Summary: Agent-friendly CLI for managing a personal site. Articles, projects, services, media, and a bundled ChatGPT/Codex skill.
5
5
  Author: tanaka-mambinge
6
6
  License: MIT
7
7
  Project-URL: Repository, https://github.com/tanaka-mambinge/personal-cli
8
8
  Project-URL: Issues, https://github.com/tanaka-mambinge/personal-cli/issues
9
- Keywords: blog,cli,agent,markdown,writing,mdx,cms,dashboard
9
+ Keywords: blog,cli,agent,markdown,writing,mdx,cms
10
10
  Classifier: License :: OSI Approved :: MIT License
11
11
  Classifier: Operating System :: OS Independent
12
12
  Classifier: Programming Language :: Python :: 3
@@ -37,7 +37,7 @@ Agent-friendly CLI for managing a personal blog: create drafts, upload media, ge
37
37
  From PyPI:
38
38
 
39
39
  ```bash
40
- pip install blog-cli
40
+ pip install -U blog-cli
41
41
  ```
42
42
 
43
43
  Or install it as an isolated command-line tool:
@@ -57,23 +57,16 @@ uv sync --extra dev
57
57
 
58
58
  ## Configure
59
59
 
60
- The CLI requires the API URL and API key. The site URL is required for preview links.
60
+ The CLI stores the server URL, API key, and site URL in its configured keyring
61
+ backend. On first use it prints a local setup URL; open it in a browser, enter
62
+ the three values, and submit. The values are validated against the server
63
+ before they are saved.
61
64
 
62
- ```bash
63
- export PERSONAL_SERVER_URL="https://api.example.com"
64
- export PERSONAL_API_KEY="your-api-key"
65
- export PERSONAL_SITE_URL="https://example.com"
66
- ```
67
-
68
- For local development, put the same variables in a `.env` file in the current directory. Do not commit that file.
69
-
70
- Production installations use the same environment variables. For example:
65
+ For local development, run the CLI through `scripts/docker-cli`. Docker uses a
66
+ persistent container-only credential volume and never mounts the host keyring:
71
67
 
72
68
  ```bash
73
- PERSONAL_SERVER_URL="https://api.example.com" \
74
- PERSONAL_API_KEY="your-production-api-key" \
75
- PERSONAL_SITE_URL="https://example.com" \
76
- blog-cli article list --type blog
69
+ ./scripts/docker-cli run article list --type blog
77
70
  ```
78
71
 
79
72
  All commands support `--json` for machine-readable output and `--server-url` to override the configured API URL for one command. Commands also support `--insecure` to skip TLS certificate verification when needed for local development.
@@ -162,12 +155,6 @@ Override the configured site URL for a preview:
162
155
  blog-cli article preview my-post --site-url https://preview.example.com
163
156
  ```
164
157
 
165
- Revoke an existing preview link:
166
-
167
- ```bash
168
- blog-cli article revoke-preview my-post
169
- ```
170
-
171
158
  Publish an article explicitly:
172
159
 
173
160
  ```bash
@@ -194,56 +181,9 @@ blog-cli article tag-add my-project --tag python --tag agents
194
181
  blog-cli article tag-remove my-project --tag agents
195
182
  ```
196
183
 
197
- ## Categories
198
-
199
- Categories are first-class models that group private content pages. The slug is auto-derived from the name. A category cannot be deleted while pages still belong to it.
200
-
201
- ```bash
202
- # Create (slug auto from name, e.g. "YouTube Notes" -> "youtube-notes")
203
- blog-cli category create --name "Ideas" --icon bulb --description "Captured ideas"
204
-
205
- # List / show / update / delete
206
- blog-cli category list
207
- blog-cli category show ideas
208
- blog-cli category update ideas --name "Idea Box" --icon lightbulb
209
- blog-cli category delete ideas
210
- ```
211
-
212
- ## Pages
213
-
214
- Pages are private content shown only on the dashboard at `/d/<slug>`. They are for your eyes only. Each page belongs to a category and supports MDX with prebuilt components (`<Callout>`, `<Steps>`, `<ImageGrid>`, `<Video>`, `<Figure>`).
215
-
216
- ```bash
217
- # Create a page
218
- blog-cli page create \
219
- --title "An idea" \
220
- --description "Short summary" \
221
- --category ideas \
222
- --tag web --tag ai \
223
- --markdown-file idea.mdx
224
-
225
- # List (optionally filter by category)
226
- blog-cli page list
227
- blog-cli page list --category ideas
228
-
229
- # Show / update / delete
230
- blog-cli page show an-idea
231
- blog-cli page update an-idea --title "A better title"
232
- blog-cli page update an-idea --markdown-file updated.mdx
233
- blog-cli page delete an-idea
234
- ```
235
-
236
- Page bodies are MDX. Referenced media uses names uploaded via `blog-cli media upload --name <name> <file>`; the site resolves names to media URLs at render time.
237
-
238
184
  ## ChatGPT / Codex skill
239
185
 
240
- The CLI ships a bundled `content-pipeline` skill that routes blog, project, and page tasks to the right reference doc. Install it into the user-level skills directory:
241
-
242
- ```bash
243
- blog-cli skill install
244
- blog-cli skill uninstall
245
- blog-cli skill path
246
- ```
186
+ The repository skill lives at `skills/blog-cli/SKILL.md`. It is loaded by agents from the repository and is not managed through CLI commands.
247
187
 
248
188
  ## Media
249
189
 
@@ -299,10 +239,11 @@ Use the version from `pyproject.toml` when creating the tag.
299
239
  ## Testing
300
240
 
301
241
  ```bash
302
- uv run pytest -v
242
+ ./scripts/docker-cli test
303
243
  ```
304
244
 
305
- The CLI tests use an in-memory fake API client, so they run without MongoDB or the personal server. The CLI architecture is:
245
+ The CLI tests use an in-memory fake API client, run with networking disabled,
246
+ and reuse Docker's cached dependencies. The CLI architecture is:
306
247
 
307
248
  ```text
308
249
  blog-cli (httpx) → FastAPI server → MongoDB/GridFS
@@ -7,7 +7,7 @@ Agent-friendly CLI for managing a personal blog: create drafts, upload media, ge
7
7
  From PyPI:
8
8
 
9
9
  ```bash
10
- pip install blog-cli
10
+ pip install -U blog-cli
11
11
  ```
12
12
 
13
13
  Or install it as an isolated command-line tool:
@@ -27,23 +27,16 @@ uv sync --extra dev
27
27
 
28
28
  ## Configure
29
29
 
30
- The CLI requires the API URL and API key. The site URL is required for preview links.
30
+ The CLI stores the server URL, API key, and site URL in its configured keyring
31
+ backend. On first use it prints a local setup URL; open it in a browser, enter
32
+ the three values, and submit. The values are validated against the server
33
+ before they are saved.
31
34
 
32
- ```bash
33
- export PERSONAL_SERVER_URL="https://api.example.com"
34
- export PERSONAL_API_KEY="your-api-key"
35
- export PERSONAL_SITE_URL="https://example.com"
36
- ```
37
-
38
- For local development, put the same variables in a `.env` file in the current directory. Do not commit that file.
39
-
40
- Production installations use the same environment variables. For example:
35
+ For local development, run the CLI through `scripts/docker-cli`. Docker uses a
36
+ persistent container-only credential volume and never mounts the host keyring:
41
37
 
42
38
  ```bash
43
- PERSONAL_SERVER_URL="https://api.example.com" \
44
- PERSONAL_API_KEY="your-production-api-key" \
45
- PERSONAL_SITE_URL="https://example.com" \
46
- blog-cli article list --type blog
39
+ ./scripts/docker-cli run article list --type blog
47
40
  ```
48
41
 
49
42
  All commands support `--json` for machine-readable output and `--server-url` to override the configured API URL for one command. Commands also support `--insecure` to skip TLS certificate verification when needed for local development.
@@ -132,12 +125,6 @@ Override the configured site URL for a preview:
132
125
  blog-cli article preview my-post --site-url https://preview.example.com
133
126
  ```
134
127
 
135
- Revoke an existing preview link:
136
-
137
- ```bash
138
- blog-cli article revoke-preview my-post
139
- ```
140
-
141
128
  Publish an article explicitly:
142
129
 
143
130
  ```bash
@@ -164,56 +151,9 @@ blog-cli article tag-add my-project --tag python --tag agents
164
151
  blog-cli article tag-remove my-project --tag agents
165
152
  ```
166
153
 
167
- ## Categories
168
-
169
- Categories are first-class models that group private content pages. The slug is auto-derived from the name. A category cannot be deleted while pages still belong to it.
170
-
171
- ```bash
172
- # Create (slug auto from name, e.g. "YouTube Notes" -> "youtube-notes")
173
- blog-cli category create --name "Ideas" --icon bulb --description "Captured ideas"
174
-
175
- # List / show / update / delete
176
- blog-cli category list
177
- blog-cli category show ideas
178
- blog-cli category update ideas --name "Idea Box" --icon lightbulb
179
- blog-cli category delete ideas
180
- ```
181
-
182
- ## Pages
183
-
184
- Pages are private content shown only on the dashboard at `/d/<slug>`. They are for your eyes only. Each page belongs to a category and supports MDX with prebuilt components (`<Callout>`, `<Steps>`, `<ImageGrid>`, `<Video>`, `<Figure>`).
185
-
186
- ```bash
187
- # Create a page
188
- blog-cli page create \
189
- --title "An idea" \
190
- --description "Short summary" \
191
- --category ideas \
192
- --tag web --tag ai \
193
- --markdown-file idea.mdx
194
-
195
- # List (optionally filter by category)
196
- blog-cli page list
197
- blog-cli page list --category ideas
198
-
199
- # Show / update / delete
200
- blog-cli page show an-idea
201
- blog-cli page update an-idea --title "A better title"
202
- blog-cli page update an-idea --markdown-file updated.mdx
203
- blog-cli page delete an-idea
204
- ```
205
-
206
- Page bodies are MDX. Referenced media uses names uploaded via `blog-cli media upload --name <name> <file>`; the site resolves names to media URLs at render time.
207
-
208
154
  ## ChatGPT / Codex skill
209
155
 
210
- The CLI ships a bundled `content-pipeline` skill that routes blog, project, and page tasks to the right reference doc. Install it into the user-level skills directory:
211
-
212
- ```bash
213
- blog-cli skill install
214
- blog-cli skill uninstall
215
- blog-cli skill path
216
- ```
156
+ The repository skill lives at `skills/blog-cli/SKILL.md`. It is loaded by agents from the repository and is not managed through CLI commands.
217
157
 
218
158
  ## Media
219
159
 
@@ -269,10 +209,11 @@ Use the version from `pyproject.toml` when creating the tag.
269
209
  ## Testing
270
210
 
271
211
  ```bash
272
- uv run pytest -v
212
+ ./scripts/docker-cli test
273
213
  ```
274
214
 
275
- The CLI tests use an in-memory fake API client, so they run without MongoDB or the personal server. The CLI architecture is:
215
+ The CLI tests use an in-memory fake API client, run with networking disabled,
216
+ and reuse Docker's cached dependencies. The CLI architecture is:
276
217
 
277
218
  ```text
278
219
  blog-cli (httpx) → FastAPI server → MongoDB/GridFS
@@ -4,13 +4,13 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "blog-cli"
7
- version = "0.4.0"
8
- description = "Agent-friendly CLI for managing a personal site. Articles, projects, categories, private pages, media, and a bundled ChatGPT/Codex skill."
7
+ version = "0.4.2"
8
+ description = "Agent-friendly CLI for managing a personal site. Articles, projects, services, media, and a bundled ChatGPT/Codex skill."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.13"
11
11
  license = {text = "MIT"}
12
12
  authors = [{name = "tanaka-mambinge"}]
13
- keywords = ["blog", "cli", "agent", "markdown", "writing", "mdx", "cms", "dashboard"]
13
+ keywords = ["blog", "cli", "agent", "markdown", "writing", "mdx", "cms"]
14
14
  classifiers = [
15
15
  "License :: OSI Approved :: MIT License",
16
16
  "Operating System :: OS Independent",
@@ -58,6 +58,3 @@ include-package-data = true
58
58
 
59
59
  [tool.setuptools.packages.find]
60
60
  where = ["src"]
61
-
62
- [tool.setuptools.package-data]
63
- personal_cli = ["skill_data/**/*"]
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: blog-cli
3
- Version: 0.4.0
4
- Summary: Agent-friendly CLI for managing a personal site. Articles, projects, categories, private pages, media, and a bundled ChatGPT/Codex skill.
3
+ Version: 0.4.2
4
+ Summary: Agent-friendly CLI for managing a personal site. Articles, projects, services, media, and a bundled ChatGPT/Codex skill.
5
5
  Author: tanaka-mambinge
6
6
  License: MIT
7
7
  Project-URL: Repository, https://github.com/tanaka-mambinge/personal-cli
8
8
  Project-URL: Issues, https://github.com/tanaka-mambinge/personal-cli/issues
9
- Keywords: blog,cli,agent,markdown,writing,mdx,cms,dashboard
9
+ Keywords: blog,cli,agent,markdown,writing,mdx,cms
10
10
  Classifier: License :: OSI Approved :: MIT License
11
11
  Classifier: Operating System :: OS Independent
12
12
  Classifier: Programming Language :: Python :: 3
@@ -37,7 +37,7 @@ Agent-friendly CLI for managing a personal blog: create drafts, upload media, ge
37
37
  From PyPI:
38
38
 
39
39
  ```bash
40
- pip install blog-cli
40
+ pip install -U blog-cli
41
41
  ```
42
42
 
43
43
  Or install it as an isolated command-line tool:
@@ -57,23 +57,16 @@ uv sync --extra dev
57
57
 
58
58
  ## Configure
59
59
 
60
- The CLI requires the API URL and API key. The site URL is required for preview links.
60
+ The CLI stores the server URL, API key, and site URL in its configured keyring
61
+ backend. On first use it prints a local setup URL; open it in a browser, enter
62
+ the three values, and submit. The values are validated against the server
63
+ before they are saved.
61
64
 
62
- ```bash
63
- export PERSONAL_SERVER_URL="https://api.example.com"
64
- export PERSONAL_API_KEY="your-api-key"
65
- export PERSONAL_SITE_URL="https://example.com"
66
- ```
67
-
68
- For local development, put the same variables in a `.env` file in the current directory. Do not commit that file.
69
-
70
- Production installations use the same environment variables. For example:
65
+ For local development, run the CLI through `scripts/docker-cli`. Docker uses a
66
+ persistent container-only credential volume and never mounts the host keyring:
71
67
 
72
68
  ```bash
73
- PERSONAL_SERVER_URL="https://api.example.com" \
74
- PERSONAL_API_KEY="your-production-api-key" \
75
- PERSONAL_SITE_URL="https://example.com" \
76
- blog-cli article list --type blog
69
+ ./scripts/docker-cli run article list --type blog
77
70
  ```
78
71
 
79
72
  All commands support `--json` for machine-readable output and `--server-url` to override the configured API URL for one command. Commands also support `--insecure` to skip TLS certificate verification when needed for local development.
@@ -162,12 +155,6 @@ Override the configured site URL for a preview:
162
155
  blog-cli article preview my-post --site-url https://preview.example.com
163
156
  ```
164
157
 
165
- Revoke an existing preview link:
166
-
167
- ```bash
168
- blog-cli article revoke-preview my-post
169
- ```
170
-
171
158
  Publish an article explicitly:
172
159
 
173
160
  ```bash
@@ -194,56 +181,9 @@ blog-cli article tag-add my-project --tag python --tag agents
194
181
  blog-cli article tag-remove my-project --tag agents
195
182
  ```
196
183
 
197
- ## Categories
198
-
199
- Categories are first-class models that group private content pages. The slug is auto-derived from the name. A category cannot be deleted while pages still belong to it.
200
-
201
- ```bash
202
- # Create (slug auto from name, e.g. "YouTube Notes" -> "youtube-notes")
203
- blog-cli category create --name "Ideas" --icon bulb --description "Captured ideas"
204
-
205
- # List / show / update / delete
206
- blog-cli category list
207
- blog-cli category show ideas
208
- blog-cli category update ideas --name "Idea Box" --icon lightbulb
209
- blog-cli category delete ideas
210
- ```
211
-
212
- ## Pages
213
-
214
- Pages are private content shown only on the dashboard at `/d/<slug>`. They are for your eyes only. Each page belongs to a category and supports MDX with prebuilt components (`<Callout>`, `<Steps>`, `<ImageGrid>`, `<Video>`, `<Figure>`).
215
-
216
- ```bash
217
- # Create a page
218
- blog-cli page create \
219
- --title "An idea" \
220
- --description "Short summary" \
221
- --category ideas \
222
- --tag web --tag ai \
223
- --markdown-file idea.mdx
224
-
225
- # List (optionally filter by category)
226
- blog-cli page list
227
- blog-cli page list --category ideas
228
-
229
- # Show / update / delete
230
- blog-cli page show an-idea
231
- blog-cli page update an-idea --title "A better title"
232
- blog-cli page update an-idea --markdown-file updated.mdx
233
- blog-cli page delete an-idea
234
- ```
235
-
236
- Page bodies are MDX. Referenced media uses names uploaded via `blog-cli media upload --name <name> <file>`; the site resolves names to media URLs at render time.
237
-
238
184
  ## ChatGPT / Codex skill
239
185
 
240
- The CLI ships a bundled `content-pipeline` skill that routes blog, project, and page tasks to the right reference doc. Install it into the user-level skills directory:
241
-
242
- ```bash
243
- blog-cli skill install
244
- blog-cli skill uninstall
245
- blog-cli skill path
246
- ```
186
+ The repository skill lives at `skills/blog-cli/SKILL.md`. It is loaded by agents from the repository and is not managed through CLI commands.
247
187
 
248
188
  ## Media
249
189
 
@@ -299,10 +239,11 @@ Use the version from `pyproject.toml` when creating the tag.
299
239
  ## Testing
300
240
 
301
241
  ```bash
302
- uv run pytest -v
242
+ ./scripts/docker-cli test
303
243
  ```
304
244
 
305
- The CLI tests use an in-memory fake API client, so they run without MongoDB or the personal server. The CLI architecture is:
245
+ The CLI tests use an in-memory fake API client, run with networking disabled,
246
+ and reuse Docker's cached dependencies. The CLI architecture is:
306
247
 
307
248
  ```text
308
249
  blog-cli (httpx) → FastAPI server → MongoDB/GridFS
@@ -11,14 +11,9 @@ src/personal_cli/__main__.py
11
11
  src/personal_cli/cli.py
12
12
  src/personal_cli/client.py
13
13
  src/personal_cli/credentials.py
14
+ src/personal_cli/docker_keyring.py
14
15
  src/personal_cli/formatting.py
15
16
  src/personal_cli/setup_server.py
16
- src/personal_cli/skill.py
17
- src/personal_cli/skill_data/SKILL.md
18
- src/personal_cli/skill_data/agents/openai.yaml
19
- src/personal_cli/skill_data/references/articles.md
20
- src/personal_cli/skill_data/references/pages.md
21
- src/personal_cli/skill_data/references/projects.md
22
17
  tests/test_cli.py
23
18
  tests/test_client.py
24
- tests/test_pages_categories.py
19
+ tests/test_setup_server.py