The Deadfire command console is a text-based interface that lets you inspect, configure, and automate runtime behavior for Deadfire applications and services. It provides an interactive line editor where you can enter commands, chain operations with parameters and flags, and retrieve structured output for diagnostics or scripting. This guide explains how to open the console, use built-in commands, apply filters and flags, interpret responses, and integrate the console into automated workflows. Topics include session configuration, history navigation, autocomplete, error interpretation, common pitfalls, and safe practices for production use.
What Is the Deadfire Command Console
The Deadfire command console is a developer and administrator tool that exposes runtime metrics, configuration, and control functions through a command-line interface. It runs in a terminal or integrated console pane and communicates with the Deadfire host or agent via a defined protocol. The console emphasizes reproducibility, transparency, and low-overhead inspection, making it suitable for both interactive debugging and scripted operations. Unlike visual managers, it relies on explicit commands and text output, which keeps behavior deterministic and easy to log. Built-in topics cover system health, services, networks, storage, and policy enforcement.
Getting Started and Access
Connecting to a Running Instance
To open the Deadfire command console, first ensure the Deadfire service or agent is running on the target host. Use the CLI launcher or an integrated terminal provided by your environment to start the console client. Specify connection details such as host, port, and authentication token when prompted. Secure connections typically require TLS and account credentials; local sessions may skip remote authentication. Once connected, you will see a prompt indicating the current context, such as host or service name. From here you can run help to list available commands or topic --all to explore categories.
Authentication and Permissions
Access to the Deadfire command console is governed by role-based permissions. Users must authenticate with a valid token or credential pair that maps to an internal role such as viewer, operator, or admin. Viewer roles can run inspection commands but cannot modify configuration. Operator roles can adjust runtime parameters and restart noncritical components. Admin roles have full control, including user management and service lifecycle commands. Permission checks occur at command execution time, and denied attempts return clear error messages without exposing sensitive details. Token expiry and refresh behavior are documented in the security policy.
Core Commands and Functionality
The console organizes commands into logical groups such as system, service, network, storage, and policy. Each command accepts flags that alter output format, target scope, or execution mode. Common flags include --json for machine-readable output, --verbose for additional detail, and --confirm to enforce dangerous actions. You can filter results by name, id, status, or custom labels using simple expressions. Context-sensitive autocomplete reduces typos and shows valid subcommands as you type. Commands are designed to be idempotent where possible, so repeated execution with the same parameters does not cause unintended side effects.
Inspection Commands
Inspection commands query runtime state without changing it. Examples include listing active processes, showing configuration snapshots, and reporting health checks. These commands are safe to run in production and are often used in monitoring scripts. Output can be formatted as concise tables or structured JSON for downstream parsing. Inspection commands typically read from cached or live telemetry and should complete quickly even on large deployments.
Configuration Commands
Configuration commands let you view and modify tunable parameters at runtime. You can adjust log levels, connection timeouts, thread pools, and feature flags. Changes may apply immediately or require a reload or restart depending on the parameter. The console validates input against schema definitions and rejects malformed or unsafe values. Before applying changes, use the dry-run flag to preview the effect. Remember to document overrides so they can be tracked in version control or audit logs.
Control and Maintenance Commands
Control commands manage lifecycle actions such as restarting services, draining connections, and rolling updates. Maintenance commands initiate diagnostics, trigger garbage collection, or rotate logs. These operations can affect availability, so they should be performed during planned maintenance windows. Use the confirm flag or explicit approval steps to prevent accidental execution. The console logs each action with timestamps, user identity, and target objects for traceability. Post-action checks can be run automatically to verify success.
Command Syntax and Parameters
Commands follow a predictable pattern: deadfire <group> <action> [--flags] [arguments]. Groups represent functional areas like service or network. Actions include operations such as list, get, set, start, stop, and restart. Flags modify behavior, for example, --json, --verbose, --confirm, or --scope. Positional arguments provide targets such as service names, IDs, or file paths. You can combine multiple flags, and some commands support shorthand options for commonly used settings. Quoting is required for values that contain spaces or special characters.
Output Formats and Interpretation
The console supports multiple output formats, including human-readable tables, CSV, and JSON. The default format presents concise tables with key columns such as name, id, status, and uptime. The JSON format preserves types and nesting, making it suitable for automated processing. CSV is useful for spreadsheet analysis but does not support complex fields. When interpreting status columns, understand the semantics of values like degraded, offline, or pending. Error messages include codes and short descriptions; refer to the code reference table for remediation hints. Always validate unexpected outputs against schema documentation.
Practical Examples and Recipes
Example 1: Listing Healthy Services
To list all services with a healthy status in JSON format, use:
deadfire service list --format json --filter "status==healthy"Example 2: Inspecting Network Settings
To view current network configuration for a specific service:
deadfire network get --name paymentsvc --verboseExample 3: Safely Restarting a Service
To restart a service with confirmation and logging:
deadfire service restart --name ordersvc --confirm --log /var/log/restart.logTroubleshooting and Debugging
If the console fails to connect, verify network reachability, port accessibility, and authentication credentials. Check server-side logs for protocol errors or permission denials. Increase verbosity with --verbose to see detailed request and response payloads. Use the replay flag to resend the last command for diagnostic purposes when supported. Examine exit codes; zero indicates success, nonzero often signals usage errors or system faults. For ambiguous output, consult the command reference to confirm expected behavior and required prerequisites.
Best Practices and Safety
- Always prefer read-only inspection commands in production until you understand side effects.
- Use --confirm for potentially destructive actions and combine with logging.
- Validate output against expected schema, especially when parsing programmatically.
- Leverage history and autocomplete to reduce typos and speed up repetitive tasks.
- Document non-default settings and include them in change records.
- Schedule maintenance windows for restarts and configuration changes that affect availability.
- Regularly rotate credentials and tokens and follow least-privilege principles.
Reference: Common Commands and Quick Syntax
| Command Group | Action | Key Flags | Typical Use |
|---|---|---|---|
| service | list | --format, --filter | Inventory services and status |
| service | restart | --confirm, --log | Restart a service with confirmation |
| network | get | --name, --verbose | Inspect network settings |
| network | set | --name, --confirm | Update network parameters |
| storage | usage | --path, --json | Report storage utilization |
| policy | eval | --dry-run, --verbose | Test policy decisions |
Version Compatibility and Notes
The console behavior and available commands can vary across Deadfire versions. Newer releases may introduce additional flags, deprecate legacy commands, or change default output formats. Always check the version header at startup and consult the documentation that matches your installed version. When automating, pin to a known version or use capability negotiation instead of assuming uniform behavior. Track release notes for changes to command semantics, security requirements, and dependency updates.
Integration and Automation
The console is designed to be scriptable and suitable for integration into deployment pipelines, health checks, and incident response playbooks. Use JSON output and stable command syntax to build reliable parsing logic. Avoid hardcoding sensitive values; prefer environment variables or secure vaults. Implement timeouts and retries to handle temporary unavailability. Rotate credentials regularly and restrict console access to trusted automation accounts. When combined with logging and monitoring, the console becomes a powerful operational interface for both interactive and automated workflows.
For deeper exploration, consult the official Deadfire documentation and command reference to discover advanced topics such as custom extensions, plugin APIs, and audit logging.