Skip to main content

File command plugin for mngr - read, write, and list files on agents and hosts

Project description

mngr-file

Read, write, and list files on agents and hosts.

A plugin for mngr that adds the mngr file command with get, put, and list subcommands.

Usage

# Read a file from an agent (prints to stdout)
mngr file get my-agent config.toml

# Read a file and save locally
mngr file get my-agent config.toml --output local-config.toml

# Write a file to an agent from a local file
mngr file put my-agent config.toml --input local-config.toml

# Write stdin to a file on an agent
echo "hello" | mngr file put my-agent greeting.txt

# List files in an agent's work directory
mngr file list my-agent

# List files recursively
mngr file list my-agent -R

# List files in a specific subdirectory
mngr file list my-agent src/

# Use absolute paths (bypasses --relative-to)
mngr file get my-agent /etc/hostname

Target

TARGET can be either an agent name/ID or a host name/ID. If the identifier matches both an agent and a host, an error is raised asking you to use the full ID for disambiguation.

Path resolution

Paths can be absolute or relative. Relative paths are resolved against a base directory that depends on the target type:

Agent targets use --relative-to to select the base directory:

  • work (default): the agent's working directory
  • state: the agent's state directory ($MNGR_AGENT_STATE_DIR)
  • host: the host directory ($MNGR_HOST_DIR)

Host targets always resolve relative paths against the host directory ($MNGR_HOST_DIR).

Options

Output format

All subcommands support standard mngr output options (--output-format, --format).

Field selection (list only)

  • --fields name,size,modified -- select which columns to display
  • Available fields: name, path, file_type, size, modified, permissions

File options (put only)

  • --mode 0644 -- set file permissions on the remote file

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

imbue_mngr_file-0.1.5.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

imbue_mngr_file-0.1.5-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file imbue_mngr_file-0.1.5.tar.gz.

File metadata

  • Download URL: imbue_mngr_file-0.1.5.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for imbue_mngr_file-0.1.5.tar.gz
Algorithm Hash digest
SHA256 28c51430d27301187fe6c2d8455a9f2eac9ffb22603c0b10b763ca10951599b3
MD5 a6e5ad2e19cb00d29089c538c8255251
BLAKE2b-256 a92e81ddbfdbfd756194650d4a7a62a2e7407c725b7973d5d1d660f8a8d37d7f

See more details on using hashes here.

Provenance

The following attestation bundles were made for imbue_mngr_file-0.1.5.tar.gz:

Publisher: publish.yml on imbue-ai/mngr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file imbue_mngr_file-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: imbue_mngr_file-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for imbue_mngr_file-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 22469e9776527fb0a8eabeddc5a90aff89b424c06e6d8c8b54c802c9713df2d6
MD5 78e86f3410a9e2895ed7ae6d8905fcb6
BLAKE2b-256 a074368657d5306c94a82cf37fdd487382ae52d07557b0ccf76ebf05560afd96

See more details on using hashes here.

Provenance

The following attestation bundles were made for imbue_mngr_file-0.1.5-py3-none-any.whl:

Publisher: publish.yml on imbue-ai/mngr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page