|
| 1 | +# CLI Reference |
| 2 | + |
| 3 | +The `uip` CLI manages the full deployment lifecycle of a coded app. |
| 4 | + |
| 5 | +## Installation |
| 6 | + |
| 7 | +<!-- termynal --> |
| 8 | +```bash |
| 9 | +npm install -g @uipath/cli |
| 10 | + |
| 11 | +uip tools install codedapp |
| 12 | +``` |
| 13 | + |
| 14 | +!!! info "Minimum versions" |
| 15 | + Coded Apps requires **CLI version >= 0.1.21** and **codedapp tool version >= 0.1.14**. |
| 16 | + |
| 17 | + Check your installed CLI version: |
| 18 | + |
| 19 | + ```bash |
| 20 | + uip --version |
| 21 | + ``` |
| 22 | + |
| 23 | + Check your installed codedapp tool version: |
| 24 | + |
| 25 | + ```bash |
| 26 | + uip tools list |
| 27 | + ``` |
| 28 | + |
| 29 | + To update the codedapp tool to the latest version: |
| 30 | + |
| 31 | + ```bash |
| 32 | + uip tools update |
| 33 | + ``` |
| 34 | + |
| 35 | +--- |
| 36 | + |
| 37 | +## login |
| 38 | + |
| 39 | +Authenticate with the UiPath platform. |
| 40 | + |
| 41 | +``` |
| 42 | +$ uip login [options] |
| 43 | +``` |
| 44 | + |
| 45 | +| Name | Type | Description | Default | |
| 46 | +|------|------|-------------|---------| |
| 47 | +| `-f, --file` | string | Path to credentials folder | — | |
| 48 | +| `--authority` | string | Custom authority URL | — | |
| 49 | +| `--client-id` | string | Client ID or Application ID | — | |
| 50 | +| `--client-secret` | string | Client secret or Application secret | — | |
| 51 | +| `-s, --scope` | string | Custom scopes (space-separated) | — | |
| 52 | +| `-t, --tenant` | string | Tenant name (non-interactive mode) | — | |
| 53 | +| `--it, --interactive` | boolean | Interactively select tenant from list | — | |
| 54 | + |
| 55 | +**Examples** |
| 56 | + |
| 57 | +<!-- termynal --> |
| 58 | + |
| 59 | +```bash |
| 60 | +# Interactive login |
| 61 | +$ uip login -it |
| 62 | + |
| 63 | +# Specific tenant |
| 64 | +$ uip login --tenant MyTenant |
| 65 | + |
| 66 | +# Check login status |
| 67 | +$ uip login status |
| 68 | +``` |
| 69 | + |
| 70 | +--- |
| 71 | + |
| 72 | +## Build app |
| 73 | + |
| 74 | +Before proceeding, make sure you build your coded app using your framework's build command from the root of the project: |
| 75 | + |
| 76 | +``` |
| 77 | +$ npm run build |
| 78 | +``` |
| 79 | +This will create the `dist` (or build) folder. |
| 80 | + |
| 81 | +## pack |
| 82 | + |
| 83 | +Package a built app into a `.nupkg`. |
| 84 | + |
| 85 | +``` |
| 86 | +$ uip codedapp pack <dist> [options] |
| 87 | +``` |
| 88 | + |
| 89 | +| Name | Type | Description | Default | |
| 90 | +|------|------|-------------|---------| |
| 91 | +| `-n, --name` | string | Package name | — | |
| 92 | +| `--version` | string | Package version | `1.0.0` | |
| 93 | +| `-o, --output` | string | Output directory | `./.uipath` | |
| 94 | +| `--author` | string | Package author | `UiPath Developer` | |
| 95 | +| `--description` | string | Package description | — | |
| 96 | +| `--main-file` | string | Main entry file | `index.html` | |
| 97 | +| `--content-type` | string | Content type: `webapp`, `library`, or `process` | `webapp` | |
| 98 | +| `--dry-run` | boolean | Show what would be packaged without creating it | — | |
| 99 | +| `--reuse-client` | boolean | Reuse existing clientId from uipath.json | — | |
| 100 | +| `--base-url` | string | UiPath base URL | — | |
| 101 | +| `--org-id` | string | Organization ID | — | |
| 102 | +| `--tenant-id` | string | Tenant ID | — | |
| 103 | +| `--access-token` | string | Access token | — | |
| 104 | + |
| 105 | +!!! info "Angular dist path" |
| 106 | + Angular 17+ outputs to `dist/<project-name>/browser/`. Angular 16 and earlier outputs to `dist/<project-name>/`. |
| 107 | + |
| 108 | +**Output**: `.uipath/<name>.<version>.nupkg` |
| 109 | + |
| 110 | +**Examples** |
| 111 | + |
| 112 | +<!-- termynal --> |
| 113 | + |
| 114 | +```bash |
| 115 | +$ uip codedapp pack ./dist |
| 116 | + |
| 117 | +$ uip codedapp pack ./dist --name MyApp |
| 118 | + |
| 119 | +$ uip codedapp pack ./dist --name MyApp --version 1.0.0 |
| 120 | + |
| 121 | +``` |
| 122 | + |
| 123 | +--- |
| 124 | + |
| 125 | +## publish |
| 126 | + |
| 127 | +Upload the `.nupkg` to Orchestrator and register it as a coded app version. |
| 128 | + |
| 129 | +``` |
| 130 | +$ uip codedapp publish [options] |
| 131 | +``` |
| 132 | + |
| 133 | +| Name | Type | Description | Default | |
| 134 | +|------|------|-------------|---------| |
| 135 | +| `-n, --name` | string | Package name (non-interactive) | — | |
| 136 | +| `--version` | string | Package version (requires `--name`) | — | |
| 137 | +| `-t, --type` | string | App type: `Web` or `Action` | `Web` | |
| 138 | +| `--uipath-dir` | string | UiPath directory containing packages | `./.uipath` | |
| 139 | +| `--base-url` | string | UiPath base URL | — | |
| 140 | +| `--org-id` | string | Organization ID | — | |
| 141 | +| `--tenant-id` | string | Tenant ID | — | |
| 142 | +| `--tenant-name` | string | Tenant name | — | |
| 143 | +| `--access-token` | string | Access token | — | |
| 144 | + |
| 145 | +**Examples** |
| 146 | + |
| 147 | +<!-- termynal --> |
| 148 | + |
| 149 | +```bash |
| 150 | +$ uip codedapp publish |
| 151 | + |
| 152 | +$ uip codedapp publish --name MyApp |
| 153 | + |
| 154 | +$ uip codedapp publish --name MyApp --version 2.0.0 |
| 155 | +``` |
| 156 | + |
| 157 | +--- |
| 158 | + |
| 159 | +## deploy |
| 160 | + |
| 161 | +Deploy a published app version to a folder. |
| 162 | + |
| 163 | +``` |
| 164 | +$ uip codedapp deploy [options] |
| 165 | +``` |
| 166 | + |
| 167 | +| Name | Type | Description | Default | |
| 168 | +|------|------|-------------|---------| |
| 169 | +| `-n, --name` | string | App name | — | |
| 170 | +| `--version` | string | Target a specific published version | — | |
| 171 | +| `--base-url` | string | UiPath base URL | — | |
| 172 | +| `--org-id` | string | Organization ID | — | |
| 173 | +| `--org-name` | string | Organization name | — | |
| 174 | +| `--tenant-id` | string | Tenant ID | — | |
| 175 | +| `--folder-key` | string | Folder key | — | |
| 176 | +| `--access-token` | string | Access token | — | |
| 177 | + |
| 178 | +**Examples** |
| 179 | + |
| 180 | +<!-- termynal --> |
| 181 | + |
| 182 | +```bash |
| 183 | +$ uip codedapp deploy |
| 184 | + |
| 185 | +$ uip codedapp deploy --name MyApp |
| 186 | +``` |
| 187 | + |
| 188 | +--- |
| 189 | + |
| 190 | + |
| 191 | +## Upgrading / Deploying new version of a coded app |
| 192 | + |
| 193 | +When updating a deployed app, just repeat the build-pack-publish-deploy cycle with a bumped version: |
| 194 | +<!-- termynal --> |
| 195 | +```bash |
| 196 | +# 1. Rebuild |
| 197 | +npm run build |
| 198 | +# 2. Pack with new version |
| 199 | +uip codedapp pack dist -n my-webapp --version 2.0.0 |
| 200 | +# 3. Publish |
| 201 | +uip codedapp publish |
| 202 | +# 4. Deploy (auto-detects upgrade) |
| 203 | +uip codedapp deploy |
| 204 | +``` |
| 205 | + |
| 206 | +## Environment Variables |
| 207 | + |
| 208 | +All flags can be supplied as environment variables (set by `uip login` or manually for CI/CD): |
| 209 | + |
| 210 | +| Variable | Description | |
| 211 | +|----------|-------------| |
| 212 | +| `UIPATH_URL` | Platform base URL | |
| 213 | +| `UIPATH_ORGANIZATION_NAME` | Organization name | |
| 214 | +| `UIPATH_ORGANIZATION_ID` | Organization ID | |
| 215 | +| `UIPATH_TENANT_NAME` | Tenant name | |
| 216 | +| `UIPATH_TENANT_ID` | Tenant ID | |
| 217 | +| `UIPATH_ACCESS_TOKEN` | Bearer token (skips interactive login) | |
| 218 | +| `UIPATH_REFRESH_TOKEN` | Refresh token | |
| 219 | +| `UIPATH_PROJECT_ID` | Studio Web project ID (for push/pull) | |
| 220 | + |
| 221 | +--- |
| 222 | + |
| 223 | +## Config Files |
| 224 | + |
| 225 | +| File | Written by | Purpose | |
| 226 | +|------|-----------|---------| |
| 227 | +| `.uipath/.auth` | `uip login` | Access tokens and org/tenant selection. | |
| 228 | +| `.uipath/app.config.json` | `uip codedapp publish` / `uip codedapp deploy` | App `systemName`, `deployVersion`, `deploymentId` for subsequent runs | |
| 229 | +| `uipath.json` | developer / `uip codedapp pack` | SDK config — read by `pack` and the `@uipath/coded-apps-dev` dev plugin | |
0 commit comments