Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions skills/uipath-coded-apps/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
8. **Base URL must use the API subdomain.** `https://api.uipath.com` not `https://cloud.uipath.com`. See the table below.
9. **`vite.config.ts` must always set `base: './'`.** The platform handles URL routing — apps must use relative asset paths. Do not use a routing name or a sub-path here. **Import static assets through the bundler** (`import logo from './assets/logo.png'`) so Vite fingerprints and base-rewrites them. Do NOT place them in `public/` or reference them by a hardcoded `/`-rooted path — those bypass base rewriting and 404 after deploy under the non-root mount.
10. **Use `getAppBase()` from `@uipath/uipath-typescript` for any absolute URL constructed at runtime** — router basename, image `src`, `fetch` paths. Deployed apps mount at a non-root prefix; `/`-rooted paths work locally but 404 after deploy. Vite's `base: './'` only fixes import-time references.
11. **`uip codedapp deploy` must run non-interactively.** Pass the folder key as `--folder-key <GUID>` (or as `UIPATH_FOLDER_KEY=<GUID>` env-var prefix — either works). The interactive folder picker fails in non-TTY contexts (CI, agent shells). If `deploy` rejects the key with `not found among folders accessible to your account` while `uip or folders list --all --name "<name>"` returns it, re-run **once** as `UIPATH_FOLDER_KEY=<GUID> uip codedapp deploy …` without `--folder-key`: the flag's pre-check works from an incomplete copy of the account's folder list on accounts with very many folders, so the key is fine and waiting or retrying the same call never helps. See [pack-publish-deploy.md](references/pack-publish-deploy.md#deploy-rejects-a-valid-folder-key-as-not-found-among-folders-accessible). If the user provides a folder **name**, resolve it with the server-side filter `uip or folders list --all --name "<name>" --output json` and pick the row whose `Name` **exactly** equals the target, then read its `Key` (the plain list is paginated 50/page and `--name` is a *contains* match requiring `--all`, so never just take the first row). A **personal workspace** is not in `--all` — resolve it from the default `uip or folders list --output json` where `Type == "Personal"`. To deploy into a **new** folder, create it first with `uip or folders create "<NAME>" --output json` and read `Data.Key`. The `uip or ...` commands require the Orchestrator tool — install once via `uip tools install @uipath/orchestrator-tool` (check first with `uip tools list`).

Check warning on line 55 in skills/uipath-coded-apps/SKILL.md

View workflow job for this annotation

GitHub Actions / skills/uipath-coded-apps

Possibly stale `uip codedapp deploy …` (valid prefix: `codedapp deploy`)
12. **Guard against text overflow in every UI.** See [patterns.md](references/patterns.md) "Preventing Text Overflow".
13. **Inspect the DF schema before writing analytics, filters, or seeds.** Run `uip df entities get <ENTITY_ID> --output json` to inspect fields and types. At runtime, use `entities.getById(<id>)` from the app's authenticated session. DF doesn't behave like a typical RDBMS; see [sdk/data-fabric.md](references/sdk/data-fabric.md) "Anti-shapes & gotchas".
14. **Every list call returns ONE page — even with no options. There is no "give me everything" path.** Applies to `getAll`, `getAllRecords`, `queryRecordsById`, `getFileMetaData`, etc. `getAll()` with no options does NOT return all rows; the SDK sends no `pageSize` and the **server** applies its own cap, wrapped in a misleadingly-named `NonPaginatedResponse`. To list every row from a source that may exceed the cap, you MUST loop the cursor: `while (page.hasNextPage) { page = await getAll({ cursor: page.nextCursor }) }` and accumulate `items`. Reading `result.items.length` after a single call is almost always a bug. See [sdk/pagination.md](references/sdk/pagination.md).
Expand All @@ -64,6 +64,7 @@
20. **A scaffold is not React until `src/main.tsx` exists — assert it before installing anything.** Scaffold both app types by copying the single `create-vite` command from [create-web-app.md](references/create-web-app.md) Step 3.2 or [create-action-app.md](references/create-action-app.md): it passes `--no-interactive` — without which `create-vite` stops on a linter prompt, and exits `0` having created nothing when no one can answer it — and ends in a `node` check that prints `SCAFFOLD_OK`. Never use an `npm create vite` form — `npm create` needs a bare `--` separator to forward flags, and a lost or corrupted separator makes npm swallow `--template` so `create-vite` silently scaffolds its **vanilla TypeScript** template. Never judge a scaffold by its exit code or output: `create-vite` exits `0` on a misparsed template, on a linter prompt it could not show, and on `Operation cancelled` over a non-empty target directory. Nothing in this skill installs `react` explicitly, so a wrong template surfaces minutes later as an unrelated-looking build failure. On failure re-scaffold with `--overwrite`; never convert a vanilla scaffold into a React one by hand.
21. **Call third-party systems through an Integration Service connector, or build one with `uip is connectors builder`; a direct `fetch` with a key needs a stated reason.** Any key the app holds (source, env var, `uipath.json`) ships in `dist/`. UiPath SDK calls are fine: they use the app's own session.
22. **Run the action-schema validator after every write or edit of `action-schema.json`.** Run `node <skill-dir>/scripts/validate-action-schema.js <path-to-action-schema.json>` and fix until exit `0` before reporting done — even when told to write the schema directly with no questions. A schema that looks right is not validated. Details: [create-action-app.md](references/create-action-app.md#validate-the-schema-required-before-proposing-it).
23. **Per-deployment configuration goes in `UIPATH_APPS_*` environment variables, read with `env` from `@uipath/uipath-typescript`; secrets never do.** The values are served in a public `env.js` next to the app, so anyone with the URL can read them. Use them for a region, a brand colour, a support email or a customer's feature toggle, always with a code fallback (`env.UIPATH_APPS_REGION ?? 'EU'`); a blank value is unset, not an empty string. A secret belongs in a Secret asset read by a coded function. List the names in `.env.example`, use `.env.local` for local values, and set the deployed values with `uip codedapp deploy --env-vars-file` / `--env` (standalone) or the solution's deploy configuration (in-solution). The feature is enabled per tenant; where it is off the deploy refuses the variables with `not enabled for this tenant`. See [environment-variables.md](references/environment-variables.md).

## Disambiguation — Apps vs Dashboards

Expand Down Expand Up @@ -187,6 +188,8 @@
|----------|---------|-------------|
| `UIPATH_PROJECT_ID` | `uip codedapp push` / `uip codedapp pull` | Studio Web project ID |

These configure the **CLI**. The **app's own** per-deployment values are the `UIPATH_APPS_*` environment variables described in [environment-variables.md](references/environment-variables.md); the two never mix.

**Base URL by environment** — derive from the portal host the user signed in to (`uip login status --output json` → `Data.BaseUrl`):

| Portal host | Correct Base URL |
Expand All @@ -201,7 +204,7 @@

1. **Auth** — `uip login status --output json`. If not logged in, ask the user for their environment and run `uip login`. With **client credentials** (headless/CI), use `--scope "OR.Default Apps.Read Apps.Write"` — all three names are required: `OR.Default` for Orchestrator, `Apps.Read` and `Apps.Write` for the Apps-service registration in `uip codedapp publish`. The External Application itself needs only `Apps.Read` and `Apps.Write`; `OR.Default` is auto-granted and not portal-selectable, so name it in `--scope`. If publish or deploy then fails, see [debug.md](references/debug.md#publish--deploy-fails-under-a-client-credentials-login).
2. **Build** — `npm run build`. Verify `ls dist/`.
3. **Pack** — `uip codedapp pack dist -n <name> --version <version>`. Produces `.uipath/<name>.<version>.nupkg`. Bump version if previously published.

Check warning on line 207 in skills/uipath-coded-apps/SKILL.md

View workflow job for this annotation

GitHub Actions / skills/uipath-coded-apps

Possibly stale `uip codedapp pack dist` (valid prefix: `codedapp pack`)
4. **Publish** — `uip codedapp publish` (add `-t Action` for action apps). Verify `cat .uipath/app.config.json`.
5. **Deploy** — `uip codedapp deploy -n <name> --folder-key <GUID>`. Resolve the GUID from the chosen folder: a personal workspace (`Type == "Personal"`), a named existing folder, or a freshly `uip or folders create`d one — via `uip or folders list --output json`. Dashboards additionally choose a **deploy mode** (standalone / governance-pinned / governance) that sets `--tags`; see [dashboards deploy impl](references/dashboards/plugins/deploy/impl.md). Never let the command go interactive. If deploy answers `not found among folders accessible to your account` for a key that `uip or folders list --all --name` returns, re-run once with the `UIPATH_FOLDER_KEY=<GUID>` prefix instead of `--folder-key` — do not wait or loop (Rule 11). Share the app URL with the user. **Deploy is done when the CLI reports success — do not poll or `curl` the app URL to confirm it.** Activation lags the deploy by minutes, so a fresh URL returning 404/503 is expected and proves nothing; waiting on it only burns time.

Expand Down
9 changes: 9 additions & 0 deletions skills/uipath-coded-apps/references/commands-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
The two name flags only apply when no project ID is set. If one is set by `--project-id`, `UIPATH_PROJECT_ID`, or `.env`, push fails instead of pushing into that project.

```bash
uip codedapp push [options]

Check warning on line 22 in skills/uipath-coded-apps/references/commands-reference.md

View workflow job for this annotation

GitHub Actions / skills/uipath-coded-apps

Possibly stale `uip codedapp push options` (valid prefix: `codedapp push`)
```

| Option | Description | Default |
Expand Down Expand Up @@ -53,6 +53,8 @@
uip codedapp push --solution-name "Product Announcements" --project-name "Announcements Portal"
```

When the project has a `.env.example` (or `.env.template`), push also adds its `UIPATH_APPS_*` names and values to the app resource's environment variables in the solution, so the deploy wizard shows what can be configured. It only adds names the solution does not list yet; values set in Studio Web are kept. Plain `.env` is never read or pushed. See [environment-variables.md](environment-variables.md).

**Auto-create project flow:**
```
? No project ID found. Would you like to create a new solution or use an existing one? Create a new solution
Expand All @@ -73,7 +75,7 @@
Pull project files from Studio Web to your local machine.

```bash
uip codedapp pull [options]

Check warning on line 78 in skills/uipath-coded-apps/references/commands-reference.md

View workflow job for this annotation

GitHub Actions / skills/uipath-coded-apps

Possibly stale `uip codedapp pull options` (valid prefix: `codedapp pull`)
```

| Option | Description | Default |
Expand Down Expand Up @@ -130,19 +132,19 @@

```bash
# Pack the dist directory (interactive prompts for name)
uip codedapp pack dist

Check warning on line 135 in skills/uipath-coded-apps/references/commands-reference.md

View workflow job for this annotation

GitHub Actions / skills/uipath-coded-apps

Possibly stale `uip codedapp pack dist` (valid prefix: `codedapp pack`)

# Pack with explicit name and version
uip codedapp pack dist -n my-webapp --version 2.0.0

Check warning on line 138 in skills/uipath-coded-apps/references/commands-reference.md

View workflow job for this annotation

GitHub Actions / skills/uipath-coded-apps

Possibly stale `uip codedapp pack dist` (valid prefix: `codedapp pack`)

# Pack to a custom output directory
uip codedapp pack dist -o ./packages

Check warning on line 141 in skills/uipath-coded-apps/references/commands-reference.md

View workflow job for this annotation

GitHub Actions / skills/uipath-coded-apps

Possibly stale `uip codedapp pack dist` (valid prefix: `codedapp pack`)

# Preview packaging without creating the file
uip codedapp pack dist --dry-run

Check warning on line 144 in skills/uipath-coded-apps/references/commands-reference.md

View workflow job for this annotation

GitHub Actions / skills/uipath-coded-apps

Possibly stale `uip codedapp pack dist` (valid prefix: `codedapp pack`)

# Pack with all options
uip codedapp pack dist -n my-webapp --version 1.0.0 --author "My Team" --description "Production app" --main-file app.html

Check warning on line 147 in skills/uipath-coded-apps/references/commands-reference.md

View workflow job for this annotation

GitHub Actions / skills/uipath-coded-apps

Possibly stale `uip codedapp pack dist` (valid prefix: `codedapp pack`)
```

**Output:**
Expand All @@ -167,7 +169,7 @@
Publish a `.nupkg` to UiPath Orchestrator **and** register the coded app with the Apps service. Combines upload and registration into a single step.

```bash
uip codedapp publish [options]

Check warning on line 172 in skills/uipath-coded-apps/references/commands-reference.md

View workflow job for this annotation

GitHub Actions / skills/uipath-coded-apps

Possibly stale `uip codedapp publish options` (valid prefix: `codedapp publish`)
```

| Option | Description | Default |
Expand Down Expand Up @@ -244,6 +246,8 @@
| `--tenant-id <id>` | Tenant ID | From `uip login` session |
| `--folder-key <key>` | UiPath folder key | From `UIPATH_FOLDER_KEY` env var |
| `--access-token <token>` | Access token | From `uip login` session |
| `--env-vars-file <path>` | Publish the `UIPATH_APPS_*` variables in this `.env` file to the app; other names in it are skipped. Omit to keep the deployed values; an empty file clears them | Keep deployed values |
| `--env <NAME=value>` | One `UIPATH_APPS_<NAME>=<value>` to publish, applied over `--env-vars-file`. Repeatable | - |

**Examples:**

Expand All @@ -259,8 +263,13 @@

# Same deploy, key via env var — skips the --folder-key pre-check (incomplete folder lookup on accounts with very many folders)
UIPATH_FOLDER_KEY=my-folder-key uip codedapp deploy -n my-webapp

# Publish the app's UIPATH_APPS_* environment variables from a .env file, overriding one value
uip codedapp deploy -n my-webapp --folder-key my-folder-key --env-vars-file .env.production --env UIPATH_APPS_REGION=EU
```

The environment variables are public configuration the app reads with `env` from the SDK; see [environment-variables.md](environment-variables.md) for the rules and the in-solution path.

> `--folder-key` pre-checks the key against one unpaged copy of the account's folder list, which is incomplete on accounts with very many folders. If it reports an existing folder as `not found among folders accessible to your account`, use the env-var form — see [pack-publish-deploy.md](pack-publish-deploy.md#deploy-rejects-a-valid-folder-key-as-not-found-among-folders-accessible).

**Fresh deploy output:**
Expand Down
2 changes: 2 additions & 0 deletions skills/uipath-coded-apps/references/create-web-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ Open `http://localhost:5173`. The app redirects to UiPath login on first load. A

If login fails, see [debug.md](debug.md).

Per-deployment values the app reads with `env` (`env.UIPATH_APPS_REGION ?? 'EU'`) come from `.env.local` during local dev, injected by `@uipath/coded-apps-dev`; list the names the app uses in a committed `.env.example`. See [environment-variables.md](environment-variables.md).

---

## Deploy
Expand Down
115 changes: 115 additions & 0 deletions skills/uipath-coded-apps/references/environment-variables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Environment Variables for Coded Apps

Per-deployment configuration for a coded app: values such as a region, a brand colour, a support email or a feature toggle that differ between the deployments of one app, set by whoever deploys it, read by the app before sign-in. The platform writes them into a small `env.js` next to the app's `index.html`, so **anyone who can open the app URL can read them**. They are for public configuration only.

> **Availability.** Two gates, check both before relying on this:
> 1. **The CLI.** `uip codedapp deploy -h` must list `--env-vars-file`; `uip` 1.205.0 and earlier do not have it, nor the `.env.example` sync on push. If it is absent, run `uip update` (or `npm install -g @uipath/cli@latest`) and check again.
> 2. **The tenant.** The platform enables the feature per tenant. Where it is off, the Environment variables field is absent from the deploy forms and a deploy that carries variables is refused with `Environment variables are not enabled for this tenant`. Do not retry; tell the user the tenant does not have the feature yet and fall back to a build-time constant or an Orchestrator asset (see the table below).

## When to use which

| Need | Use | Why |
|------|-----|-----|
| A value that differs per deployment and is fine for anyone to see (region, brand colour, API base URL, a customer's feature toggle) | **Environment variable** (`UIPATH_APPS_*`) | Set at deploy, changed without a redeploy, readable before sign-in |
| A value that is the same everywhere | A constant in the code | No configuration needed |
| A value a signed-in user may see, but not the public | **Text asset** read with `Assets.getByName` | Needs an authenticated call, so it is not public |
| A value the browser must never hold (API key, password, token) | **Secret asset** read inside a coded function (`uip function`, `Functions.invoke()` from the app) | The function runs server-side and returns only the result |

Never put a secret in an environment variable. The value is served in a public file.

## Names and format

The text is dotenv syntax, one `NAME=value` per line, and the platform validates it on deploy, on edit and in the solution deploy wizard:

- Every name starts with `UIPATH_APPS_` and appears once. Other names are refused on deploy; the CLI and the dev plugin skip them silently when they read a `.env` file, so the developer's private names never reach the app.
- Blank lines and `#` comments are allowed. **A blank value (`UIPATH_APPS_REGION=`) leaves the variable unset**, so `env.UIPATH_APPS_REGION ?? 'EU'` falls back; it does not read as an empty string.
- A value fits on one line. Quote a value that contains `#` (`UIPATH_APPS_ACCENT='#0f2f27'`): unquoted, dotenv reads `#` as a comment and the value is refused rather than published cut.
- No `%ASSETS/...%` references: for an agent that syntax resolves a secret server-side; in a public file it would expose it, so it is refused.
- The whole text is at most 4000 characters.

## Reading them in the app

```typescript
import { env } from '@uipath/uipath-typescript';

const region = env.UIPATH_APPS_REGION ?? 'EU'; // property access
const accent = env.get('UIPATH_APPS_ACCENT') ?? '#0f2f27'; // same read as a method
```

`env` is synchronous and needs no `UiPath` instance, so it works before sign-in, in a router basename, in the first render. A name the deployment did not set reads as `undefined`; always give a fallback. To type the names the app uses, augment `UiPathEnvironment`:

```typescript
declare module '@uipath/uipath-typescript' {
interface UiPathEnvironment {
UIPATH_APPS_REGION?: string;
UIPATH_APPS_ACCENT?: string;
}
}
```

The `env` export exists from `@uipath/uipath-typescript` 1.8.2. Read `node_modules/@uipath/uipath-typescript/dist/index.d.ts` for the exact surface (Critical Rule 19).

## Local development

`@uipath/coded-apps-dev` injects the `UIPATH_APPS_*` values from `.env.local`, `.env.development` and `.env.development.local` (later files win, as in Vite) into the dev server's page, so `env` reads the same way locally and deployed. Plain `.env` is not read for app variables; it holds `UIPATH_PROJECT_ID` and other CLI settings. `create-vite`'s `.gitignore` already ignores `*.local`, so `.env.local` stays on the machine.

> The plugin reads these files from the release after `@uipath/coded-apps-dev` 1.0.0-beta.1. On an older plugin `env` is empty locally and every read falls back; check `grep -l UIPATH_APPS_ node_modules/@uipath/coded-apps-dev/dist/*.js` and update the plugin if it prints nothing.

## `.env.example`: list the names once

Commit a `.env.example` that lists every `UIPATH_APPS_*` variable the app reads, with a comment and the default a deployment should start from (or blank for "the deployer fills this in"):

```bash
# Region the app serves: EU or US
UIPATH_APPS_REGION=EU
# Shown in the footer; set per customer
UIPATH_APPS_SUPPORT_EMAIL=
```

`uip codedapp init` scaffolds a commented starter. Values in this file are the defaults every deployment starts from, so keep real defaults there, never placeholders or secrets. For an in-solution app, `uip codedapp push` reads the file (or `.env.template`) and adds its names and values to the app resource's environment variables in the solution, so the deploy wizard shows what can be configured instead of an empty field. Push only adds names the solution does not list yet: a value edited in Studio Web is never changed, and a name removed from the file stays until someone removes it there.

## Standalone app: set at deploy, change without a redeploy

The **Deploy app** form in Orchestrator has an Environment variables field; **Edit app details** shows the current text and saves changes to the running version. From the CLI:

```bash
# Publish the UIPATH_APPS_* variables in a .env file; other names in it are skipped
uip codedapp deploy -n <APP_NAME> --folder-key <FOLDER_KEY> --env-vars-file .env.production

# Add or override single values on top of the file; repeatable
uip codedapp deploy -n <APP_NAME> --folder-key <FOLDER_KEY> --env UIPATH_APPS_REGION=EU --env UIPATH_APPS_SUPPORT_EMAIL=<SUPPORT_EMAIL>
```

- Omit both flags to keep the deployed values. An empty file clears them on purpose; a file whose names are all private is refused, so a typo cannot wipe the values.
- A change to the values rewrites only `env.js`: no rebuild, no new version. The edge keeps `env.js` for about 60 seconds, so a reload inside that window can still show the old values.
- A version deployed before the app had any variables does not load `env.js`. Adding variables to it saves them with a warning (`This version was deployed without environment variables...`); deploy a new version to apply them.

## In-solution app: defaults in the package, values per deployment

The app resource carries the defaults (the Environment variables field on the app resource in Studio Web, or what `uip codedapp push` added from `.env.example`). Each customer's deployment overrides them in the Solutions deploy wizard, or from the CLI:

```bash
uip solution deploy config get "<PACKAGE_NAME>" -d config.json --output json
uip solution deploy config set config.json <APP_RESOURCE_NAME> environmentVariables "UIPATH_APPS_REGION=US"
uip solution deploy run -n "<DEPLOYMENT_NAME>" \
--package-name "<PACKAGE_NAME>" --package-version "<VERSION>" \
--folder-name "<FOLDER_NAME>" --config-file config.json --output json
```

Two rules the server applies:

- **A deployment's text replaces the package defaults as a whole.** A default the deployment's text leaves out is unset for that deployment, so write the full set, not just the changed line.
- **An upgrade keeps the deployment's existing text.** A name added in a later version does not appear for a deployment already on an earlier version; the app uses its code fallback there until someone adds the line to that deployment's configuration.

Do not set a solution-installed app's variables through the standalone **Edit app details** form; it refuses them, because the next configuration change from Solutions would overwrite them.

## Troubleshooting

| Symptom | Cause | Fix |
|---------|-------|-----|
| `env.UIPATH_APPS_X` is `undefined` after a deploy | Name lacks the prefix, is misspelled, or was left blank | Check the deployed text; a blank value is unset by design |
| Value is cut, or a colour is empty | Unquoted `#` in the value | Quote it: `UIPATH_APPS_ACCENT='#0f2f27'` |
| New values do not show after an edit | Edge cache, up to about 60 seconds | Reload after a minute; `env.js` is served with `no-cache`, so the browser itself does not keep it |
| Edit saved but the app never loads the values | Version deployed before it had variables, so `index.html` does not link `env.js` | Deploy a new version |
| Deploy refused: `not enabled for this tenant` | Feature is off for the tenant | Remove the variables; use a constant or an asset until the tenant has the feature |
| Deploy refused: `must start with UIPATH_APPS_` | A private name in `--env`, or in the solution's text | Rename it, or move it to `.env.local` if it is only for local dev |
4 changes: 4 additions & 0 deletions skills/uipath-coded-apps/references/file-sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ The command uploads the contents of the build directory (default: `dist/`) to St

Alongside the build output, `push` uploads the app's source files from the project root (dotfiles and the build directory itself excepted). Files matched by the app's `.gitignore` or by a `.uipignore` are skipped. `.uipignore` uses the same `.gitignore` syntax (for example `fixtures/` or `*.map`) and is the one ignore file shared with `uip solution upload`; the build directory is always uploaded whole. The older `.uipathignore` name is still read but deprecated — rename it to `.uipignore`.

`.env` files are never pushed. When the project has a `.env.example` (or `.env.template`), push reads it and adds its `UIPATH_APPS_*` names and values to the app resource's environment variables in the solution, so the deploy wizard lists what can be configured; it only adds names the solution does not have yet, and never changes a value set in Studio Web. See [environment-variables.md](environment-variables.md).

The `--ignore-resources` flag skips importing referenced resources (connections, assets) that may be declared in the app.

## Pull Workflow
Expand Down Expand Up @@ -159,6 +161,8 @@ uip codedapp pull --overwrite

Authentication is handled by `uip login` and the coded app CLI. **NEVER** read, print, source, or manually set cached access-token environment variables.

These are CLI settings. The app's own per-deployment values are the `UIPATH_APPS_*` environment variables in [environment-variables.md](environment-variables.md).

## Troubleshooting

| Problem | Solution |
Expand Down
4 changes: 4 additions & 0 deletions skills/uipath-coded-apps/references/pack-publish-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ Deploy picks fresh-vs-upgrade purely on whether the app is **already deployed**

> **On upgrade, omit `--path-name` unless you deliberately want to change the URL.** Re-passing a slug the app no longer owns fails with `routing name must be unique`.

### Environment Variables (`--env-vars-file`, `--env`)

A deploy can publish per-deployment configuration the app reads with `env` from `@uipath/uipath-typescript`: `--env-vars-file <path>` takes the `UIPATH_APPS_*` variables from a `.env` file (other names are skipped), and `--env UIPATH_APPS_<NAME>=<value>` adds or overrides one value on top, repeatable. Omit both to keep the deployed values. The values are public, so never pass a secret. Changing them later needs no redeploy: **Edit app details** in Orchestrator, or `deploy` again with the flags, rewrites only the app's `env.js`. Rules, local development and the in-solution path: [environment-variables.md](environment-variables.md).

### Folder Key

The `deploy` command requires a folder **key** (GUID), not a folder name. Users typically know the folder name only — resolve the key via `uip or folders list` before calling `deploy`.
Expand Down
1 change: 1 addition & 0 deletions skills/uipath-solution/references/pack-and-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ The deploy config is a plain JSON file that lists every resource the package exp

- **Per-resource properties** — queue retry count, retention periods, conflict-resolution behaviour, etc.
- **Link vs. install** — whether each resource is bound to an existing Orchestrator/Apps entity (`linkToResource` set) or provisioned fresh in the deployment folder (no `linkToResource`).
- **Coded app environment variables** — a coded app resource carries `environmentVariables`: dotenv text (`UIPATH_APPS_NAME=value`, one per line) the deployed app reads at runtime, seeded from the package's defaults. Set it with `deploy config set <file> <APP_RESOURCE> environmentVariables "<TEXT>"`. The deployment's text replaces the package defaults as a whole, so write the full set; an upgrade keeps the deployment's text, so a name a later version adds has to be added to the deployment by hand. Only `UIPATH_APPS_*` names are accepted, and the values are public to anyone who opens the app, so never put a secret there. Where the tenant does not have the feature, validation reports `Environment variables are not enabled for this tenant`; clear the field.

The CLI exposes `get` / `set` / `link` / `unlink` for the common edits, but the file is just JSON — you can also open it in an editor and modify any field directly. Pass the file to `deploy run --config-file <path>` to apply.

Expand Down
Loading
Loading