Commit Graph

12 Commits

Author SHA1 Message Date
Greyson Lalonde
0edf2bcc75 fix(cli): honor positive trace consent and drop dead tool-export helpers 2026-05-05 04:45:15 +08:00
Greyson Lalonde
48fa7dcc9b fix(cli): restore parity with main 2026-05-05 04:35:26 +08:00
Greyson Lalonde
778130cfc7 fix: resolve mypy errors after merge
- Re-export get_crewai_version explicitly so consumers stop getting
  attr-defined.
- Drop the telemetry call in TemplateCommand.add_template; the
  standalone CLI's BaseCommand intentionally has no _telemetry, matching
  the choice already made for DeployCommand.
- Add the user_identifier kwarg to crewai_cli's
  PlusAPI.login_to_tool_repository so tools.main.login keeps working
  and the surface matches crewai.plus_api.
- Update the lib/cli login tests for the new json={} payload.
2026-05-05 03:50:09 +08:00
Greyson Lalonde
bed0246438 chore: address github-code-quality findings 2026-05-05 03:01:04 +08:00
Greyson Lalonde
bada7fd909 chore: merge main into gl/chore/refactor-cli
Resolve conflicts from origin/main: relocate new CLI additions
(checkpoint_tui, deploy/validate, remote_template, content_crew
templates) into lib/cli, rewrite imports for the standalone
crewai-cli package, port main's trained_agents_file param and
predeploy validation, and bump python-dotenv/pydantic in
crewai-cli to match crewai's constraints. Add the new
mark_ephemeral_trace_batch_as_failed method to the relocated
crewai.plus_api. Update tests for the new payload field, deploy
--skip-validate kwarg, and crewai_cli import paths.
2026-05-05 02:00:39 +08:00
Greyson Lalonde
7afca5daab refactor: remove cli/ from crewai package and relocate to proper modules
Move framework infrastructure out of crewai/cli/ to dedicated modules:
- cli/authentication/ → crewai/auth/
- cli/config.py → crewai/settings.py
- cli/constants.py → crewai/constants.py
- cli/plus_api.py → crewai/plus_api.py
- cli/version.py → crewai/version.py
- cli/crew_chat.py → crewai/utilities/crew_chat.py
- cli/reset_memories_command.py → crewai/utilities/reset_memories.py
- cli/utils.py (framework parts) → crewai/utilities/project_utils.py

Delete CLI-only duplicates (command.py, git.py, provider.py) already
present in crewai_cli. Replace _login_to_tool_repository with a
_post_login() hook in AuthenticationCommand. Update all imports and
mock.patch paths across both packages and tests.
2026-03-15 19:39:55 -04:00
Greyson LaLonde
8fd7a73423 fix(deploy): add pre-flight validation before deployment
Validate that pyproject.toml, a lockfile (uv.lock or poetry.lock),
and the expected src/<project>/crew.py or config directory exist
locally before making any API calls. This surfaces clear, actionable
errors on the CLI instead of cryptic server-side deployment failures.
2026-03-14 22:21:02 -04:00
Greyson LaLonde
b7bd7aea50 Merge branch 'main' into gl/chore/refactor-cli
# Conflicts:
#	lib/crewai/src/crewai/cli/cli.py
2026-03-14 22:17:02 -04:00
Greyson LaLonde
96fc584ab8 refactor: remove CLI from crewai package and add backward-compat shim
Remove all CLI modules and tests that have been moved to the
crewai-cli package. Replace cli.py with a thin shim that re-exports
from crewai_cli when available, or shows an install hint otherwise.

Update crewai pyproject.toml to add a [cli] extra pointing to
crewai-cli and comment out the old entry point. Add py.typed marker
to crewai_cli for mypy compatibility.
2026-03-14 22:12:38 -04:00
Greyson LaLonde
3732de7b88 test: add CLI tests to crewai-cli package
Move and adapt all CLI tests from lib/crewai/tests/cli/ to
lib/cli/tests/, updating import paths from crewai.cli.* to
crewai_cli.* and adjusting mock targets accordingly.
2026-03-14 22:09:38 -04:00
Greyson LaLonde
4f9a8f4112 refactor: move CLI source modules to crewai-cli package
Copy all CLI source modules from lib/crewai/src/crewai/cli/ to the
new lib/cli/src/crewai_cli/ package, updating internal imports from
crewai.cli.* to crewai_cli.* throughout.

Includes: authentication, deploy, enterprise, organization, settings,
tools, triggers, templates, and all top-level CLI command modules.

Also excludes lib/cli/ from pre-commit mypy checks to match existing
behavior (original CLI code has the same type gaps).
2026-03-14 22:08:48 -04:00
Greyson LaLonde
c0689aa6dc chore: scaffold crewai-cli package and update workspace config
Add the new lib/cli package skeleton with pyproject.toml, README,
and __init__.py. Register it as a uv workspace member and update
root linting, mypy, bandit, and pytest config to include the new
package paths.
2026-03-14 22:04:37 -04:00