fmind 2.1.0__tar.gz → 3.0.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.
- fmind-3.0.0/PKG-INFO +168 -0
- fmind-3.0.0/README.md +141 -0
- {fmind-2.1.0 → fmind-3.0.0}/pyproject.toml +36 -8
- {fmind-2.1.0 → fmind-3.0.0}/pyproject.toml.orig +45 -8
- {fmind-2.1.0 → fmind-3.0.0}/src/fmind/api.py +47 -16
- {fmind-2.1.0 → fmind-3.0.0}/src/fmind/articles.py +11 -6
- {fmind-2.1.0 → fmind-3.0.0}/src/fmind/cli.py +5 -6
- {fmind-2.1.0 → fmind-3.0.0}/src/fmind/mcp.py +0 -2
- {fmind-2.1.0 → fmind-3.0.0}/src/fmind/news.py +11 -6
- {fmind-2.1.0 → fmind-3.0.0}/src/fmind/render.py +32 -20
- fmind-2.1.0/PKG-INFO +0 -171
- fmind-2.1.0/README.md +0 -146
- {fmind-2.1.0 → fmind-3.0.0}/LICENSE +0 -0
- {fmind-2.1.0 → fmind-3.0.0}/src/fmind/__init__.py +0 -0
- {fmind-2.1.0 → fmind-3.0.0}/src/fmind/__main__.py +0 -0
fmind-3.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fmind
|
|
3
|
+
Version: 3.0.0
|
|
4
|
+
Summary: Read Médéric Hurier's (Fmind) portfolio and daily news from the terminal.
|
|
5
|
+
Keywords: portfolio,cli,fmind,resume,articles,news,mcp
|
|
6
|
+
Author: Médéric Hurier
|
|
7
|
+
Author-email: Médéric Hurier <contact@fmind.dev>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Classifier: Environment :: Console
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
15
|
+
Classifier: Topic :: Utilities
|
|
16
|
+
Requires-Dist: typer>=0.26
|
|
17
|
+
Requires-Dist: rich>=13.9
|
|
18
|
+
Requires-Dist: httpx2>=2.12,<3 ; extra == 'mcp'
|
|
19
|
+
Requires-Dist: mcp>=2.2,<3 ; extra == 'mcp'
|
|
20
|
+
Requires-Dist: mcp-types>=2.2,<3 ; extra == 'mcp'
|
|
21
|
+
Requires-Python: >=3.14
|
|
22
|
+
Project-URL: Homepage, https://www.fmind.dev/
|
|
23
|
+
Project-URL: Source, https://github.com/fmind/cli
|
|
24
|
+
Project-URL: Issues, https://github.com/fmind/cli/issues
|
|
25
|
+
Provides-Extra: mcp
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
|
|
28
|
+
# fmind
|
|
29
|
+
|
|
30
|
+
Read [Médéric Hurier's (Fmind)](https://www.fmind.dev/) portfolio and daily tech news from the terminal, or bridge its `/mcp` server over stdio.
|
|
31
|
+
|
|
32
|
+
[](https://github.com/fmind/cli/actions/workflows/ci.yml) [](https://pypi.org/project/fmind/) [](https://pypi.org/project/fmind/) [](https://github.com/fmind/cli/blob/main/LICENSE)
|
|
33
|
+
|
|
34
|
+
<a href="https://raw.githubusercontent.com/fmind/cli/main/docs/assets/overview.svg">
|
|
35
|
+
<img
|
|
36
|
+
src="https://raw.githubusercontent.com/fmind/cli/main/docs/assets/overview.svg"
|
|
37
|
+
alt="fmind overview: live endpoints on www.fmind.dev (/api/profile, /api/news, /articles/<slug>.md, and /mcp) flow through the stateless fmind CLI (strict validation, 15s / 8 MiB bounds, zero local cache) to Rich terminal cards, --json / --raw shell pipelines, and MCP over stdio."
|
|
38
|
+
width="960"
|
|
39
|
+
>
|
|
40
|
+
</a>
|
|
41
|
+
|
|
42
|
+
## Install
|
|
43
|
+
|
|
44
|
+
Run immediately with [uv](https://docs.astral.sh/uv/), or install persistently:
|
|
45
|
+
|
|
46
|
+
```console
|
|
47
|
+
$ uvx fmind
|
|
48
|
+
Name Médéric Hurier (Fmind)
|
|
49
|
+
Role Freelance AI Architect
|
|
50
|
+
Headline Freelance AI Architect • AI Agents, MLOps & Security
|
|
51
|
+
…
|
|
52
|
+
Contact contact@fmind.dev
|
|
53
|
+
Website https://www.fmind.dev
|
|
54
|
+
…
|
|
55
|
+
|
|
56
|
+
fmind --help lists every command.
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
uv tool install fmind # portfolio and news commands
|
|
61
|
+
uv tool install 'fmind[mcp]' # include the stdio MCP bridge
|
|
62
|
+
pipx install fmind # alternative
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Override `FMIND_PROFILE_URL` to point profile, news, article reads, and `/mcp` at another origin (such as local `mise run watch`):
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
FMIND_PROFILE_URL=http://127.0.0.1:8080/api/profile fmind whoami
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Commands
|
|
72
|
+
|
|
73
|
+
| Command | Shows |
|
|
74
|
+
| ---------------------------------------------- | --------------------------------------------------------- |
|
|
75
|
+
| `fmind` | The `whoami` card and a pointer to `--help` |
|
|
76
|
+
| `fmind whoami` | Name, headline, location, experience, availability, links |
|
|
77
|
+
| `fmind about` | The biography |
|
|
78
|
+
| `fmind skills` | Core expertise, as published on the site |
|
|
79
|
+
| `fmind experiences` | Engagements in website order |
|
|
80
|
+
| `fmind certifications` | Certifications, the PhD, specializations |
|
|
81
|
+
| `fmind community` | Ambassador and advisory roles |
|
|
82
|
+
| `fmind papers` | The doctorate and the peer-reviewed papers, with code |
|
|
83
|
+
| `fmind projects [--limit 6]` | Open-source projects and video series, with code |
|
|
84
|
+
| `fmind sites` | Interactive tools published alongside the writing |
|
|
85
|
+
| `fmind articles [--limit 6]` | The most recent writing |
|
|
86
|
+
| `fmind search [query...] [--tag] [--limit 10]` | Articles matching every term, newest first |
|
|
87
|
+
| `fmind read <slug> [--raw]` | One article, rendered in the terminal |
|
|
88
|
+
| `fmind tags` | The article tags, with counts and their `search --tag` |
|
|
89
|
+
| `fmind news [query...] [--limit]` | Daily curated links, newest edition first |
|
|
90
|
+
| `fmind hire` | What can be booked right now |
|
|
91
|
+
|
|
92
|
+
Commands mirror the website's `/api/profile` and `/api/news` sections and stay stable across visual redesigns.
|
|
93
|
+
|
|
94
|
+
- `--limit` (`1`–`200`) bounds `articles`, `search`, `news` editions, and each `projects` list (`open_source` and `youtube_series`).
|
|
95
|
+
- `--json` works before or after any portfolio command (`fmind --json experiences` or `fmind experiences --json`) and takes precedence over `read --raw` (storing the source in `markdown`). Pipe to `jq` for custom filters.
|
|
96
|
+
- Global `--color` / `--no-color` (auto-detected, respecting `NO_COLOR` and redirects) and `--version` go before the command.
|
|
97
|
+
- Output uses terminal-default text and a blue accent, stacked entries for narrow widths, unwrapped OSC 8 links, and no trailing whitespace when redirected.
|
|
98
|
+
|
|
99
|
+
### Reading
|
|
100
|
+
|
|
101
|
+
`fmind search` ANDs terms case-insensitively across titles, summaries, tags, and slugs. `--tag` restricts to a published site tag (unknown tags fail and list valid ones).
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
fmind search agent security
|
|
105
|
+
fmind search --tag MLOps --limit 3
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
`fmind read` accepts an exact or unambiguous partial slug. On interactive terminals with a known non-`dumb` `TERM`, it pages via `$PAGER` (`less` with `LESS=FRX` unless `LESS` is set); `PAGER=cat` or a missing/unparsable `PAGER` prints directly, and pager launch or exit failures report an error (`PAGER=cat` retries without paging). `--raw` prints the Markdown source.
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
slug="$(fmind articles --limit 1 --json | jq -r '.[0].slug')"
|
|
112
|
+
fmind read "$slug"
|
|
113
|
+
fmind read "$slug" --raw | glow -
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### News
|
|
117
|
+
|
|
118
|
+
`fmind news` shows the latest daily edition of curated AI agent, Python, security, and cloud links. Terms AND-match link titles, domains, summaries, URLs, and edition dates or topics (`2026-11-06`, `2026-11`); `--limit` defaults to `1` (`10` when searching).
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
fmind news # latest edition
|
|
122
|
+
fmind news --limit 7 # past week
|
|
123
|
+
fmind news agent security # matching links, newest edition first
|
|
124
|
+
fmind news 2026-11-06 # one edition
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Piping
|
|
128
|
+
|
|
129
|
+
`--json` writes undecorated JSON to stdout and errors to stderr:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
fmind articles --limit 20 --json | jq -r '.[] | "\(.date[:10]) \(.title)"'
|
|
133
|
+
fmind certifications --json | jq -r '.certifications[] | select(.active) | .title'
|
|
134
|
+
fmind news --limit 7 --json | jq -r '.[].items[] | "\(.domain) \(.title)"'
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
`whoami --json` returns `metadata`, `experience` (the featured engagement, or `[]`), and `services`. `certifications --json` groups `certifications`, `thesis`, and `specializations`. `projects --json` groups `open_source` and `youtube_series` (each bounded by `--limit`). `news --json` lists editions, keeping only matching `items` when searching.
|
|
138
|
+
|
|
139
|
+
## MCP over stdio
|
|
140
|
+
|
|
141
|
+
Portfolio commands require only Typer and Rich; the optional `mcp` extra adds the [official MCP Python SDK](https://py.sdk.modelcontextprotocol.io/) (`uv tool install 'fmind[mcp]'` or `uv run --extra mcp fmind mcp` from a checkout):
|
|
142
|
+
|
|
143
|
+
```json
|
|
144
|
+
{
|
|
145
|
+
"mcpServers": {
|
|
146
|
+
"fmind": {
|
|
147
|
+
"command": "uvx",
|
|
148
|
+
"args": ["--from", "fmind[mcp]", "fmind", "mcp"]
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
`fmind mcp` bridges `https://www.fmind.dev/mcp` (or the `FMIND_PROFILE_URL` origin) from Streamable HTTP to protocol-only stdio without local caching (`--json` is rejected; startup errors go to stderr). Upstream MCP requests use finite JSON POSTs (`405` with `Allow: POST` on GET/HEAD; use `/health` for probes) and forward read-only tools, resources, and prompts (no subscriptions, sampling, or elicitation). Each exchange has a `15s` deadline and `8 MiB` response cap, failing individually without stopping the bridge.
|
|
155
|
+
|
|
156
|
+
## Development
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
mise install && mise run install # toolchain, locked venv, and git hooks
|
|
160
|
+
mise run all # format, check, test, build (CI gate)
|
|
161
|
+
mise run smoke # live API/article and MCP compatibility check
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
`mise tasks` lists individual `format`, `check` (`check:local` pre-commit; `check:network` + `test` pre-push), `test`, and `build` tasks. CI runs `mise run all` on Python 3.15, tests Python 3.14, and checks declared floors with `--resolution lowest-direct` on Python 3.14. Release tags (`vX.Y.Z` matching `pyproject.toml`) rerun CI and `mise run smoke` in CD before PyPI Trusted Publishing.
|
|
165
|
+
|
|
166
|
+
## License
|
|
167
|
+
|
|
168
|
+
[MIT](https://github.com/fmind/cli/blob/main/LICENSE) — © 2026 Médéric Hurier (Fmind).
|
fmind-3.0.0/README.md
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# fmind
|
|
2
|
+
|
|
3
|
+
Read [Médéric Hurier's (Fmind)](https://www.fmind.dev/) portfolio and daily tech news from the terminal, or bridge its `/mcp` server over stdio.
|
|
4
|
+
|
|
5
|
+
[](https://github.com/fmind/cli/actions/workflows/ci.yml) [](https://pypi.org/project/fmind/) [](https://pypi.org/project/fmind/) [](https://github.com/fmind/cli/blob/main/LICENSE)
|
|
6
|
+
|
|
7
|
+
<a href="https://raw.githubusercontent.com/fmind/cli/main/docs/assets/overview.svg">
|
|
8
|
+
<img
|
|
9
|
+
src="https://raw.githubusercontent.com/fmind/cli/main/docs/assets/overview.svg"
|
|
10
|
+
alt="fmind overview: live endpoints on www.fmind.dev (/api/profile, /api/news, /articles/<slug>.md, and /mcp) flow through the stateless fmind CLI (strict validation, 15s / 8 MiB bounds, zero local cache) to Rich terminal cards, --json / --raw shell pipelines, and MCP over stdio."
|
|
11
|
+
width="960"
|
|
12
|
+
>
|
|
13
|
+
</a>
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
Run immediately with [uv](https://docs.astral.sh/uv/), or install persistently:
|
|
18
|
+
|
|
19
|
+
```console
|
|
20
|
+
$ uvx fmind
|
|
21
|
+
Name Médéric Hurier (Fmind)
|
|
22
|
+
Role Freelance AI Architect
|
|
23
|
+
Headline Freelance AI Architect • AI Agents, MLOps & Security
|
|
24
|
+
…
|
|
25
|
+
Contact contact@fmind.dev
|
|
26
|
+
Website https://www.fmind.dev
|
|
27
|
+
…
|
|
28
|
+
|
|
29
|
+
fmind --help lists every command.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
uv tool install fmind # portfolio and news commands
|
|
34
|
+
uv tool install 'fmind[mcp]' # include the stdio MCP bridge
|
|
35
|
+
pipx install fmind # alternative
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Override `FMIND_PROFILE_URL` to point profile, news, article reads, and `/mcp` at another origin (such as local `mise run watch`):
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
FMIND_PROFILE_URL=http://127.0.0.1:8080/api/profile fmind whoami
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Commands
|
|
45
|
+
|
|
46
|
+
| Command | Shows |
|
|
47
|
+
| ---------------------------------------------- | --------------------------------------------------------- |
|
|
48
|
+
| `fmind` | The `whoami` card and a pointer to `--help` |
|
|
49
|
+
| `fmind whoami` | Name, headline, location, experience, availability, links |
|
|
50
|
+
| `fmind about` | The biography |
|
|
51
|
+
| `fmind skills` | Core expertise, as published on the site |
|
|
52
|
+
| `fmind experiences` | Engagements in website order |
|
|
53
|
+
| `fmind certifications` | Certifications, the PhD, specializations |
|
|
54
|
+
| `fmind community` | Ambassador and advisory roles |
|
|
55
|
+
| `fmind papers` | The doctorate and the peer-reviewed papers, with code |
|
|
56
|
+
| `fmind projects [--limit 6]` | Open-source projects and video series, with code |
|
|
57
|
+
| `fmind sites` | Interactive tools published alongside the writing |
|
|
58
|
+
| `fmind articles [--limit 6]` | The most recent writing |
|
|
59
|
+
| `fmind search [query...] [--tag] [--limit 10]` | Articles matching every term, newest first |
|
|
60
|
+
| `fmind read <slug> [--raw]` | One article, rendered in the terminal |
|
|
61
|
+
| `fmind tags` | The article tags, with counts and their `search --tag` |
|
|
62
|
+
| `fmind news [query...] [--limit]` | Daily curated links, newest edition first |
|
|
63
|
+
| `fmind hire` | What can be booked right now |
|
|
64
|
+
|
|
65
|
+
Commands mirror the website's `/api/profile` and `/api/news` sections and stay stable across visual redesigns.
|
|
66
|
+
|
|
67
|
+
- `--limit` (`1`–`200`) bounds `articles`, `search`, `news` editions, and each `projects` list (`open_source` and `youtube_series`).
|
|
68
|
+
- `--json` works before or after any portfolio command (`fmind --json experiences` or `fmind experiences --json`) and takes precedence over `read --raw` (storing the source in `markdown`). Pipe to `jq` for custom filters.
|
|
69
|
+
- Global `--color` / `--no-color` (auto-detected, respecting `NO_COLOR` and redirects) and `--version` go before the command.
|
|
70
|
+
- Output uses terminal-default text and a blue accent, stacked entries for narrow widths, unwrapped OSC 8 links, and no trailing whitespace when redirected.
|
|
71
|
+
|
|
72
|
+
### Reading
|
|
73
|
+
|
|
74
|
+
`fmind search` ANDs terms case-insensitively across titles, summaries, tags, and slugs. `--tag` restricts to a published site tag (unknown tags fail and list valid ones).
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
fmind search agent security
|
|
78
|
+
fmind search --tag MLOps --limit 3
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`fmind read` accepts an exact or unambiguous partial slug. On interactive terminals with a known non-`dumb` `TERM`, it pages via `$PAGER` (`less` with `LESS=FRX` unless `LESS` is set); `PAGER=cat` or a missing/unparsable `PAGER` prints directly, and pager launch or exit failures report an error (`PAGER=cat` retries without paging). `--raw` prints the Markdown source.
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
slug="$(fmind articles --limit 1 --json | jq -r '.[0].slug')"
|
|
85
|
+
fmind read "$slug"
|
|
86
|
+
fmind read "$slug" --raw | glow -
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### News
|
|
90
|
+
|
|
91
|
+
`fmind news` shows the latest daily edition of curated AI agent, Python, security, and cloud links. Terms AND-match link titles, domains, summaries, URLs, and edition dates or topics (`2026-11-06`, `2026-11`); `--limit` defaults to `1` (`10` when searching).
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
fmind news # latest edition
|
|
95
|
+
fmind news --limit 7 # past week
|
|
96
|
+
fmind news agent security # matching links, newest edition first
|
|
97
|
+
fmind news 2026-11-06 # one edition
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Piping
|
|
101
|
+
|
|
102
|
+
`--json` writes undecorated JSON to stdout and errors to stderr:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
fmind articles --limit 20 --json | jq -r '.[] | "\(.date[:10]) \(.title)"'
|
|
106
|
+
fmind certifications --json | jq -r '.certifications[] | select(.active) | .title'
|
|
107
|
+
fmind news --limit 7 --json | jq -r '.[].items[] | "\(.domain) \(.title)"'
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
`whoami --json` returns `metadata`, `experience` (the featured engagement, or `[]`), and `services`. `certifications --json` groups `certifications`, `thesis`, and `specializations`. `projects --json` groups `open_source` and `youtube_series` (each bounded by `--limit`). `news --json` lists editions, keeping only matching `items` when searching.
|
|
111
|
+
|
|
112
|
+
## MCP over stdio
|
|
113
|
+
|
|
114
|
+
Portfolio commands require only Typer and Rich; the optional `mcp` extra adds the [official MCP Python SDK](https://py.sdk.modelcontextprotocol.io/) (`uv tool install 'fmind[mcp]'` or `uv run --extra mcp fmind mcp` from a checkout):
|
|
115
|
+
|
|
116
|
+
```json
|
|
117
|
+
{
|
|
118
|
+
"mcpServers": {
|
|
119
|
+
"fmind": {
|
|
120
|
+
"command": "uvx",
|
|
121
|
+
"args": ["--from", "fmind[mcp]", "fmind", "mcp"]
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
`fmind mcp` bridges `https://www.fmind.dev/mcp` (or the `FMIND_PROFILE_URL` origin) from Streamable HTTP to protocol-only stdio without local caching (`--json` is rejected; startup errors go to stderr). Upstream MCP requests use finite JSON POSTs (`405` with `Allow: POST` on GET/HEAD; use `/health` for probes) and forward read-only tools, resources, and prompts (no subscriptions, sampling, or elicitation). Each exchange has a `15s` deadline and `8 MiB` response cap, failing individually without stopping the bridge.
|
|
128
|
+
|
|
129
|
+
## Development
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
mise install && mise run install # toolchain, locked venv, and git hooks
|
|
133
|
+
mise run all # format, check, test, build (CI gate)
|
|
134
|
+
mise run smoke # live API/article and MCP compatibility check
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
`mise tasks` lists individual `format`, `check` (`check:local` pre-commit; `check:network` + `test` pre-push), `test`, and `build` tasks. CI runs `mise run all` on Python 3.15, tests Python 3.14, and checks declared floors with `--resolution lowest-direct` on Python 3.14. Release tags (`vX.Y.Z` matching `pyproject.toml`) rerun CI and `mise run smoke` in CD before PyPI Trusted Publishing.
|
|
138
|
+
|
|
139
|
+
## License
|
|
140
|
+
|
|
141
|
+
[MIT](https://github.com/fmind/cli/blob/main/LICENSE) — © 2026 Médéric Hurier (Fmind).
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "fmind"
|
|
3
|
-
version = "
|
|
3
|
+
version = "3.0.0"
|
|
4
4
|
description = "Read Médéric Hurier's (Fmind) portfolio and daily news from the terminal."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "MIT"
|
|
7
7
|
license-files = ["LICENSE"]
|
|
8
|
-
requires-python = ">=3.
|
|
8
|
+
requires-python = ">=3.14"
|
|
9
9
|
keywords = [
|
|
10
10
|
"portfolio",
|
|
11
11
|
"cli",
|
|
@@ -19,6 +19,8 @@ classifiers = [
|
|
|
19
19
|
"Environment :: Console",
|
|
20
20
|
"Intended Audience :: Developers",
|
|
21
21
|
"Programming Language :: Python :: 3 :: Only",
|
|
22
|
+
"Programming Language :: Python :: 3.14",
|
|
23
|
+
"Programming Language :: Python :: 3.15",
|
|
22
24
|
"Topic :: Utilities",
|
|
23
25
|
]
|
|
24
26
|
dependencies = [
|
|
@@ -50,7 +52,7 @@ dev = [
|
|
|
50
52
|
"pytest>=8.3",
|
|
51
53
|
"pytest-cov>=6.0",
|
|
52
54
|
"ruff>=0.9",
|
|
53
|
-
"ty>=0.0.
|
|
55
|
+
"ty>=0.0.101,<0.1",
|
|
54
56
|
]
|
|
55
57
|
|
|
56
58
|
[build-system]
|
|
@@ -63,20 +65,39 @@ module-root = "src"
|
|
|
63
65
|
|
|
64
66
|
[tool.ruff]
|
|
65
67
|
line-length = 120
|
|
66
|
-
|
|
68
|
+
extend-exclude = ["*.md"]
|
|
67
69
|
|
|
68
70
|
[tool.ruff.lint]
|
|
69
71
|
select = [
|
|
72
|
+
"A",
|
|
73
|
+
"ASYNC",
|
|
74
|
+
"B",
|
|
75
|
+
"C4",
|
|
70
76
|
"E",
|
|
77
|
+
"ERA",
|
|
71
78
|
"F",
|
|
79
|
+
"FURB",
|
|
72
80
|
"I",
|
|
81
|
+
"ISC",
|
|
82
|
+
"LOG",
|
|
73
83
|
"N",
|
|
74
|
-
"
|
|
75
|
-
"
|
|
84
|
+
"PERF",
|
|
85
|
+
"PGH",
|
|
86
|
+
"PIE",
|
|
87
|
+
"PT",
|
|
88
|
+
"PTH",
|
|
89
|
+
"Q",
|
|
90
|
+
"RET",
|
|
91
|
+
"RSE",
|
|
92
|
+
"RUF",
|
|
76
93
|
"S",
|
|
77
94
|
"SIM",
|
|
78
|
-
"
|
|
95
|
+
"SLF",
|
|
96
|
+
"T10",
|
|
97
|
+
"T20",
|
|
79
98
|
"TID",
|
|
99
|
+
"UP",
|
|
100
|
+
"W",
|
|
80
101
|
]
|
|
81
102
|
|
|
82
103
|
[tool.ruff.lint.flake8-tidy-imports]
|
|
@@ -91,16 +112,23 @@ banned-module-level-imports = [
|
|
|
91
112
|
"src/fmind/mcp.py" = ["TID253"]
|
|
92
113
|
"tests/**" = [
|
|
93
114
|
"S101",
|
|
115
|
+
"SLF001",
|
|
116
|
+
"T201",
|
|
94
117
|
"TID253",
|
|
95
118
|
]
|
|
96
119
|
|
|
97
120
|
[tool.ruff.format]
|
|
98
121
|
docstring-code-format = true
|
|
122
|
+
line-ending = "lf"
|
|
123
|
+
|
|
124
|
+
[tool.ty.rules]
|
|
125
|
+
blanket-ignore-comment = "error"
|
|
99
126
|
|
|
100
127
|
[tool.pytest.ini_options]
|
|
101
|
-
addopts = "-ra --strict-markers --cov=fmind --cov-branch --cov-fail-under=85"
|
|
128
|
+
addopts = "-ra --strict-config --strict-markers --cov=fmind --cov-branch --cov-fail-under=85"
|
|
102
129
|
testpaths = ["tests"]
|
|
103
130
|
filterwarnings = ["error"]
|
|
131
|
+
xfail_strict = true
|
|
104
132
|
|
|
105
133
|
[tool.coverage.report]
|
|
106
134
|
exclude_also = [
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
# https://packaging.python.org/en/latest/specifications/pyproject-toml/
|
|
1
|
+
# Docs: https://packaging.python.org/en/latest/specifications/pyproject-toml/
|
|
2
2
|
[project]
|
|
3
3
|
name = "fmind"
|
|
4
|
-
version = "
|
|
4
|
+
version = "3.0.0"
|
|
5
5
|
description = "Read Médéric Hurier's (Fmind) portfolio and daily news from the terminal."
|
|
6
6
|
readme = "README.md"
|
|
7
7
|
license = "MIT"
|
|
8
8
|
license-files = ["LICENSE"]
|
|
9
9
|
authors = [{ name = "Médéric Hurier", email = "contact@fmind.dev" }]
|
|
10
|
-
requires-python = ">=3.
|
|
10
|
+
requires-python = ">=3.14"
|
|
11
11
|
keywords = ["portfolio", "cli", "fmind", "resume", "articles", "news", "mcp"]
|
|
12
12
|
classifiers = [
|
|
13
13
|
"Environment :: Console",
|
|
14
14
|
"Intended Audience :: Developers",
|
|
15
15
|
"Programming Language :: Python :: 3 :: Only",
|
|
16
|
+
"Programming Language :: Python :: 3.14",
|
|
17
|
+
"Programming Language :: Python :: 3.15",
|
|
16
18
|
"Topic :: Utilities",
|
|
17
19
|
]
|
|
18
20
|
dependencies = ["typer>=0.26", "rich>=13.9"]
|
|
@@ -37,7 +39,7 @@ dev = [
|
|
|
37
39
|
"pytest>=8.3",
|
|
38
40
|
"pytest-cov>=6.0",
|
|
39
41
|
"ruff>=0.9",
|
|
40
|
-
"ty>=0.0.
|
|
42
|
+
"ty>=0.0.101,<0.1",
|
|
41
43
|
]
|
|
42
44
|
|
|
43
45
|
[build-system]
|
|
@@ -50,22 +52,57 @@ module-root = "src"
|
|
|
50
52
|
|
|
51
53
|
[tool.ruff]
|
|
52
54
|
line-length = 120
|
|
53
|
-
|
|
55
|
+
extend-exclude = ["*.md"]
|
|
54
56
|
[tool.ruff.lint]
|
|
55
|
-
select = [
|
|
57
|
+
select = [
|
|
58
|
+
"A",
|
|
59
|
+
"ASYNC",
|
|
60
|
+
"B",
|
|
61
|
+
"C4",
|
|
62
|
+
"E",
|
|
63
|
+
"ERA",
|
|
64
|
+
"F",
|
|
65
|
+
"FURB",
|
|
66
|
+
"I",
|
|
67
|
+
"ISC",
|
|
68
|
+
"LOG",
|
|
69
|
+
"N",
|
|
70
|
+
"PERF",
|
|
71
|
+
"PGH",
|
|
72
|
+
"PIE",
|
|
73
|
+
"PT",
|
|
74
|
+
"PTH",
|
|
75
|
+
"Q",
|
|
76
|
+
"RET",
|
|
77
|
+
"RSE",
|
|
78
|
+
"RUF",
|
|
79
|
+
"S",
|
|
80
|
+
"SIM",
|
|
81
|
+
"SLF",
|
|
82
|
+
"T10",
|
|
83
|
+
"T20",
|
|
84
|
+
"TID",
|
|
85
|
+
"UP",
|
|
86
|
+
"W",
|
|
87
|
+
]
|
|
56
88
|
[tool.ruff.lint.flake8-tidy-imports]
|
|
57
89
|
# Portfolio commands run without the optional `mcp` extra; only the bridge loads it.
|
|
58
90
|
banned-module-level-imports = ["fmind.mcp", "httpx2", "mcp", "mcp_types"]
|
|
59
91
|
[tool.ruff.lint.per-file-ignores]
|
|
60
92
|
"src/fmind/mcp.py" = ["TID253"] # the bridge is the extra's only importer
|
|
61
|
-
"tests/**" = ["S101", "TID253"] #
|
|
93
|
+
"tests/**" = ["S101", "SLF001", "T201", "TID253"] # tests assert, inspect layer internals, and install every extra
|
|
62
94
|
[tool.ruff.format]
|
|
63
95
|
docstring-code-format = true
|
|
96
|
+
line-ending = "lf"
|
|
97
|
+
|
|
98
|
+
[tool.ty.rules]
|
|
99
|
+
blanket-ignore-comment = "error"
|
|
64
100
|
|
|
65
101
|
[tool.pytest.ini_options]
|
|
66
|
-
addopts = "-ra --strict-markers --cov=fmind --cov-branch --cov-fail-under=85"
|
|
102
|
+
addopts = "-ra --strict-config --strict-markers --cov=fmind --cov-branch --cov-fail-under=85"
|
|
67
103
|
testpaths = ["tests"]
|
|
68
104
|
filterwarnings = ["error"]
|
|
105
|
+
xfail_strict = true
|
|
69
106
|
|
|
70
107
|
[tool.coverage.report]
|
|
71
108
|
exclude_also = ["if __name__ == .__main__.:", "raise NotImplementedError"]
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"""Fetch and validate the live documents published by www.fmind.dev."""
|
|
2
2
|
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
3
|
import http.client
|
|
6
4
|
import json
|
|
7
5
|
import math
|
|
@@ -144,6 +142,31 @@ def _download(url: str, accept: str = "application/json") -> bytes:
|
|
|
144
142
|
return outcome
|
|
145
143
|
|
|
146
144
|
|
|
145
|
+
class _RedirectHandler(urllib.request.HTTPRedirectHandler):
|
|
146
|
+
"""Allow only safe HTTP(S) redirects without credentials or HTTPS downgrades."""
|
|
147
|
+
|
|
148
|
+
def redirect_request(
|
|
149
|
+
self,
|
|
150
|
+
req: urllib.request.Request,
|
|
151
|
+
fp: Any,
|
|
152
|
+
code: int,
|
|
153
|
+
msg: str,
|
|
154
|
+
headers: Any,
|
|
155
|
+
newurl: str,
|
|
156
|
+
) -> urllib.request.Request | None:
|
|
157
|
+
source = _http_url(req.full_url)
|
|
158
|
+
try:
|
|
159
|
+
target = _http_url(newurl)
|
|
160
|
+
except FmindError as error:
|
|
161
|
+
raise FmindError("the website redirected to an unsafe URL") from error
|
|
162
|
+
if source.scheme == "https" and target.scheme != "https":
|
|
163
|
+
raise FmindError("the website redirected from HTTPS to plain HTTP")
|
|
164
|
+
return super().redirect_request(req, fp, code, msg, headers, newurl)
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
_OPENER = urllib.request.build_opener(_RedirectHandler())
|
|
168
|
+
|
|
169
|
+
|
|
147
170
|
def _fetch(url: str, accept: str, deadline: float) -> bytes:
|
|
148
171
|
"""Perform bounded I/O; never print or mutate caller state from the worker."""
|
|
149
172
|
# Ask intermediary HTTP caches to revalidate too; no local copy is kept.
|
|
@@ -152,20 +175,24 @@ def _fetch(url: str, accept: str, deadline: float) -> bytes:
|
|
|
152
175
|
if time.monotonic() >= deadline:
|
|
153
176
|
raise TimeoutError("website request deadline exceeded")
|
|
154
177
|
request = urllib.request.Request(url, headers=headers) # noqa: S310
|
|
155
|
-
with
|
|
156
|
-
payload = bytearray()
|
|
157
|
-
while len(payload) <= MAX_BYTES:
|
|
158
|
-
if time.monotonic() >= deadline:
|
|
159
|
-
raise TimeoutError("website request deadline exceeded")
|
|
160
|
-
# read() can wait indefinitely for a slowly progressing body.
|
|
161
|
-
# read1() returns after at most one underlying read.
|
|
162
|
-
chunk = response.read1(min(64 * 1024, MAX_BYTES + 1 - len(payload)))
|
|
163
|
-
if not chunk:
|
|
164
|
-
break
|
|
165
|
-
payload.extend(chunk)
|
|
178
|
+
with _OPENER.open(request, timeout=TIMEOUT_SECONDS) as response:
|
|
166
179
|
length = response.headers.get("Content-Length")
|
|
167
|
-
|
|
168
|
-
|
|
180
|
+
expected = int(length) if length is not None else None
|
|
181
|
+
if expected is not None and expected < 0:
|
|
182
|
+
raise ValueError("negative Content-Length")
|
|
183
|
+
payload = bytearray()
|
|
184
|
+
if expected is None or expected <= MAX_BYTES:
|
|
185
|
+
while len(payload) <= MAX_BYTES:
|
|
186
|
+
if time.monotonic() >= deadline:
|
|
187
|
+
raise TimeoutError("website request deadline exceeded")
|
|
188
|
+
# read() can wait indefinitely for a slowly progressing body.
|
|
189
|
+
# read1() returns after at most one underlying read.
|
|
190
|
+
chunk = response.read1(min(64 * 1024, MAX_BYTES + 1 - len(payload)))
|
|
191
|
+
if not chunk:
|
|
192
|
+
break
|
|
193
|
+
payload.extend(chunk)
|
|
194
|
+
if len(payload) <= MAX_BYTES and expected is not None and len(payload) != expected:
|
|
195
|
+
raise http.client.IncompleteRead(bytes(payload))
|
|
169
196
|
except urllib.error.HTTPError as error:
|
|
170
197
|
msg = f"the website returned HTTP {error.code}"
|
|
171
198
|
raise FmindError(msg) from error
|
|
@@ -174,7 +201,7 @@ def _fetch(url: str, accept: str, deadline: float) -> bytes:
|
|
|
174
201
|
except (urllib.error.URLError, OSError, http.client.HTTPException, ValueError) as error:
|
|
175
202
|
msg = "could not read the website; check your connection and FMIND_PROFILE_URL"
|
|
176
203
|
raise FmindError(msg) from error
|
|
177
|
-
if len(payload) > MAX_BYTES:
|
|
204
|
+
if (expected is not None and expected > MAX_BYTES) or len(payload) > MAX_BYTES:
|
|
178
205
|
msg = f"the website returned more than {MAX_BYTES} bytes"
|
|
179
206
|
raise FmindError(msg)
|
|
180
207
|
return bytes(payload)
|
|
@@ -243,6 +270,10 @@ def _parse_profile(payload: bytes) -> dict[str, Any]:
|
|
|
243
270
|
links = document["thesis"].get("links")
|
|
244
271
|
if links is not None:
|
|
245
272
|
_validate(links, [{"label": str, "url": str}], "profile.thesis.links")
|
|
273
|
+
for index, project in enumerate(document["open_source"]):
|
|
274
|
+
repo = project.get("repo")
|
|
275
|
+
if repo is not None:
|
|
276
|
+
_validate(repo, str, f"profile.open_source[{index}].repo")
|
|
246
277
|
return document
|
|
247
278
|
|
|
248
279
|
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
"""Select articles from the profile document: newest, matching, or named."""
|
|
2
2
|
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
3
|
from typing import Any
|
|
6
4
|
|
|
7
|
-
Article = dict[str, Any]
|
|
5
|
+
type Article = dict[str, Any]
|
|
8
6
|
|
|
9
7
|
|
|
10
8
|
def latest(articles: list[Article], *, limit: int) -> list[Article]:
|
|
11
9
|
"""Return the most recently published articles, newest first."""
|
|
12
|
-
|
|
10
|
+
by_slug = sorted(articles, key=lambda a: a["slug"])
|
|
11
|
+
return sorted(by_slug, key=lambda a: a["date"], reverse=True)[: max(limit, 0)]
|
|
13
12
|
|
|
14
13
|
|
|
15
14
|
def _haystack(article: Article) -> str:
|
|
@@ -18,6 +17,13 @@ def _haystack(article: Article) -> str:
|
|
|
18
17
|
return " ".join(fields).lower()
|
|
19
18
|
|
|
20
19
|
|
|
20
|
+
def _matches(article: Article, terms: list[str]) -> bool:
|
|
21
|
+
if not terms:
|
|
22
|
+
return True
|
|
23
|
+
haystack = _haystack(article)
|
|
24
|
+
return all(term in haystack for term in terms)
|
|
25
|
+
|
|
26
|
+
|
|
21
27
|
def search(articles: list[Article], query: str, *, tag: str | None = None, limit: int = 10) -> list[Article]:
|
|
22
28
|
"""Return newest-first articles whose text contains every term of `query`.
|
|
23
29
|
|
|
@@ -29,8 +35,7 @@ def search(articles: list[Article], query: str, *, tag: str | None = None, limit
|
|
|
29
35
|
found = [
|
|
30
36
|
article
|
|
31
37
|
for article in articles
|
|
32
|
-
if
|
|
33
|
-
and (wanted is None or wanted in {t.lower() for t in article["tags"]})
|
|
38
|
+
if (wanted is None or wanted in {t.lower() for t in article["tags"]}) and _matches(article, terms)
|
|
34
39
|
]
|
|
35
40
|
return latest(found, limit=limit)
|
|
36
41
|
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"""Command surface, mirroring the sections of www.fmind.dev."""
|
|
2
2
|
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
3
|
import asyncio
|
|
6
4
|
import contextlib
|
|
7
5
|
import json
|
|
@@ -101,7 +99,7 @@ class _SystemPager(Pager):
|
|
|
101
99
|
# Ctrl-C drops the unwritten rest, and a pager that quits early closes the pipe.
|
|
102
100
|
with (
|
|
103
101
|
contextlib.suppress(OSError),
|
|
104
|
-
cast(
|
|
102
|
+
cast(IO[bytes], process.stdin) as pipe,
|
|
105
103
|
contextlib.suppress(KeyboardInterrupt),
|
|
106
104
|
):
|
|
107
105
|
pipe.write(content.encode())
|
|
@@ -263,7 +261,7 @@ def list_articles(ctx: typer.Context, limit: LimitOption = 6, as_json: JsonOptio
|
|
|
263
261
|
"""The most recent writing."""
|
|
264
262
|
doc = _doc()
|
|
265
263
|
posts = articles.latest(doc["articles"], limit=limit)
|
|
266
|
-
footer = f"{len(doc['articles'])} published · {doc['metadata']['site_url']}/articles/"
|
|
264
|
+
footer = f"{len(doc['articles'])} published · {doc['metadata']['site_url'].rstrip('/')}/articles/"
|
|
267
265
|
_emit(ctx, render.articles(posts, footer=footer), posts, as_json=as_json)
|
|
268
266
|
|
|
269
267
|
|
|
@@ -332,7 +330,7 @@ def list_news(
|
|
|
332
330
|
ctx: typer.Context,
|
|
333
331
|
query: Annotated[
|
|
334
332
|
list[str] | None,
|
|
335
|
-
typer.Argument(help="Terms to match against link titles, domains, summaries, URLs, and edition dates."),
|
|
333
|
+
typer.Argument(help="Terms to match against link titles, domains, summaries, URLs, and edition dates/topics."),
|
|
336
334
|
] = None,
|
|
337
335
|
limit: Annotated[
|
|
338
336
|
int | None,
|
|
@@ -344,7 +342,8 @@ def list_news(
|
|
|
344
342
|
archive = _news()
|
|
345
343
|
terms = " ".join(query or [])
|
|
346
344
|
# Today's edition is the common read; a search looks further back by default.
|
|
347
|
-
|
|
345
|
+
count = limit if limit is not None else (10 if terms.strip() else 1)
|
|
346
|
+
found = news.search(archive["editions"], terms, limit=count)
|
|
348
347
|
footer = f"{len(found)} shown · {len(archive['editions'])} editions · {archive['url']}"
|
|
349
348
|
_emit(ctx, render.news(found, footer=footer), found, as_json=as_json)
|
|
350
349
|
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"""Select daily news editions from the news archive: newest, or matching."""
|
|
2
2
|
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
3
|
from typing import Any
|
|
6
4
|
|
|
7
|
-
Edition = dict[str, Any]
|
|
5
|
+
type Edition = dict[str, Any]
|
|
8
6
|
|
|
9
7
|
|
|
10
8
|
def _edition_text(edition: Edition) -> str:
|
|
@@ -28,9 +26,16 @@ def search(editions: list[Edition], query: str, *, limit: int) -> list[Edition]:
|
|
|
28
26
|
found: list[Edition] = []
|
|
29
27
|
if limit <= 0:
|
|
30
28
|
return found
|
|
31
|
-
for edition in sorted(editions, key=lambda e: e["date"], reverse=True):
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
for edition in sorted(editions, key=lambda e: (e["date"], e["slug"]), reverse=True):
|
|
30
|
+
if terms:
|
|
31
|
+
header = _edition_text(edition)
|
|
32
|
+
items = [
|
|
33
|
+
item
|
|
34
|
+
for item in edition["items"]
|
|
35
|
+
if (haystack := f"{header} {_item_text(item)}") and all(t in haystack for t in terms)
|
|
36
|
+
]
|
|
37
|
+
else:
|
|
38
|
+
items = edition["items"]
|
|
34
39
|
if items:
|
|
35
40
|
found.append(edition if len(items) == len(edition["items"]) else {**edition, "items": items})
|
|
36
41
|
if len(found) >= limit:
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"""Render sections of the portfolio document as terminal output."""
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import errno
|
|
5
4
|
from collections.abc import Iterable, Sequence
|
|
6
5
|
from typing import Any
|
|
7
6
|
|
|
@@ -17,9 +16,17 @@ from rich.text import Text
|
|
|
17
16
|
ACCENT = "bold blue"
|
|
18
17
|
|
|
19
18
|
|
|
19
|
+
class _Console(Console):
|
|
20
|
+
"""Route broken-pipe flushes to Click instead of Rich's fd-1 dup2 handler."""
|
|
21
|
+
|
|
22
|
+
def on_broken_pipe(self) -> None:
|
|
23
|
+
self.quiet = True
|
|
24
|
+
raise BrokenPipeError(errno.EPIPE, "Broken pipe")
|
|
25
|
+
|
|
26
|
+
|
|
20
27
|
def console(*, color: bool | None = None) -> Console:
|
|
21
28
|
"""Detect terminal colour and NO_COLOR unless explicitly overridden."""
|
|
22
|
-
return
|
|
29
|
+
return _Console(
|
|
23
30
|
force_terminal=True if color is True else None,
|
|
24
31
|
color_system="truecolor" if color is True else "auto",
|
|
25
32
|
no_color=None if color is None else not color,
|
|
@@ -106,7 +113,7 @@ def whoami(doc: dict[str, Any]) -> RenderableType:
|
|
|
106
113
|
# Table cells crop even no-wrap links. Keep these outside the grid,
|
|
107
114
|
# with the same 11-character label and two-space gap.
|
|
108
115
|
*(
|
|
109
|
-
Text.assemble((f"{label:<
|
|
116
|
+
Text.assemble((f"{label:<11} ", ACCENT), _link(value), no_wrap=True, overflow="ignore")
|
|
110
117
|
for label, value in (
|
|
111
118
|
("Contact", meta["email"]),
|
|
112
119
|
("Website", meta["site_url"]),
|
|
@@ -179,10 +186,19 @@ def certifications(doc: dict[str, Any]) -> RenderableType:
|
|
|
179
186
|
def projects(doc: dict[str, Any], *, limit: int = 6) -> RenderableType:
|
|
180
187
|
"""Open-source repositories, then video series; `limit` bounds each list."""
|
|
181
188
|
count = max(limit, 0)
|
|
182
|
-
blocks: list[RenderableType] = [
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
189
|
+
blocks: list[RenderableType] = []
|
|
190
|
+
for project in doc["open_source"][:count]:
|
|
191
|
+
lines: list[RenderableType] = [
|
|
192
|
+
Text(project["title"], style="bold"),
|
|
193
|
+
Text(project["description"]),
|
|
194
|
+
_link(project["href"]),
|
|
195
|
+
]
|
|
196
|
+
repo = project.get("repo")
|
|
197
|
+
if repo and repo != project["href"]:
|
|
198
|
+
code = Text(" Code ", no_wrap=True, overflow="ignore")
|
|
199
|
+
code.append_text(_link(repo))
|
|
200
|
+
lines.append(code)
|
|
201
|
+
blocks.append(_entry(*lines))
|
|
186
202
|
series = doc["youtube_series"][:count]
|
|
187
203
|
if series:
|
|
188
204
|
blocks += [Text("VIDEO SERIES", style=ACCENT), Text()]
|
|
@@ -240,27 +256,23 @@ def article_body(markdown: str) -> RenderableType:
|
|
|
240
256
|
The source already opens with the title, summary, date, reading time, tags and
|
|
241
257
|
canonical URL, so nothing is prepended here.
|
|
242
258
|
"""
|
|
243
|
-
return Markdown(markdown, code_theme="
|
|
259
|
+
return Markdown(markdown, code_theme="ansi_light", hyperlinks=False)
|
|
244
260
|
|
|
245
261
|
|
|
246
262
|
def papers(doc: dict[str, Any]) -> RenderableType:
|
|
247
263
|
"""The doctorate and the peer-reviewed record behind it."""
|
|
248
264
|
thesis = doc["thesis"]
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
_link(thesis["url"]),
|
|
255
|
-
)
|
|
265
|
+
thesis_lines: list[RenderableType] = [
|
|
266
|
+
Text(thesis["title"], style="bold"),
|
|
267
|
+
Text(thesis["institution_details"]),
|
|
268
|
+
Text(thesis["description"]),
|
|
269
|
+
_link(thesis["url"]),
|
|
256
270
|
]
|
|
257
271
|
for link in thesis.get("links") or []:
|
|
258
272
|
row = Text(f" {link['label']} ", no_wrap=True, overflow="ignore")
|
|
259
273
|
row.append_text(_link(link["url"]))
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
parts.append(Text())
|
|
263
|
-
parts += [Text("PUBLICATIONS", style=ACCENT), Text()]
|
|
274
|
+
thesis_lines.append(row)
|
|
275
|
+
parts: list[RenderableType] = [_entry(*thesis_lines), Text("PUBLICATIONS", style=ACCENT), Text()]
|
|
264
276
|
for paper in doc["papers"]:
|
|
265
277
|
lines: list[RenderableType] = [Text(paper["title"], style="bold"), Text(paper["venue"]), _link(paper["url"])]
|
|
266
278
|
if paper["code"]:
|
fmind-2.1.0/PKG-INFO
DELETED
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: fmind
|
|
3
|
-
Version: 2.1.0
|
|
4
|
-
Summary: Read Médéric Hurier's (Fmind) portfolio and daily news from the terminal.
|
|
5
|
-
Keywords: portfolio,cli,fmind,resume,articles,news,mcp
|
|
6
|
-
Author: Médéric Hurier
|
|
7
|
-
Author-email: Médéric Hurier <contact@fmind.dev>
|
|
8
|
-
License-Expression: MIT
|
|
9
|
-
License-File: LICENSE
|
|
10
|
-
Classifier: Environment :: Console
|
|
11
|
-
Classifier: Intended Audience :: Developers
|
|
12
|
-
Classifier: Programming Language :: Python :: 3 :: Only
|
|
13
|
-
Classifier: Topic :: Utilities
|
|
14
|
-
Requires-Dist: typer>=0.26
|
|
15
|
-
Requires-Dist: rich>=13.9
|
|
16
|
-
Requires-Dist: httpx2>=2.12,<3 ; extra == 'mcp'
|
|
17
|
-
Requires-Dist: mcp>=2.2,<3 ; extra == 'mcp'
|
|
18
|
-
Requires-Dist: mcp-types>=2.2,<3 ; extra == 'mcp'
|
|
19
|
-
Requires-Python: >=3.11
|
|
20
|
-
Project-URL: Homepage, https://www.fmind.dev/
|
|
21
|
-
Project-URL: Source, https://github.com/fmind/cli
|
|
22
|
-
Project-URL: Issues, https://github.com/fmind/cli/issues
|
|
23
|
-
Provides-Extra: mcp
|
|
24
|
-
Description-Content-Type: text/markdown
|
|
25
|
-
|
|
26
|
-
# fmind
|
|
27
|
-
|
|
28
|
-
Read [Médéric Hurier's (Fmind)](https://www.fmind.dev/) portfolio and daily tech news from the terminal.
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
uvx fmind whoami
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Commands
|
|
35
|
-
|
|
36
|
-
| Command | Shows |
|
|
37
|
-
| ---------------------------------------------- | --------------------------------------------------------- |
|
|
38
|
-
| `fmind` | The `whoami` card and a pointer to `--help` |
|
|
39
|
-
| `fmind whoami` | Name, headline, location, experience, availability, links |
|
|
40
|
-
| `fmind about` | The biography |
|
|
41
|
-
| `fmind skills` | Core expertise, as published on the site |
|
|
42
|
-
| `fmind experiences` | Engagements in website order |
|
|
43
|
-
| `fmind certifications` | Certifications, the PhD, specializations |
|
|
44
|
-
| `fmind community` | Ambassador and advisory roles |
|
|
45
|
-
| `fmind papers` | The doctorate and the peer-reviewed papers, with code |
|
|
46
|
-
| `fmind projects [--limit 6]` | Open-source repositories and video series |
|
|
47
|
-
| `fmind sites` | Interactive tools published alongside the writing |
|
|
48
|
-
| `fmind articles [--limit 6]` | The most recent writing |
|
|
49
|
-
| `fmind search [query...] [--tag] [--limit 10]` | Articles matching every term, newest first |
|
|
50
|
-
| `fmind read <slug> [--raw]` | One article, rendered in the terminal |
|
|
51
|
-
| `fmind tags` | The article tags, with counts and their `search --tag` |
|
|
52
|
-
| `fmind news [query...] [--limit]` | Daily curated links, newest edition first |
|
|
53
|
-
| `fmind hire` | What can be booked right now |
|
|
54
|
-
|
|
55
|
-
The commands group sections of the website's profile and news APIs. Their names stay stable when the website's navigation or visual design changes.
|
|
56
|
-
|
|
57
|
-
`--limit` bounds articles, search results, news editions, and each project list (repositories and video series); `--json` prints a command's data instead of prose; `--raw` prints an article's Markdown source. Search also accepts `--tag`. Use `--json` and `jq` for other filtering.
|
|
58
|
-
|
|
59
|
-
`--json` works before or after the command: both `fmind --json experiences` and `fmind experiences --json` print the raw website section. Global `--color` / `--no-color` and `--version` go before the command. Colour is detected automatically, including `NO_COLOR` and redirected output. Use `fmind --help` or `fmind <command> --help` for options.
|
|
60
|
-
|
|
61
|
-
Output uses your terminal's default text colour and blue accent. Community roles and credentials use stacked entries with their published links, so they remain readable in narrow terminals. Links are never folded, so they stay copyable, and terminals that support OSC 8 hyperlinks make them clickable. Redirected output carries no trailing whitespace.
|
|
62
|
-
|
|
63
|
-
### Reading
|
|
64
|
-
|
|
65
|
-
`fmind search` matches titles, summaries, tags and slugs; terms are ANDed, so each extra word narrows the result, with or without quotes. `--tag` restricts to one of the site's own tags, case-insensitively; an unknown tag fails and lists the published ones.
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
fmind search agent security
|
|
69
|
-
fmind search --tag MLOps --limit 3
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
`fmind read` takes a slug, or enough of one to be unambiguous, and prints the article. In an interactive terminal whose `TERM` your system's terminfo database knows (not `dumb`), it pages through `$PAGER` (default `less`, with `LESS=FRX` unless you set `LESS`), so short articles print directly; `PAGER=cat` disables paging. A missing or unparsable `PAGER` is skipped and the article prints directly; if the pager fails to launch or exits unsuccessfully, the command reports an error; retry with `PAGER=cat`. Use `--raw` for the Markdown source.
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
slug="$(fmind articles --limit 1 --json | jq -r '.[0].slug')"
|
|
76
|
-
fmind read "$slug"
|
|
77
|
-
fmind read "$slug" --raw | glow -
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
### News
|
|
81
|
-
|
|
82
|
-
`fmind news` prints the latest daily edition of curated links on AI agents, Python, security, and cloud engineering. Search terms keep only the links that contain all of them, matched against titles, domains, summaries, and URLs; an edition date such as `2026-11-06` or `2026-11` selects every link of those editions. `--limit` counts editions: 1 by default, 10 when searching.
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
fmind news # the latest edition
|
|
86
|
-
fmind news --limit 7 # the past week
|
|
87
|
-
fmind news agent security # matching links, newest edition first
|
|
88
|
-
fmind news 2026-11-06 # one edition
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
### Piping
|
|
92
|
-
|
|
93
|
-
`--json` turns every command into a data source, so the portfolio composes with the rest of the shell. JSON goes to stdout without colour or prose; errors go to stderr. With `read --raw --json`, JSON takes precedence and includes the Markdown in its `markdown` field.
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
fmind articles --limit 20 --json | jq -r '.[] | "\(.date[:10]) \(.title)"'
|
|
97
|
-
fmind search agent --json | jq -r '.[].url'
|
|
98
|
-
fmind certifications --json | jq -r '.certifications[] | select(.active) | .title'
|
|
99
|
-
fmind news --limit 7 --json | jq -r '.[].items[] | "\(.domain) \(.title)"'
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
`whoami --json` includes `metadata`, `experience` (a list containing the featured engagement, or an empty list), and `services`. `certifications --json` includes `certifications`, `thesis`, and `specializations`. `projects --json` includes `open_source` and `youtube_series`, each keeping the website's fields and bounded by `--limit`. `news --json` is a list of editions with the website's fields; a search keeps only the matching `items`.
|
|
103
|
-
|
|
104
|
-
**Migration to 2.0.0:** `projects --json` now returns an object instead of one mixed array; change filters from `.[]` to `.open_source[]` or `.youtube_series[]`. `--limit` now bounds each list, so video series are no longer crowded out by repositories.
|
|
105
|
-
|
|
106
|
-
**Migration to 1.0.0:** `certifications --json` now returns an object instead of an array; change credential filters from `.[]` to `.certifications[]`. The `experience` field in `whoami --json` is additive. Update existing scripts before upgrading from 0.2.0.
|
|
107
|
-
|
|
108
|
-
## Install
|
|
109
|
-
|
|
110
|
-
```bash
|
|
111
|
-
uvx fmind whoami # zero install
|
|
112
|
-
uv tool install fmind # persistent
|
|
113
|
-
pipx install fmind # alternative
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
Point it at another origin with `FMIND_PROFILE_URL` — useful against a local `mise run watch` server of the website:
|
|
117
|
-
|
|
118
|
-
```bash
|
|
119
|
-
FMIND_PROFILE_URL=http://127.0.0.1:8080/api/profile fmind whoami
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
News and article reads and the MCP bridge follow the same origin, so one variable moves the whole CLI.
|
|
123
|
-
|
|
124
|
-
## MCP over stdio
|
|
125
|
-
|
|
126
|
-
Install the optional MCP dependencies and let your agent host launch the bridge:
|
|
127
|
-
|
|
128
|
-
```bash
|
|
129
|
-
uv tool install 'fmind[mcp]'
|
|
130
|
-
fmind mcp
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
For a host that accepts JSON configuration:
|
|
134
|
-
|
|
135
|
-
```json
|
|
136
|
-
{
|
|
137
|
-
"mcpServers": {
|
|
138
|
-
"fmind": {
|
|
139
|
-
"command": "uvx",
|
|
140
|
-
"args": ["--from", "fmind[mcp]", "fmind", "mcp"]
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
`fmind mcp` connects to `https://www.fmind.dev/mcp` using Streamable HTTP and forwards the website's tools, resources, and prompts over stdio. The website owns their names, schemas, and content. Set `FMIND_PROFILE_URL` in the host's environment to use `/mcp` on another website origin. No local data or response cache is used. The website answers MCP POST requests with JSON; GET/HEAD return `405` with `Allow: POST` because notification streams are not offered. Use `/health` for uptime probes. Requests have a 15-second deadline and remote HTTP responses are limited to 8 MiB. A request that exceeds these bounds or loses its connection fails on its own, and the bridge keeps serving.
|
|
147
|
-
|
|
148
|
-
Stdout carries only MCP messages; startup errors go to stderr. Portfolio output flags such as `--json` do not apply to `mcp`. The bridge forwards read-only request/response operations; subscriptions and server-initiated sampling or elicitation are not advertised.
|
|
149
|
-
|
|
150
|
-
From this checkout, run `uv run --extra mcp fmind mcp`. The optional extra uses the [official MCP Python SDK](https://py.sdk.modelcontextprotocol.io/); ordinary portfolio commands still need only Typer and Rich.
|
|
151
|
-
|
|
152
|
-
## Development
|
|
153
|
-
|
|
154
|
-
```bash
|
|
155
|
-
mise install # install the pinned toolchain
|
|
156
|
-
mise run install # sync the locked environment and install hooks
|
|
157
|
-
mise run format # ruff imports and format, dprint
|
|
158
|
-
mise run check # lockfile, ruff, ty, dprint, jactionlint, betterleaks, dependency audit
|
|
159
|
-
mise run test # offline pytest with branch coverage
|
|
160
|
-
mise run smoke # exercise every command against the live site
|
|
161
|
-
mise run build # build the wheel and source distribution
|
|
162
|
-
mise run all # format, check, test, build — the gate CI runs
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
The pre-commit hook formats staged files and runs the offline checks (`mise run check:local`). The pre-push hook runs the dependency audit (`mise run check:network`) and the offline tests. CI runs the full gate on the pinned Python, tests Python 3.11–3.15 for compatibility, and tests the declared dependency floors with `--resolution lowest-direct` on Python 3.11.
|
|
166
|
-
|
|
167
|
-
A release tag must match the version in `pyproject.toml` (for example, `v0.1.0`). CD reruns every CI job for that tag (the gate, the Python versions, and the dependency floors) and checks the live commands before publishing through PyPI Trusted Publishing. The live smoke check is a release check, not a pull-request gate.
|
|
168
|
-
|
|
169
|
-
## License
|
|
170
|
-
|
|
171
|
-
[MIT](LICENSE) — © 2026 Médéric Hurier (Fmind).
|
fmind-2.1.0/README.md
DELETED
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
# fmind
|
|
2
|
-
|
|
3
|
-
Read [Médéric Hurier's (Fmind)](https://www.fmind.dev/) portfolio and daily tech news from the terminal.
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
uvx fmind whoami
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
## Commands
|
|
10
|
-
|
|
11
|
-
| Command | Shows |
|
|
12
|
-
| ---------------------------------------------- | --------------------------------------------------------- |
|
|
13
|
-
| `fmind` | The `whoami` card and a pointer to `--help` |
|
|
14
|
-
| `fmind whoami` | Name, headline, location, experience, availability, links |
|
|
15
|
-
| `fmind about` | The biography |
|
|
16
|
-
| `fmind skills` | Core expertise, as published on the site |
|
|
17
|
-
| `fmind experiences` | Engagements in website order |
|
|
18
|
-
| `fmind certifications` | Certifications, the PhD, specializations |
|
|
19
|
-
| `fmind community` | Ambassador and advisory roles |
|
|
20
|
-
| `fmind papers` | The doctorate and the peer-reviewed papers, with code |
|
|
21
|
-
| `fmind projects [--limit 6]` | Open-source repositories and video series |
|
|
22
|
-
| `fmind sites` | Interactive tools published alongside the writing |
|
|
23
|
-
| `fmind articles [--limit 6]` | The most recent writing |
|
|
24
|
-
| `fmind search [query...] [--tag] [--limit 10]` | Articles matching every term, newest first |
|
|
25
|
-
| `fmind read <slug> [--raw]` | One article, rendered in the terminal |
|
|
26
|
-
| `fmind tags` | The article tags, with counts and their `search --tag` |
|
|
27
|
-
| `fmind news [query...] [--limit]` | Daily curated links, newest edition first |
|
|
28
|
-
| `fmind hire` | What can be booked right now |
|
|
29
|
-
|
|
30
|
-
The commands group sections of the website's profile and news APIs. Their names stay stable when the website's navigation or visual design changes.
|
|
31
|
-
|
|
32
|
-
`--limit` bounds articles, search results, news editions, and each project list (repositories and video series); `--json` prints a command's data instead of prose; `--raw` prints an article's Markdown source. Search also accepts `--tag`. Use `--json` and `jq` for other filtering.
|
|
33
|
-
|
|
34
|
-
`--json` works before or after the command: both `fmind --json experiences` and `fmind experiences --json` print the raw website section. Global `--color` / `--no-color` and `--version` go before the command. Colour is detected automatically, including `NO_COLOR` and redirected output. Use `fmind --help` or `fmind <command> --help` for options.
|
|
35
|
-
|
|
36
|
-
Output uses your terminal's default text colour and blue accent. Community roles and credentials use stacked entries with their published links, so they remain readable in narrow terminals. Links are never folded, so they stay copyable, and terminals that support OSC 8 hyperlinks make them clickable. Redirected output carries no trailing whitespace.
|
|
37
|
-
|
|
38
|
-
### Reading
|
|
39
|
-
|
|
40
|
-
`fmind search` matches titles, summaries, tags and slugs; terms are ANDed, so each extra word narrows the result, with or without quotes. `--tag` restricts to one of the site's own tags, case-insensitively; an unknown tag fails and lists the published ones.
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
fmind search agent security
|
|
44
|
-
fmind search --tag MLOps --limit 3
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
`fmind read` takes a slug, or enough of one to be unambiguous, and prints the article. In an interactive terminal whose `TERM` your system's terminfo database knows (not `dumb`), it pages through `$PAGER` (default `less`, with `LESS=FRX` unless you set `LESS`), so short articles print directly; `PAGER=cat` disables paging. A missing or unparsable `PAGER` is skipped and the article prints directly; if the pager fails to launch or exits unsuccessfully, the command reports an error; retry with `PAGER=cat`. Use `--raw` for the Markdown source.
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
slug="$(fmind articles --limit 1 --json | jq -r '.[0].slug')"
|
|
51
|
-
fmind read "$slug"
|
|
52
|
-
fmind read "$slug" --raw | glow -
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### News
|
|
56
|
-
|
|
57
|
-
`fmind news` prints the latest daily edition of curated links on AI agents, Python, security, and cloud engineering. Search terms keep only the links that contain all of them, matched against titles, domains, summaries, and URLs; an edition date such as `2026-11-06` or `2026-11` selects every link of those editions. `--limit` counts editions: 1 by default, 10 when searching.
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
fmind news # the latest edition
|
|
61
|
-
fmind news --limit 7 # the past week
|
|
62
|
-
fmind news agent security # matching links, newest edition first
|
|
63
|
-
fmind news 2026-11-06 # one edition
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Piping
|
|
67
|
-
|
|
68
|
-
`--json` turns every command into a data source, so the portfolio composes with the rest of the shell. JSON goes to stdout without colour or prose; errors go to stderr. With `read --raw --json`, JSON takes precedence and includes the Markdown in its `markdown` field.
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
fmind articles --limit 20 --json | jq -r '.[] | "\(.date[:10]) \(.title)"'
|
|
72
|
-
fmind search agent --json | jq -r '.[].url'
|
|
73
|
-
fmind certifications --json | jq -r '.certifications[] | select(.active) | .title'
|
|
74
|
-
fmind news --limit 7 --json | jq -r '.[].items[] | "\(.domain) \(.title)"'
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
`whoami --json` includes `metadata`, `experience` (a list containing the featured engagement, or an empty list), and `services`. `certifications --json` includes `certifications`, `thesis`, and `specializations`. `projects --json` includes `open_source` and `youtube_series`, each keeping the website's fields and bounded by `--limit`. `news --json` is a list of editions with the website's fields; a search keeps only the matching `items`.
|
|
78
|
-
|
|
79
|
-
**Migration to 2.0.0:** `projects --json` now returns an object instead of one mixed array; change filters from `.[]` to `.open_source[]` or `.youtube_series[]`. `--limit` now bounds each list, so video series are no longer crowded out by repositories.
|
|
80
|
-
|
|
81
|
-
**Migration to 1.0.0:** `certifications --json` now returns an object instead of an array; change credential filters from `.[]` to `.certifications[]`. The `experience` field in `whoami --json` is additive. Update existing scripts before upgrading from 0.2.0.
|
|
82
|
-
|
|
83
|
-
## Install
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
uvx fmind whoami # zero install
|
|
87
|
-
uv tool install fmind # persistent
|
|
88
|
-
pipx install fmind # alternative
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
Point it at another origin with `FMIND_PROFILE_URL` — useful against a local `mise run watch` server of the website:
|
|
92
|
-
|
|
93
|
-
```bash
|
|
94
|
-
FMIND_PROFILE_URL=http://127.0.0.1:8080/api/profile fmind whoami
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
News and article reads and the MCP bridge follow the same origin, so one variable moves the whole CLI.
|
|
98
|
-
|
|
99
|
-
## MCP over stdio
|
|
100
|
-
|
|
101
|
-
Install the optional MCP dependencies and let your agent host launch the bridge:
|
|
102
|
-
|
|
103
|
-
```bash
|
|
104
|
-
uv tool install 'fmind[mcp]'
|
|
105
|
-
fmind mcp
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
For a host that accepts JSON configuration:
|
|
109
|
-
|
|
110
|
-
```json
|
|
111
|
-
{
|
|
112
|
-
"mcpServers": {
|
|
113
|
-
"fmind": {
|
|
114
|
-
"command": "uvx",
|
|
115
|
-
"args": ["--from", "fmind[mcp]", "fmind", "mcp"]
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
`fmind mcp` connects to `https://www.fmind.dev/mcp` using Streamable HTTP and forwards the website's tools, resources, and prompts over stdio. The website owns their names, schemas, and content. Set `FMIND_PROFILE_URL` in the host's environment to use `/mcp` on another website origin. No local data or response cache is used. The website answers MCP POST requests with JSON; GET/HEAD return `405` with `Allow: POST` because notification streams are not offered. Use `/health` for uptime probes. Requests have a 15-second deadline and remote HTTP responses are limited to 8 MiB. A request that exceeds these bounds or loses its connection fails on its own, and the bridge keeps serving.
|
|
122
|
-
|
|
123
|
-
Stdout carries only MCP messages; startup errors go to stderr. Portfolio output flags such as `--json` do not apply to `mcp`. The bridge forwards read-only request/response operations; subscriptions and server-initiated sampling or elicitation are not advertised.
|
|
124
|
-
|
|
125
|
-
From this checkout, run `uv run --extra mcp fmind mcp`. The optional extra uses the [official MCP Python SDK](https://py.sdk.modelcontextprotocol.io/); ordinary portfolio commands still need only Typer and Rich.
|
|
126
|
-
|
|
127
|
-
## Development
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
mise install # install the pinned toolchain
|
|
131
|
-
mise run install # sync the locked environment and install hooks
|
|
132
|
-
mise run format # ruff imports and format, dprint
|
|
133
|
-
mise run check # lockfile, ruff, ty, dprint, jactionlint, betterleaks, dependency audit
|
|
134
|
-
mise run test # offline pytest with branch coverage
|
|
135
|
-
mise run smoke # exercise every command against the live site
|
|
136
|
-
mise run build # build the wheel and source distribution
|
|
137
|
-
mise run all # format, check, test, build — the gate CI runs
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
The pre-commit hook formats staged files and runs the offline checks (`mise run check:local`). The pre-push hook runs the dependency audit (`mise run check:network`) and the offline tests. CI runs the full gate on the pinned Python, tests Python 3.11–3.15 for compatibility, and tests the declared dependency floors with `--resolution lowest-direct` on Python 3.11.
|
|
141
|
-
|
|
142
|
-
A release tag must match the version in `pyproject.toml` (for example, `v0.1.0`). CD reruns every CI job for that tag (the gate, the Python versions, and the dependency floors) and checks the live commands before publishing through PyPI Trusted Publishing. The live smoke check is a release check, not a pull-request gate.
|
|
143
|
-
|
|
144
|
-
## License
|
|
145
|
-
|
|
146
|
-
[MIT](LICENSE) — © 2026 Médéric Hurier (Fmind).
|
|
File without changes
|
|
File without changes
|
|
File without changes
|