- Información general
- Comience ya
- Conceptos
- Uso de UiPath CLI
- Guías prácticas
- Recetas de CI/CD
- Referencia de los comandos
- Información general
- Códigos de salida
- Opciones globales
- agente de código UIP
- uip coder
- uip context-grounding
- UIP Docsai
- uip function
- uip guardrails
- uip llm-configuration
- uip llm-gateway
- uip model-hub
- añadir-entidad-de-datos-de-prueba
- añadir-cola-de-datos-de-prueba
- añadir-variación-de-datos-de-prueba
- Analizar
- Crear
- Crear proyecto
- Diferencia
- Buscar actividades
- obtener-reglas-del-analizador
- obtener-predeterminado-actividad-xaml
- obtener-errores
- obtener-casos-de-prueba-manual
- obtener-pasos-de-prueba-manual
- get-library-object-repository
- get-object-repository
- obtener versiones
- get-workflow-example
- indicar-aplicación
- indicar-elemento
- inspeccionar-paquete
- install-data-fabric-entities
- instalar-o-actualizar-paquetes
- enumerar-data-fabric-entities
- list-instances
- ejemplos-de-flujo-de-trabajo-de-lista
- Paquete
- Publicar
- remote
- restore
- run, debug & execution
- archivo de ejecución
- plantillas-de-búsqueda
- iniciar-studio
- detener la ejecución
- tm
- UIA
- uip tasks
- Seguimientos de UIP
- uip traces feedback
- Migración
- Referencia y soporte
Syntax and options for `uip function`, which builds, serves, and publishes UiPath JS/TS and Python Functions — setup, new, init, serve, run, pack, push, publish, runtime-install.
uip function builds, serves, and publishes UiPath Functions — small JS/TS or Python handlers packaged and run on the UiPath platform. uip function is the canonical group name; uip functions (plural) still works as a back-compat alias.
Conceptos
- This is a language dispatcher, not a native tool. Every verb except
setupis a thin forwarder: the CLI detects your project's language (fromuipath.json,package.json, orpyproject.tomlin the current directory, or--language/-lonnew) and routes the raw arguments to either an in-process JS/TS CLI (@uipath/coded-functions-js-cli) or a spawned Python CLI.uip function <verb> --helpfor any forwarded verb therefore shows the underlying CLI's own help, not auip-authored one — the options tables below are extracted from the forwarding wrapper's own flag hints and examples, which is the most this repo's tooling exposes before the downstream CLI takes over. - Language resolution matters for
initandnew.initis Python-only — for JS/TS, scaffold instead withnew --empty.newauto-detects; when detection is inconclusive, it defaults to TypeScript with a logged warning, unless you pass--language js|ts|py/python. setupruns automatically. It's a hidden command (not in--help) that verifies Node.js ≥20 beforenewforwards to the JS/TS CLI — you don't normally call it yourself, butuip function setup --forcere-runs the check if the cached verification goes stale (e.g. after a Node reinstall).publishvs.pushtarget different destinations:publishuploads the packed.nupkgto an Orchestrator feed;pushsyncs the project directly into a Studio Web project. Both accept--url/--org/--token(or the matchingUIPATH_URL/UIPATH_ORGANIZATION_NAME/UIPATH_ACCESS_TOKENenv vars).- Solution auto-registration. A successful Python
initauto-registers the project into a parent.uipxsolution when one exists (same pattern asagent/case/flowinit) — pass--skip-solution-registrationto opt out. This reports via a separateFunctionsInitSolutionRegistrationsuccess envelope after the underlying Python CLI's own init output.
Sinopsis
uip function new [name] [--name <name>] [-l, --language ts|js|py] [--empty]
uip function init [--language py] [--skip-solution-registration]
uip function serve [--port <port>] [--runtime node|deno]
uip function run <name> [--port <port>] [--input <json>]
uip function pack [--nolock]
uip function push [--url <url>] [--project-id <id>] [--org <org>] [--token <token>]
uip function publish [--url <url>] [--org <org>] [--token <token>] [--feed-id <id>]
uip function runtime-install [--path <folder>]
uip function new [name] [--name <name>] [-l, --language ts|js|py] [--empty]
uip function init [--language py] [--skip-solution-registration]
uip function serve [--port <port>] [--runtime node|deno]
uip function run <name> [--port <port>] [--input <json>]
uip function pack [--nolock]
uip function push [--url <url>] [--project-id <id>] [--org <org>] [--token <token>]
uip function publish [--url <url>] [--org <org>] [--token <token>] [--feed-id <id>]
uip function runtime-install [--path <folder>]
uip function new
Scaffold a new Functions project, including a hello-world function by default.
Argumentos
| Nombre | Obligatorio | Propósito |
|---|---|---|
[name] | No | Project name / directory. Default my-functions. May also be passed as --name. |
Opciones
| Largo | Valor | Descripción |
|---|---|---|
--name <name> | String | Alternative to the positional argument. |
-l, --language <lang> | ts (default) | js | py/python | Project language. |
--empty | Marca | Skip the hello-world function — empty project. JS/TS only. |
Ejemplos
uip function new my-fn --language ts
uip function new my-fn --language py
uip function new my-fn --language ts
uip function new my-fn --language py
Forma de datos (--json de salida)
{ "Code": "NewComplete", "Data": { "Message": "Project created at ./my-fn" } }
{ "Code": "NewComplete", "Data": { "Message": "Project created at ./my-fn" } }
uip function init
Python-only: discover entrypoints and (re)generate entry-points.json/bindings.json/project.uiproj. Must run before pack/push for a Python project. For JS/TS, use new --empty instead — init fails with an explicit "Python-only" error against a JS/TS project or an undetected language.
Opciones
| Largo | Valor | Descripción |
|---|---|---|
--language py | flag/value | Force Python language resolution when detection would otherwise be ambiguous. |
--skip-solution-registration | Marca | Do not auto-register the project in a parent .uipx solution. |
Ejemplo
uip function init
uip function init
Forma de datos (--json de salida)
{ "Code": "InitComplete", "Data": { "Message": "Project initialized." } }
{ "Code": "InitComplete", "Data": { "Message": "Project initialized." } }
Followed by a second success envelope reporting solution registration:
{
"Code": "FunctionsInitSolutionRegistration",
"Data": { "SolutionRegistration": { "Status": "Registered", "...": "..." } }
}
{
"Code": "FunctionsInitSolutionRegistration",
"Data": { "SolutionRegistration": { "Status": "Registered", "...": "..." } }
}
SolutionRegistration.Status is "NotInSolution" when no parent solution exists, or "OptedOut" when --skip-solution-registration was passed — always present, never omitted.
uip function serve
Start the local function server with hot reload. JS/TS only.
Opciones
| Largo | Valor | Descripción |
|---|---|---|
--port <port> | Entero | Port to listen on. Default 7070. |
--runtime <runtime> | node (Predeterminada) | deno | Runtime to serve under. |
Ejemplo
uip function serve
uip function serve
Forma de datos (--json de salida)
{ "Code": "ServeStarted", "Data": { "Message": "Listening on http://localhost:7070" } }
{ "Code": "ServeStarted", "Data": { "Message": "Listening on http://localhost:7070" } }
uip function run
Invoke a function against the local serve endpoint. JS/TS only.
Argumentos
| Nombre | Obligatorio | Propósito |
|---|---|---|
<name> | Sí | Function name to invoke. |
Opciones
| Largo | Valor | Descripción |
|---|---|---|
--port <port> | Entero | Port the local server is on. Default 7070. |
--input <json> | JSON | Input payload. Default {}. |
Ejemplo
uip function run hello --input '{"x":1}'
uip function run hello --input '{"x":1}'
Forma de datos (--json de salida)
{ "Code": "RunComplete", "Data": { "result": 2 } }
{ "Code": "RunComplete", "Data": { "result": 2 } }
Data is the function's own return value, shape determined entirely by the function you wrote — not normalized by the CLI.
uip function pack
Pack the project into a .nupkg for deployment.
Opciones
| Largo | Valor | Descripción |
|---|---|---|
--nolock | Marca | Exclude the lock file from the package. JS/TS only. |
Ejemplo
uip function pack
uip function pack
Forma de datos (--json de salida)
{ "Code": "PackComplete", "Data": { "Message": "Package created: my-fn.0.0.1.nupkg" } }
{ "Code": "PackComplete", "Data": { "Message": "Package created: my-fn.0.0.1.nupkg" } }
uip function push
Sync the project to Studio Web — generates entry points and uploads changed files.
Opciones
| Largo | Valor | Obligatorio | Descripción |
|---|---|---|---|
--url <url> | url | No | UiPath platform URL. Falls back to UIPATH_URL. |
--project-id <id> | GUID | conditionally | Studio Web project ID. Mandatory, but may come from UIPATH_PROJECT_ID instead of the flag. |
--org <org> | String | No | Organization name. Falls back to UIPATH_ORGANIZATION_NAME. |
--token <token> | String | No | Access token. Falls back to UIPATH_ACCESS_TOKEN. |
Ejemplo
uip function push --project-id 1f2a3b4c-0000-0000-0000-000000000001
uip function push --project-id 1f2a3b4c-0000-0000-0000-000000000001
Forma de datos (--json de salida)
{ "Code": "PushComplete", "Data": { "Message": "Push complete." } }
{ "Code": "PushComplete", "Data": { "Message": "Push complete." } }
uip function publish
Upload the latest .nupkg to an Orchestrator folder. Without --feed-id, prompts interactively for a feed (ESC to cancel) — pass --feed-id for CI use to skip the picker.
Opciones
| Largo | Valor | Descripción |
|---|---|---|
--url <url> | url | UiPath platform URL. Falls back to UIPATH_URL. |
--org <org> | String | Organization name. Falls back to UIPATH_ORGANIZATION_NAME. |
--token <token> | String | Access token. Falls back to UIPATH_ACCESS_TOKEN. |
--feed-id <id> | GUID | Feed to publish to — skips the interactive picker. |
Ejemplos
# Interactive feed picker
uip function publish
# CI use — skip the picker
uip function publish --feed-id 9b2c1d4e-0000-0000-0000-000000000001
# Interactive feed picker
uip function publish
# CI use — skip the picker
uip function publish --feed-id 9b2c1d4e-0000-0000-0000-000000000001
Forma de datos (--json de salida)
{ "Code": "PublishComplete", "Data": { "Message": "Package published." } }
{ "Code": "PublishComplete", "Data": { "Message": "Package published." } }
uip function runtime-install
Create a runner folder with its own package.json and install runtime dependencies into it. JS/TS only.
Opciones
| Largo | Valor | Descripción |
|---|---|---|
--path <folder> | Ruta | Target folder to create and install runtime dependencies into. |
Ejemplo
uip function runtime-install --path .uipath/runner
uip function runtime-install --path .uipath/runner
Forma de datos (--json de salida)
{ "Code": "RuntimeInstallComplete", "Data": { "Message": "Runtime installed at .uipath/runner" } }
{ "Code": "RuntimeInstallComplete", "Data": { "Message": "Runtime installed at .uipath/runner" } }
Comportamiento de error
initagainst a JS/TS project or an undetected language:Failure,Message: "'init' is not applicable to JS/TS projects."(or"'init' is Python-only."), withInstructionsnamingnew --empty/--language.newwith no detectable language and no--language: defaults to TypeScript with a logged warning rather than failing.- No Functions project detected for any other verb:
Failure,Message: "No Functions project detected in this directory.", withInstructionsto run from a directory containinguipath.json/package.json/pyproject.toml, or pass--languageexplicitly. - Node.js missing or below v20 (JS/TS path):
ConfigErrornaming the required version and a link to install it — this check runs automatically beforenewforwards to the JS/TS CLI.
Ver también
- Herramientas (complementos)
uip codedapp— a similarly-shaped build/pack/publish/push/pull lifecycle for coded apps.- Opciones globales
- Códigos de salida
- Conceptos
- Sinopsis
- uip function new
- Argumentos
- Opciones
- Ejemplos
- Forma de datos (--json de salida)
- uip function init
- Opciones
- Ejemplo
- Forma de datos (--json de salida)
- uip function serve
- Opciones
- Ejemplo
- Forma de datos (--json de salida)
- uip function run
- Argumentos
- Opciones
- Ejemplo
- Forma de datos (--json de salida)
- uip function pack
- Opciones
- Ejemplo
- Forma de datos (--json de salida)
- uip function push
- Opciones
- Ejemplo
- Forma de datos (--json de salida)
- uip function publish
- Opciones
- Ejemplos
- Forma de datos (--json de salida)
- uip function runtime-install
- Opciones
- Ejemplo
- Forma de datos (--json de salida)
- Comportamiento de error
- Ver también