Skip to content

Add pipx support with friendly error messages#45

Merged
cdnsteve merged 1 commit intodevelopfrom
feature/pipx-support
Jan 10, 2026
Merged

Add pipx support with friendly error messages#45
cdnsteve merged 1 commit intodevelopfrom
feature/pipx-support

Conversation

@cdnsteve
Copy link
Member

Summary

  • Add _require_sugar_project() helper for consistent error handling across all CLI commands
  • Fix sys import bug in add command that was causing UnboundLocalError
  • Update README with pipx as the recommended installation method
  • Add upgrade/uninstall instructions for pipx users

Changes

  • 25+ commands updated to show friendly error when run outside a Sugar project:
    ❌ Not a Sugar project
    
       Could not find: .sugar/config.yaml
    
       Run 'sugar init' to initialize Sugar in this directory.
    
  • Core commands: add, list, view, status, run
  • Task management: hold, release, remove, update, priority
  • Maintenance: logs, stop, cleanup, dedupe
  • Advanced: orchestrate, context, thinking, learnings
  • Task types: all subcommands
  • Debug commands

Test plan

  • Verified commands show friendly error in non-Sugar directory (/tmp)
  • Verified commands still work correctly in valid Sugar project
  • Fixed sys bug that was causing traceback on sugar add

@github-actions
Copy link
Contributor

github-actions bot commented Jan 10, 2026

All contributors have signed the CLA. Thank you! 🎉
Posted by the CLA Assistant Lite bot.

@cdnsteve
Copy link
Member Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Jan 10, 2026
- Add _require_sugar_project() helper for consistent error handling
- Update all CLI commands to show friendly "Not a Sugar project" error
- Fix sys import bug in add command (was shadowing global import)
- Update README with pipx as recommended installation method
- Add upgrade/uninstall instructions for pipx users
@cdnsteve cdnsteve force-pushed the feature/pipx-support branch from 5c5c087 to 30d90a1 Compare January 10, 2026 06:20
@cdnsteve cdnsteve merged commit 892364a into develop Jan 10, 2026
22 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