Skip to content

Applika CLI refactoring and actions to auto publish on PyPI - #38

Merged
luis0ares merged 7 commits into
developfrom
cli/refactor
May 12, 2026
Merged

Applika CLI refactoring and actions to auto publish on PyPI#38
luis0ares merged 7 commits into
developfrom
cli/refactor

Conversation

@luis0ares

@luis0ares luis0ares commented May 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Full CLI migration from raw argparse to Typer + Pydantic, restructured into the applika package, with CI/CD pipelines and inline API resolution.

Type of Change

  • Feature
  • Fix
  • Improvement
  • Refactor
  • Documentation

Included Changes

Features

  • Migrate CLI from argparse to Typer with typed commands and auto-generated help
  • Add Pydantic models (ApplicationCreate, ApplicationUpdate, ClearField enum) for request validation and serialization
  • Add auth command group (login, logout, whoami) with token-based session management
  • Add skill command group (install, list) for installing the applika-cli AI skill
  • Add --version flag to the root CLI
  • Add applika applications filter with typed enum flags (--mode, --status)
  • Add --clear repeatable option to applika applications edit for nullifying individual fields
  • Add CI/CD pipelines (cli-ci.yaml, cli-cd.yaml) for automated testing and publishing
  • Add full README.md for the CLI package

Improvements

  • Restructure package from flat src/ into src/applika/ with proper sub-packages
  • Replace payloads.py and args.py indirection with inline api_resolve.py pattern
  • Lower Python requirement from 3.12 to 3.10 for broader compatibility
  • Full test suite rewrite with FakeApiClient fixture and parametrized coverage
  • Bump version to 0.1.2

Related Issues

Testing

  • Unit tests
  • Integration tests
  • Manual testing
  • N/A

Checklist

  • Self-review completed
  • CI passing
  • Ready to merge

luis0ares and others added 7 commits May 11, 2026 23:08
Refactor CLI from raw argparse to Typer with Pydantic validation and
restructure as the `applika` package under src/applika/ for PyPI publication
as applika-cli.

- Migrate all commands to Typer: login, logout, whoami, applications, skill
- Add Pydantic schemas for ApplicationCreate/Update with field validation
- Restructure package layout: lib/, commands/, schemas/, utils/, skills/
- Add --version/-v flag reading version from pyproject.toml via importlib.metadata
- Add README.md and update CLAUDE.md to reflect new structure
- Remove legacy raw Python CLI files from src/
- Add conftest.py with fake store/api-client fixtures and full test suite
- Create cli-ci.yaml: linter, tests, build (no PyPI publish) on develop/PRs
- Create cli-cd.yaml: linter, tests, build, publish to PyPI on main

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Reduce minimum Python version from 3.12 to 3.10 across pyproject.toml,
  CI/CD workflows, and documentation for broader compatibility
- Bump version to 0.1.2 in pyproject.toml
- Fix version flag to work without requiring a subcommand by using
  invoke_without_command=True instead of no_args_is_help=True
- Add pipx as an alternative installation method alongside uv tool install
  in README
Migrate from ApplicationArgs + payloads.py to inline payload building
directly in command functions. This reduces indirection and simplifies
the command layer.

- Create api_resolve.py module for resolve_platform_id and resolve_company_input
- Add SupportSchema (supports.py) to cache platforms and companies from API
- Add ClearField enum for field clearing operations in edit command
- Remove ApplicationArgs pattern and payloads.py module
- Remove unused dates.py utility
- Update README, CLAUDE.md, and SKILL.md to reflect new structure
- Update test suite and enum definitions

The refactoring maintains all existing functionality while improving
code organization and reducing coupling between command parsing and
payload construction.
@luis0ares
luis0ares merged commit 78c5884 into develop May 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant