Skip to main content

uip agent file

uip agent file operates on the individual files inside a Studio Web project — the granular cousin of uip agent pull / push, which move whole .uis archives. Use file when you want to read or overwrite a specific file (for example, patch agent.json in place) without pulling and repacking the whole solution.

Every subcommand requires an active CLI session (uip login). All subcommands honor the global options (--output, --output-filter, --log-level, --log-file). Exit codes follow the standard contract.

Synopsis

uip agent file list <projectId>                                    [--login-validity <minutes>]
uip agent file get <projectId> <fileId> [-d <path>] [--login-validity <minutes>]
uip agent file put <projectId> <fileId> <localPath> [--login-validity <minutes>]

<projectId> is a Studio Web project UUID — the inner project inside a solution, not the solution itself. Get one from the CloudProjectId field of uip agent push, from the projects[] array in uip agent list, or from SolutionStorage.json in a pushed project.

uip agent file list

List the files inside a Studio Web project as a flat tree.

Arguments

  • <projectId> (required) — Studio Web project UUID.

Options

FlagDefaultPurpose
--login-validity <minutes>10Minimum minutes of token validity required.

Example

uip agent file list a1b2c3d4-0000-0000-0000-000000000001

Data shape (--output json)

{
"Code": "AgentFileList",
"Data": [
{
"Path": "Agent/agent.json",
"Id": "a1b2c3d4-0000-0000-0000-000000000201",
"Name": "agent.json",
"FileType": "json",
"IsMain": "true",
"IsEntryPoint": "true"
}
]
}

Path is the full slash-separated path from the project root, including the nested folder names. IsMain and IsEntryPoint are stringified booleans ("true" / "false"). Empty projects return Data: { "Message": "No files found in project" }.

uip agent file get

Download a single file. Either write it to disk or base64-encode it into the response.

Arguments

  • <projectId> (required) — Project UUID.
  • <fileId> (required) — File UUID (from file list).

Options

FlagDefaultPurpose
-d, --destination <path>(write to response)Local path to write the file to. Parent directory is created automatically.
--login-validity <minutes>10Minimum minutes of token validity required.

Examples

# Download to a specific file path
uip agent file get \
a1b2c3d4-0000-0000-0000-000000000001 \
a1b2c3d4-0000-0000-0000-000000000201 \
-d ./agent.json

# Fetch without writing to disk (content is inlined base64)
uip agent file get \
a1b2c3d4-0000-0000-0000-000000000001 \
a1b2c3d4-0000-0000-0000-000000000201

Data shape (--output json)

With -d:

{
"Code": "AgentFileGet",
"Data": {
"Status": "File downloaded",
"ProjectId": "a1b2c3d4-0000-0000-0000-000000000001",
"FileId": "a1b2c3d4-0000-0000-0000-000000000201",
"Output": "/abs/path/agent.json"
}
}

Without -d (inlined):

{
"Code": "AgentFileGet",
"Data": {
"Status": "File downloaded",
"ProjectId": "…",
"FileId": "…",
"Content": "<base64>",
"Encoding": "base64"
}
}

uip agent file put

Upload/overwrite a file in a Studio Web project. The file is sent as multipart form data to PUT /api/Project/<projectId>/FileOperations/File/<fileId>.

Arguments

  • <projectId> (required) — Project UUID.
  • <fileId> (required) — File UUID to overwrite.
  • <localPath> (required) — Local file path to upload.

Options

FlagDefaultPurpose
--login-validity <minutes>10Minimum minutes of token validity required.

Example

uip agent file put \
a1b2c3d4-0000-0000-0000-000000000001 \
a1b2c3d4-0000-0000-0000-000000000201 \
./agent.json

Data shape (--output json)

{
"Code": "AgentFilePut",
"Data": {
"Status": "File uploaded",
"ProjectId": "a1b2c3d4-0000-0000-0000-000000000001",
"FileId": "a1b2c3d4-0000-0000-0000-000000000201",
"LocalPath": "/abs/path/agent.json"
}
}

See also