CLI Integration
Configure and preview commands for the Syndorela engine.
Subcommands
Pro Tip
You can use a workspace.yaml file to store these flags permanently and just run bidi run.
Command Builder
With Git Metadata
With Git Blame
JSON Output
Verbose Logs
$ bidi scan --workspace ./modernization --source ~/code/legacy-app --with-git --with-blame --verbose
Example Output Snippet
# Running scan...
[RUN] Scan initiated on ~/code/legacy-app
[INFO] Scanning for PHP, SQL, JS...
[INFO] Found 142 PHP files
[DEBG] Indexing symbols in src/auth/login.php
[DEBG] Indexing symbols in src/billing/invoice_gen.php
[WARN] Potential dead code detected in src/utils/old_helpers.php
[INFO] Symbols indexed: 1,452
[OK] Scan complete.
AI CopilotBeta
Hello! I'm your AI modernization copilot. I have context on your legacy CRM codebase. How can I help you today?
Explain the billing flow and identify the 3 riskiest assumptions.
The billing flow in your legacy PHP app is primarily centered around `src/billing/invoice_gen.php`.
**Flow Overview:**
1. A cron job triggers the billing run.
2. It fetches all active subscriptions using a large raw SQL join.
3. For each customer, it calculates the usage and generates a PDF using a legacy library.
4. It calls the Stripe API (v2015-04-07) to process payments.
**Riskiest Assumptions:**
- **Database Consistency:** The SQL query assumes that all records in `subscriptions` have a matching `customer_id` in the `users` table, but there are no foreign keys in the legacy schema.
- **API Availability:** The Stripe API call is synchronous and lacks a retry mechanism. If Stripe is down, the billing run fails mid-way without recording progress.
- **Concurrency:** The billing run is not idempotent. Running it twice on the same day will double-charge customers.
#repo#analysis#pseudo