Merge pull request #27 from IntersectMBO/show_pid_logfile_testnet_info
refactor(cli): unify instance info keys for start/inspect
refactor(cli): unify instance info keys for start/inspect
Standardize the keys used for instance information in both the `testnet_start` and `get_testnet_info` functions. Replace "pid" and "logfile" with "start_pid" and "start_logfile" for consistency. Also, ensure the "dir" key is always present. This improves clarity and reduces confusion when consuming instance metadata.
docs(readme): add installation instructions for nix and pip
Add installation instructions to the README.
docs(readme): improve getting started instructions
docs(readme): add testnet creation and management guide
Expand the README with basic instructions for creating, listing, inspecting, and stopping Cardonnay testnet instances. Includes example commands and expected outputs for each step.
feat: add bash completion script for cardonnay
Introduce a dedicated bash completion script for the cardonnay CLI in the completions directory. Update the development shell setup in flake.nix to source this script instead of evaluating the completion inline.
feat(readme): add centered logo image to README
Added a centered logo image to the README using HTML for alignment and custom width.
refactor(cli): clarify "testnet cluster" terminology
Update CLI help messages and log outputs to consistently use "testnet cluster" instead of "testnet" for improved clarity. This affects command descriptions, print statements, and error logs in both the main CLI and control commands. No functional changes were made.
feat(cli): add stop-all command to stop all testnet instances
Introduce a new CLI command `stop-all` that stops all running testnet instances in the specified working directory. This command iterates over all running instances, kills their processes, and stops their testnets. Also, improve help texts for related commands for clarity.
refactor(cli): check supervisor bin only for actions
Previously, all cluster control commands checked for the presence of all required binaries, even when only supervisor-related actions were needed. This change introduces a `has_supervisorctl` utility to check only for the `supervisorctl` binary where appropriate, and limits full environment sanity checks to where they are strictly necessary. This improves granularity and reduces unnecessary checks.
refactor: centralize testnet state constants
Move testnet state strings ("started", "starting", "stopped") to a new consts.States class for consistency and maintainability. Update all references in cli_control.py, cli_create.py, and inspect_instance.py to use the new constants.
feat(cluster): improve cluster start checks and UX
Replace PID file check with socket existence check to determine if the cluster is already running, making the detection more robust. Add rocket emoji to the "Cluster started" message for better user feedback. Also, add shellcheck disables for variables used in sourced functions.
feat(cli): add colorized output and logging
Introduce colorized output for CLI messages and logging. Add a new `colors` module with ANSI color codes, and a `color_logger` module for colorized log formatting. CLI commands now print status messages in green for better visibility. Color usage is configurable via environment variables: respects `NO_COLOR`, `CLICOLOR`, and `CLICOLOR_FORCE`.
refactor(cli): replace LOGGER.info with print for user messages