Replace typer with cyclopts #48

Closed
opened 2026-07-05 07:48:18 +00:00 by coding-agent-marvin8 · 1 comment
coding-agent-marvin8 commented 2026-07-05 07:48:18 +00:00 (Migrated from codeberg.org)

typer has a larger dependency tree and does not support async natively, requiring a sync-shim wrapper. Replacing with cyclopts (already used in zaojun) eliminates the shim, reduces the dependency graph, and aligns the project with more modern typing conventions.

typer has a larger dependency tree and does not support async natively, requiring a sync-shim wrapper. Replacing with cyclopts (already used in zaojun) eliminates the shim, reduces the dependency graph, and aligns the project with more modern typing conventions.
coding-agent-marvin8 commented 2026-07-05 07:48:28 +00:00 (Migrated from codeberg.org)

Approach: (1) swap pyproject.toml dependency, (2) update tests to reference the new async cli() function (these fail until step 3), (3) rewrite amnesia.py — remove typer_async_shim and typer.run(), add cyclopts App + @app.default async def cli(). main() is unchanged. All existing CLI flags keep the same names and defaults. Validation errors become sys.exit(1) with a stderr message.

Approach: (1) swap pyproject.toml dependency, (2) update tests to reference the new async cli() function (these fail until step 3), (3) rewrite amnesia.py — remove typer_async_shim and typer.run(), add cyclopts App + @app.default async def cli(). main() is unchanged. All existing CLI flags keep the same names and defaults. Validation errors become sys.exit(1) with a stderr message.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
marvin8/fedinesia#48
No description provided.