Skip to content

Latest commit

 

History

History
209 lines (144 loc) · 7.7 KB

File metadata and controls

209 lines (144 loc) · 7.7 KB

Dazzlelink Command Reference

The built-in help (dazzlelink {command} -h) is generated from the code and is always authoritative; this document is the readable tour. Current as of v0.11.0.


Global Options

Option Description
-h, --help Display help for the tool or any command
-V, --version Display the version (release + git build stamp)
-v, --verbose Enable verbose output

Commands

create

Description: Write a new .dazzlelink record pointing at any file or directory. The record stores the target's portable path family (absolute, relative to the record, UNC/drive/subst forms where mappings exist) and, optionally, web URLs.

Arguments

  • target: Target file or directory
  • link_name: Path of the .dazzlelink record to create

Options

  • --also-url URL (repeatable): Also record a web URL for the target. The record then carries the local path AND the URL: execute opens the local copy and falls back to the URL, or --prefer remote flips that choice. URLs must be scheme-form (https://host/file) — a typo fails at create, not at open.
  • -e, --executable: Make the record an executable (polyglot) script
  • -m, --mode {info,open,auto}: Default execution mode stored in the record
  • --config-level {global,directory,file}: Configuration level to use (default: file)

export

Description: Capture an EXISTING symlink as a .dazzlelink record. Unless --output says otherwise, the record lands beside the symlink as <symlink>.dazzlelink.

Arguments

  • link_path: Path to the symlink

Options

  • -o, --output OUTPUT: Output path for the record
  • -e, --executable: Make the record executable
  • -m, --mode {info,open,auto}: Default execution mode
  • --config-level {global,directory,file}: Configuration level to use

import

Description: Recreate symlinks from .dazzlelink records.

Arguments

  • paths (one or more): Record files or directories to search

Options

  • -t, --target-location LOCATION: Override location for the recreated symlinks
  • -r, --recursive: Search directories recursively
  • -p, --pattern PATTERN: Filename filter (default: *.dazzlelink)
  • -f, --flatten: Flatten directory structure when recreating
  • -d, --dry-run: Show what would be done without doing it
  • --remove-dazzlelinks: Remove record files after successful import
  • --timestamp-strategy {current,symlink,target,preserve-all}: Timestamps for the recreated link (default: current)
  • -u, --update-dazzlelink: Update record metadata during import
  • -l, --use-live-target: Check live target files for timestamps
  • --config-level {global,directory,file}: Configuration level to use

scan

Description: Scan a directory for symlinks and report them.

Arguments

  • directory: Directory to scan

Options

  • -n, --no-recursive: Do not scan recursively
  • -j, --json: Output in JSON format

convert

Description: Write a .dazzlelink record beside each symlink in a directory.

Arguments

  • directory: Directory to scan

Options

  • -n, --no-recursive: Do not scan recursively
  • -r, --remove-originals: Remove the original symlinks after conversion
  • -e, --executable: Make the records executable
  • -m, --mode {info,open,auto}: Default execution mode
  • --config-level {global,directory,file}: Configuration level to use

mirror

Description: Recreate a directory tree in another location using dazzlelinks.

Arguments

  • src_dir: Source directory
  • dest_dir: Destination directory

Options

  • -n, --no-recursive: Do not scan recursively
  • -e, --executable: Make the records executable
  • -m, --mode {info,open,auto}: Default execution mode
  • --config-level {global,directory,file}: Configuration level to use

execute

Description: Open a record's target — or inspect it. Resolution walks every stored locator in priority order (absolute, relative, UNC/drive/subst re-derived against THIS machine's current mappings, then explicit locators such as URLs), opening the first reachable one. Filesystem candidates are judged by existence; scheme-form candidates (https://...) are assumed openable — the OS handler decides at open time.

Arguments

  • dazzlelink_path: Path to the record

Options

  • -m, --mode {info,open,auto}: Override execution mode. info lists every target numbered [N] with its locality rung plus the Would open: preview (zero network I/O); open/auto open the winner.
  • --prefer WHERE: Prefer targets at a locality rung, alias, or locator kind; everything else stays as fallback. --prefer remote opens the web copy even while the local file exists.
  • --only WHERE: Restrict to targets at that rung/alias/kind; a miss errors naming the reaches and kinds the record actually has.
  • --kind KIND (repeatable): Restrict to locators of an exact kind (e.g. url, path)
  • --target N: Open exactly the locator numbered [N] by --mode info. Conflicts with the selector flags above.
  • --config-level {global,directory,file}: Configuration level to use

The locality ladder (see dazzlelink execute -h for the live legend): rungs local (this machine — the default), intranet (shares, mapped drives), internet (beyond); reach aliases local-network, remote; scheme aliases http/https/url; any other spelling selects a locator KIND directly — open-ended (ftp, gopher, protocols nobody has invented yet). There is no closed vocabulary: the record is the validator.


config

Description: View or set configuration options.

Options

  • --view: View current configuration
  • --set KEY=VALUE: Set a configuration value
  • --reset: Reset to default configuration
  • --global: Apply to the global configuration
  • -d, --directory DIRECTORY: Apply to a specific directory

check

Description: Check symlinks and report broken ones.

Arguments

  • directory: Directory to scan

Options

  • -n, --no-recursive: Do not scan recursively
  • -f, --fix: Try to fix broken links
  • -r, --fix-relative: Try to fix broken relative links by searching

rebase

Description: Change stored link paths (relative/absolute conversion, base-path replacement).

Arguments

  • directory: Directory to scan

Options

  • -n, --no-recursive: Do not scan recursively
  • -r, --relative: Convert absolute links to relative
  • -a, --absolute: Convert relative links to absolute
  • -t, --target-base OLD:NEW: Replace a base path prefix
  • -b, --only-broken: Only rebase broken links

copy

Description: Copy symlinks to another location.

Arguments

  • links (one or more): Links to copy (files or directories)
  • destination: Destination directory

Options

  • -p, --preserve-structure: Preserve directory structure
  • -b, --base-dir BASE_DIR: Base directory for structure preservation
  • -r, --relative: Convert to relative links in the destination
  • -a, --absolute: Convert to absolute links in the destination
  • -n, --no-verify: Skip verification after copying
  • --config-level {global,directory,file}: Configuration level to use

update-config

Description: Update stored configuration for many records at once.

Arguments

  • path: File or directory to update

Options

  • -m, --mode {info,open,auto}: New default execution mode
  • -p, --pattern PATTERN: Filename filter (default: *.dazzlelink)
  • -r, --recursive: Search subdirectories recursively
  • -d, --dry-run: Show what would change without changing it
  • --make-executable: Make updated records executable
  • --config-level {global,directory,file}: Level to save changes to (default: file)