Back to index

Command Line Interface

agent-sync provides a command-line interface (CLI) with several commands and options to control its behavior.

Global Flags

These flags can be used with any command:

Flag Description
--output, -o Output format (json, yaml, text)
--verbose, -v Enable verbose output
--log-file Log file path
--log-level Log level (debug, info, warn, error)
--debug Set log level to debug (shorthand for –log-level=debug and enables console output same as –verbose)

Environment Variables

Most command-line flags can be configured via environment variables using the AGENT_SYNC_ prefix.

For details on available environment variables, run:

agent-sync --help

Commands

apply

Generates files based on agent-sync.yml configuration.

Usage: agent-sync apply

All projects will be processed.

Flags:

init

Initializes a new agent-sync.yml configuration and sample files.

Usage: agent-sync init

Flags:

Examples

Applying with verbose output:

agent-sync apply --verbose

Initializing a new configuration:

agent-sync init

Applying with debug logs:

# Shorthand: sets level=debug and enables console output (implies verbose)
agent-sync apply --debug

# Equivalent explicit form (debug level + console output)
agent-sync apply --log-level debug --verbose

Note: --log-level debug without --verbose does not enable console output; --debug implies verbose and will enable console output.

Dry run to preview changes:

agent-sync apply --dry-run

For more information about logging configuration, see the Logging Guide.


Previous Next
Task Types Template System

Back to index