- How do I install the There There CLI in a Laravel project?
- Use Composer to install it globally with `composer global require spatie/there-there-cli`. Ensure Composer’s global bin directory is in your system PATH. For project-specific use, install it locally with `composer require spatie/there-there-cli` and alias commands in your `artisan` file.
- Can I use this CLI with Laravel’s Artisan commands?
- Yes. Wrap CLI calls in Laravel’s `Artisan::call()` for consistent logging and error handling. For example, `Artisan::call('there-there:list-tickets')` integrates the CLI output into Laravel’s logging system.
- How do I securely store There There API tokens in Laravel?
- Store tokens in Laravel’s `.env` file or use Laravel Vault for encrypted storage. Avoid hardcoding secrets in the CLI’s `~/.there-there/config.json`. Rotate tokens via Laravel’s config or environment variable management.
- Does this CLI support multiple Laravel environments (e.g., dev, staging, prod)?
- Yes. Use Laravel’s config files to map There There profiles per environment. For example, define `config('there-there.profiles.dev')` and `config('there-there.profiles.prod')` to isolate credentials. Switch profiles dynamically via `there-there use <profile>` or Laravel service logic.
- How can I handle rate limits when calling the There There API?
- Implement exponential backoff in Laravel when calling the CLI. Use Laravel’s queue system to retry failed commands (e.g., `there-there list-tickets` with retry logic). Check There There’s API docs for rate limits and adjust batch sizes accordingly.
- Can I integrate ticket updates with Laravel’s queue system?
- Yes. Dispatch long-running CLI commands (e.g., bulk ticket updates) as Laravel jobs. For example, create a job `ThereThereUpdateTicketJob` that calls `there-there update-ticket-status --ticket-id=123` via `Artisan::queue()`.
- How do I handle image attachments from There There tickets in Laravel?
- Use the CLI’s `inline_images[]` feature to download attachments. Store them in Laravel’s filesystem (e.g., S3) or process them via queue workers. For large volumes, implement parallel downloads or caching to optimize performance.
- What Laravel versions does this CLI support?
- The CLI is PHP-based and works with any Laravel version supporting PHP 8.1+. Ensure your Laravel app’s PHP version matches the CLI’s requirements (check the package’s `composer.json` for exact versions). No Laravel-specific dependencies are required.
- Is there a way to generate Laravel code from There There CLI commands?
- Yes. Use the There There agent skill (e.g., GitHub Copilot) to generate Laravel code snippets from CLI commands. For example, `there-there list-tickets` could generate a `Ticket::where(...)` query. Review generated code for security and quality before use.
- What alternatives exist for managing There There tickets in Laravel?
- Alternatives include direct API calls via Guzzle HTTP client, Laravel Scout for search functionality, or custom-built Laravel packages. However, this CLI provides a pre-built, API-first solution with 100% endpoint coverage and profile-based authentication, reducing development time.