- 1.1 Build a routing inventory table from
bin/orodcandlibexec/orodc/: every public command, subcommand, alias, deprecated compose command, no-project-required command, and the smart PHP detection paths (PHP flags,.phpscripts,bin/console,bin/magento). - 1.2 Inventory the fuzzy/pattern-matched command spellings (
importdb/dbimport/databaseimport,exportdb/dbexport/dump database,platformupdate/updateplatform,cache:*, "set/update url", "composer install" phrases) and record which behavior each pattern routes to. - 1.3 Capture golden fixtures for
help,man,version, unknown command errors, unknown subcommand errors, and deprecated compose syntax errors (old/new syntax examples, exit code 1). - 1.4 Capture environment precedence fixtures:
.env,.env-app,.env-app.local, global~/.orodc/<project>/.env.orodc, local.env.orodc, override ordering, and old~/.orodc/<project>.env.orodcfile migration. - 1.5 Capture DSN parsing fixtures from
parse_dsn_urifor database, search, message queue, and Redis URIs, including edge cases (missing port, encoded credentials, schema variants). - 1.6 Capture command construction fixtures (expected argv arrays) for compose, PHP, Composer, exec, database, proxy, tests, image, and ssh workflows without requiring Docker execution.
- 1.7 Capture port allocation fixtures: prefix-derived map for nginx/database/search/mq/redis/mail/ssh/gotenberg/xhgui, explicit
DC_ORO_PORT_*overrides, and Docker-aware free-port fallback behavior oforodc-find_free_port. - 1.8 Capture compose file stack fixtures: which
-ffiles are selected per sync mode (default/mutagen/ssh), database schema (pgsql/mysql), Oro vs non-Oro project, and CMS cron file (oro/magento ofelia). - 1.9 Define the release-gating Docker integration test matrix (Linux, macOS, WSL2-representative) and mark which scenarios from
test-oro-installations-containerized.ymlgate the release versus run nightly.
- 2.1 Add the Node.js package scaffold: TypeScript, oclif, ESLint/Prettier, and a test runner with coverage; add
package.jsonscripts for build, lint, test, and dev execution. - 2.2 Create the oclif project layout (
src/commands,src/services,src/hooks) and a bootstrapbinentry point for the publicorodcexecutable. - 2.3 Implement shared error types, exit-code normalization,
DEBUG/verbose mode detection, and signal cleanup in a top-level error handler. - 2.4 Implement a pre-parse router hook for behaviors oclif cannot express natively: smart PHP detection, fuzzy command patterns, deprecated compose command errors, and no-args menu dispatch.
- 2.5 Implement the compatibility test harness that runs CLI commands against fixture projects and compares output to the golden fixtures from section 1.
- 2.6 Add development checkout execution support (run from repo without Homebrew install) with asset resolution against the checkout.
- 3.1 Implement the
pathsservice: source checkout paths, Homebrew prefix resolution,compose/assets, doctor configs, agent docs, project config dir~/.orodc/<project>/, and searched-paths error reporting for missing assets. - 3.2 Implement the
envfile parser (comments, quotes, blank values, export prefixes) with fixtures matching currentload_env_safesemantics. - 3.3 Implement environment loading with current precedence (
.env,.env-app,.env-app.local, global then local.env.orodc) and old global config file-to-directory migration. - 3.4 Implement the DSN/URI parser for database, search, MQ, and Redis URLs and expose normalized
DC_ORO_DATABASE_*/DC_ORO_*_URIvalues to compose generation. - 3.5 Implement project detection:
composer.json,.env.orodc, global config dirs, empty-directory handling, andcheck_in_projectgating for project-required commands. - 3.6 Implement CMS/application detection (Oro, Marello, Magento, Symfony, Laravel, WinterCMS, WordPress, Drupal, generic PHP) plus PHP version detection from
composer.jsonand compatible Node/database/search version helpers. - 3.7 Implement the environment registry service for
~/.orodc/environments.json: register, unregister, status, scan-and-register, stale-entry cleanup, real-path resolution, and last-used environment lookup. - 3.8 Implement the
uiservice: colored messages, headers, spinners with progress and timing, confirmation prompts, selectors, port prompts, tables, and non-interactive/no-TTY degradation. - 3.9 Implement the
processrunner: argv execution, streaming mode, captured-log mode with failure log display, TTY passthrough, exit-code preservation, and signal forwarding. - 3.10 Implement binary resolution (
resolve_binequivalent) for docker, docker compose, brew, mutagen, rsync, jq-replacement needs, and mkcert, with user-friendly install hints on missing binaries. - 3.11 Implement the
portsservice: prefix-derived service ports, explicitDC_ORO_PORT_*overrides, and Docker-aware free-port fallback (inspecting existing container bindings), replacingorodc-find_free_port. - 3.12 Implement Xdebug mode persistence (
XDEBUG_MODE*save/load) and menu-driven environment switching resolution fromDC_ORO_SELECTED_ENV_NAME/_PATH/_CONFIG. - 3.13 Implement
COMPOSER_AUTHforwarding: derive fromDC_ORO_COMPOSER_AUTH,COMPOSER_AUTH, or~/.composer/auth.json, compact to single-line JSON, and expose for container and SSH execution. - 3.14 Implement compose profiles caching (
save_profiles/load_cached_profilesequivalents) and project certificate setup (mkcert-basedsetup_project_certificates).
- 4.1 Implement Docker and Docker Compose binary discovery and validation with user-friendly errors, plus dynamic discovery of supported compose subcommands for pass-through routing.
- 4.2 Implement compose flag parsing: left-side flags/options, compose command, right-side flags/options, and service arguments with preserved ordering (
parse_compose_flagsequivalent). - 4.3 Implement compose file stack selection: base file,
docker-compose-default.ymlin default mode, pgsql/mysql file by schema (including persisted-schema detection from existing config dir files),docker-compose-oro.ymlfor Oro projects, and CMS cron/ofelia files. - 4.4 Implement compose config generation into
~/.orodc/<project>/compose.yml: copy/render compose assets into the config dir, generate thessh_id_ed25519key when missing, resolve ports, build Traefik rules and extra hosts, and update the registry after generation. - 4.5 Implement
composecommand execution using structured argv (no shelleval) with config refresh-if-needed before execution. - 4.6 Implement
uporchestration: image pull, appcode volume sync, optional build, start, health-check wait, timing persistence with previous-run comparison, and service URL display. - 4.7 Implement top-level compose aliases
up,down,ps,logs,start,stop,restartwith pass-through arguments identical toorodc compose <cmd>. - 4.8 Implement deprecated compose command errors (
build,config,cp,create,events,images,kill,pull,push,rm,run,stats,watch) with old/new syntax examples and exit code 1. - 4.9 Implement sync mode selection:
DC_ORO_MODEwith OS-based default (mutagenon macOS,defaulton Linux/WSL2) including WSL2 detection. - 4.10 Implement appcode volume management and ssh-mode seeding: ensure
<project>_appcodevolume, start thesshservice when needed, and rsync the source excludingvar/cache,vendor,node_modules. - 4.11 Implement the mutagen session lifecycle: create against the
sshservice if absent, wait for watching state, avoid duplicate sessions, and terminate on down/purge.
- 5.1 Implement informational commands
help,man, andversion(formula/package version metadata, doc asset fallback). - 5.2 Implement
status,env,list,conf, andagentscommands against the shared registry, environment, and asset services. - 5.3 Implement the
v/verbosetoggle with persisted state, immediate exit, and no project initialization. - 5.4 Implement smart PHP routing: implicit PHP for bare flags (
orodc -v,orodc --version,orodc -r <code>),.phpscript paths,bin/console,bin/magento, and related executable paths, including PHP logging setup. - 5.5 Implement explicit
php,composer, andexeccommands with current interactive TTY and non-interactive behavior. - 5.6 Implement direct database client routing:
mysql,psql, anddatabase-cli(default to bash) viadocker compose runwith credential env injection. - 5.7 Implement the
databasegroup anddbalias:mysql,psql,cli,purge,recreate, with unknown-subcommand errors. - 5.8 Implement
database importwith its current format and source handling (file formats, archive handling, URL/stdin sources as supported today) and progress feedback; port the behavior of the 600-line Bash implementation incrementally with fixtures. - 5.9 Implement
database exportand the interactive export/import flows used by the menu (dump listing, naming, confirmation). - 5.10 Implement fuzzy database/platform command patterns from task 1.2 routing to import/export/platform-update/cache behaviors.
- 5.11 Implement project lifecycle commands
install,purge(containers, volumes, images, registry cleanup), andconfig-refresh. - 5.12 Implement
cacheandplatform-updatecommands includingcache:*console pass-through. - 5.13 Implement the
testsgroup:install,run,behat,phpunit,shell, with the test database environment anddocker-compose-test.ymlstack. - 5.14 Implement the
proxygroup:up,down,restart,install-certs, usingdocker-compose-proxy.ymland certificate setup. - 5.15 Implement
image buildanddocker-buildcommands with current build-argument and tagging behavior. - 5.16 Implement the
sshcommand: SSH port discovery from the runningsshservice,ssh_id_ed25519identity,SendEnv COMPOSER_AUTH, host key options, and argument pass-through. - 5.17 Implement the
searchcommand. - 5.18 Implement the
initcommand and interactive wizard: validation, defaults, CMS-aware suggestions, config preservation, backups, and save confirmation.
- 6.1 Implement no-args dispatch: interactive menu in a TTY, last-used environment switching when outside a project,
DC_ORO_NO_MENUsuppression, and non-interactive skip behavior. - 6.2 Implement the interactive menu: environment list with status, command actions, menu-return flow after command completion, and environment switching via
DC_ORO_SELECTED_ENV_*. - 6.3 Implement domain management and application URL configuration flows (Traefik rule rebuild, extra hosts, config persistence).
- 6.4 Implement doctor configuration discovery, Oro version detection, and generated Goss config output with fixtures for generated configs.
- 6.5 Implement doctor service checks and result tables, with fixtures for service health parsing.
- 7.1 Update the Homebrew formula to build/install the compiled Node CLI with a Homebrew Node.js dependency, keeping
orodcas the installed entry point. - 7.2 Ensure
compose/, Dockerfiles, doctor configs, agent docs, and required static scripts are installed to the shared asset location resolvable by thepathsservice. - 7.3 Remove companion binaries: replace
orodc-find_free_portwith the TypeScriptportsservice, delete the unused vendored osync (bin/orodc-sync), and drop both from formula installation. - 7.4 Add a formula smoke test for
orodc --help(or another non-Docker command) and verify it passes viabrew test. - 7.5 Add generated shell completion support or explicitly defer completions with a documented follow-up task.
- 7.6 Remove host-side Bash module installation (
libexec/orodc/, Bashbin/orodc) once the TypeScript CLI fully replaces it, keeping container-side scripts and image assets.
- 8.1 Run unit tests for env parsing/precedence, DSN parsing, path resolution, CMS detection, registry management, ports, profiles cache, and
COMPOSER_AUTHhandling. - 8.2 Run unit tests for process runner behavior: exit codes, signal forwarding, captured-log failure output, and TTY/non-TTY modes.
- 8.3 Run golden output tests for help/version/errors, deprecated syntax, aliases, fuzzy patterns, and smart PHP routing against section 1 fixtures.
- 8.4 Run command construction tests verifying generated argv arrays for compose, PHP, Composer, database, proxy, tests, image, and ssh workflows without a Docker daemon.
- 8.5 Run sync-mode tests: OS default selection (macOS/Linux/WSL2), appcode volume idempotency, mutagen session lifecycle, and ssh-mode rsync seeding (mocked where Docker is unavailable).
- 8.6 Run Docker integration tests for init, config generation, up, ps, logs, down, database import/export, proxy, and image build per the release-gating matrix from task 1.9.
- 8.7 Verify Homebrew install/reinstall/upgrade from a development tap checkout, including config compatibility for an environment created by the Bash CLI.
- 8.8 Run shellcheck/bash syntax checks for remaining shell assets that still execute as Docker entrypoints or static helpers.
- 8.9 Update CI: add Node build/lint/test workflow and adjust
test-oro-installations-containerized.ymlto exercise the new CLI. - 8.12 Add a CI job that validates Homebrew installation on Linux and macOS:
brew installfrom the tap checkout,brew test, and a non-Dockerorodccommand, gating every change to the formula or CLI. - 8.10 Update developer documentation for the TypeScript architecture, dev-checkout workflow, and contribution conventions.
- 8.11 Run the repository-required verification command before requesting review.