- Visão geral
- Introdução
- Conceitos
- Usando o UiPath CLI
- Guias de instruções
- Receitas de CI/CD
- Referência de comando
- Visão geral
- Códigos de saída
- Opções globais
- Agente de código uip
- codificador UIP
- Contextualização da uip
- Documento da UIP
- Função UIP
- Proteções da UIP
- configuração-llm-uip
- gateway-llm-uip
- criação do uip Maestro
- Registro do uip Maestro
- hub de modelo da uip
- Atividades Localizar
- atividades get-padrão-xaml
- Analisar
- lista de regras do analisador
- Criar
- Limpeza
- instalação de entidades-de-dados
- lista de entidades de data-fabric
- comparação dos arquivos
- obter-repositório-objeto-da-Biblioteca
- obter-objeto-repositório
- Init
- lista de instâncias
- Empacotar
- inspeção de pacotes
- Instalação dos pacotes
- versões dos pacotes
- Publicar
- Remoto
- restore
- executar, depurar e adicionar; Execução
- Configurações
- Início do Studio
- pesquisa de modelos
- adição de dados de teste
- adicionar-fila-de-dados-de-teste
- adição-variação dos dados de teste
- TM
- UIA
- Validar
- fluxo de trabalho-exemplos obter
- lista de exemplos de fluxo de trabalho
- tarefas do UIP
- anexo
- Campo personalizado
- Defects
- Execuções
- exportar trabalhos
- Migração
- Rótulo do objeto
- Empacotar
- cenário-perf
- grupos de carga do cenário-perf
- dados de execução do cenário-perf
- relatório do cenário-perf
- Projeto
- permissões do projeto
- Prompts
- Relatar
- Requisitos
- Resultado
- Executar
- Agendamentos
- Log de caso de teste
- Casos de teste
- Conjuntos de Testes
- Log de etapa de teste
- Usuário
- Aguardar
- Traces da UIP
- Feedback de traces da uip
- Migração
- Referência e suporte
Função UIP
Syntax and options for `uip function`, which builds, serves, runs, and publishes UiPath JS/TS and Python Functions.
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) is accepted as an alias.
Conceitos
- 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. Flags the wrapper does not declare are forwarded unchanged to the underlying CLI. - A resolução do idioma é importante para
initenew.inité somente Python — para JS/TS, use framework ao invés denew --empty.newdetecta automaticamente; quando a detecção é inconclusiva, o padrão é o TypeScript com um aviso registrado, a menos que você passe--language js|ts|py/python. setupverifica as cadeias de ferramentas. Ele verifica o Node.js ≥ 20 para projetos JS/TS e o Python com o pacoteuipathpara projetos do Python. A verificação do Node.js também é executada automaticamente antes donewencaminhar para a CLI do JS/TS. Os comandos de funções do Python falham com umConfigErrorque aponta parauip function setupaté que o Python seja configurado.publishvs.pushsegmentar diferentes destinos:publishcarrega o.nupkgempacotado para um feed do Orchestrator;pushsincroniza o projeto diretamente em um projeto do Studio Web. Ambos aceitam--url/--org/--token(ou as variáveis de ambienteUIPATH_URL/UIPATH_ORGANIZATION_NAME/UIPATH_ACCESS_TOKENcorrespondentes).- Registro automático da solução. Um Python
initbem-sucedido registra automaticamente o projeto em uma solução pai.uipxquando uma existir (mesmo padrão que a initagent/case/flow) — passe--skip-solution-registrationpara cancelar. Isso relata por meio de um envelope de sucessoFunctionsInitSolutionRegistrationseparado após a saída init da própria CLI do Python subjacente.
Resumo
uip function setup [--force]
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] [--input <json>] [--input-file <path>]
uip function pack
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 setup [--force]
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] [--input <json>] [--input-file <path>]
uip function pack
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 setup
Verify the toolchains a Functions project needs: Node.js v20 or later for JS/TS, and Python with the uipath package for Python. A missing or outdated Node.js fails the command with a ConfigError. A missing Python configuration is reported but does not fail the command, so JS/TS-only machines are not blocked. The result is cached and shared with uip codedagent setup, so running either command configures Python for both.
Opções
| Long | Valor | Description |
|---|---|---|
--force | Bandeira | Re-run the verification even when a cached result exists. Default: false. |
Exemplo
uip function setup --force
uip function setup --force
nova função uipath
Estruture um novo projeto de Funções, incluindo uma função Olá, mundo por padrão.
Argumentos
| Name | Required | Finalidade |
|---|---|---|
[name] | não | Nome/diretório do projeto. my-functionsPadrão. Também pode ser passado como --name. |
Opções
| Long | Valor | Description |
|---|---|---|
--name <name> | String | Alternativa ao argumento posicional. |
-l, --language <lang> | ts (padrão) | js | py/python | Idioma do projeto. |
--empty | Bandeira | Ignore a função Olá — projeto vazio. Apenas JS/TS. |
Exemplos
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
Formato dos dados (--output json)
{ "Code": "NewComplete", "Data": { "Message": "Project created at ./my-fn" } }
{ "Code": "NewComplete", "Data": { "Message": "Project created at ./my-fn" } }
Inicialização da função uiip
Somente Python: descubra pontos de entrada e (re)gere entry-points.json/bindings.json/project.uiproj. Deve ser executado antes de pack/push para um projeto do Python. Para JS/TS, use new --empty em vez disso — init falha com um aviso explícito "somente Python" erro em um projeto JS/TS ou um idioma não detectado.
Opções
| Long | Valor | Description |
|---|---|---|
--language py | Sinalizador/valor | Forçar a resolução da linguagem Python quando a detecção seria ambígua. |
--skip-solution-registration | Bandeira | Não registre automaticamente o projeto em uma .uipx solução pai. |
Exemplo
uip function init
uip function init
Formato dos dados (--output json)
{ "Code": "InitComplete", "Data": { "Message": "Project initialized." } }
{ "Code": "InitComplete", "Data": { "Message": "Project initialized." } }
Seguido de um segundo registro de solução de relatórios de envelope bem-sucedido:
{
"Code": "FunctionsInitSolutionRegistration",
"Data": { "SolutionRegistration": { "Status": "Registered", "...": "..." } }
}
{
"Code": "FunctionsInitSolutionRegistration",
"Data": { "SolutionRegistration": { "Status": "Registered", "...": "..." } }
}
SolutionRegistration.Status é "NotInSolution" quando não existe nenhuma solução pai ou "OptedOut" quando --skip-solution-registration foi passado — sempre presente, nunca omitido.
serviço da função uiip
Inicie o servidor de função local com recarregamento dinâmico. Apenas JS/TS.
Opções
| Long | Valor | Description |
|---|---|---|
--port <port> | Número inteiro | Porta para ouvir. 7070Padrão. |
--runtime <runtime> | node (Padrão) | deno | Runtime para servir em. |
Exemplo
uip function serve
uip function serve
Formato dos dados (--output json)
{ "Code": "ServeStarted", "Data": { "Message": "Listening on http://localhost:7070" } }
{ "Code": "ServeStarted", "Data": { "Message": "Listening on http://localhost:7070" } }
Execução da função UIP
Run one function once and print its result. The function name comes from your project's function list.
Argumentos
| Name | Required | Finalidade |
|---|---|---|
[name] | não | Name of the function to run. |
Opções
| Long | Valor | Description |
|---|---|---|
--input <json> | JSON | Carga de entrada. {}Padrão. |
--input-file <path> | Path | Path to a JSON input file. On JS/TS projects, takes precedence over --input. |
Exemplos
# Python project: run the 'hello' function once with a JSON payload and read the result as JSON
uip function run hello --input '{"name":"Ada"}' --output json
# Python project: run a function with a payload kept in a file
uip function run hello --input-file ./payload.json --output json
# Python project: run the 'hello' function once with a JSON payload and read the result as JSON
uip function run hello --input '{"name":"Ada"}' --output json
# Python project: run a function with a payload kept in a file
uip function run hello --input-file ./payload.json --output json
Formato dos dados (--output json)
{ "Code": "RunComplete", "Data": { "message": "Hello, Ada!" } }
{ "Code": "RunComplete", "Data": { "message": "Hello, Ada!" } }
The structured result applies to Python projects when you pass --output json or --output yaml explicitly:
Datais the function's own output, with its field names kept exactly as the function declares them.- When the function returns a scalar, an array, or nothing, the value is placed under a single
Outputkey. - Progress and the run's own logs go to stderr, so stdout carries only the envelope.
- A failed run returns
Result: "Failure"withErrorCode: "unknown_error"and the run's exit code inMessage; the run's own error is on stderr.
Sem um --output json/yaml explícito, ou com table ou plain, run imprime a própria saída da CLI subjacente. Em projetos JS/TS, --output não é compatível com run: a CLI imprime um aviso e a própria saída da função segue inalterada.
pacote de funções uiip
Pack the project into a .nupkg for deployment. The project's lock file is always included in the package.
Exemplo
uip function pack
uip function pack
Formato dos dados (--output json)
{ "Code": "PackComplete", "Data": { "Message": "Package created: my-fn.0.0.1.nupkg" } }
{ "Code": "PackComplete", "Data": { "Message": "Package created: my-fn.0.0.1.nupkg" } }
Push da função uiip
Sincronizar o projeto com o Studio Web — gera pontos de entrada e carrega arquivos alterados.
Opções
| Long | Valor | Required | Description |
|---|---|---|---|
--url <url> | url | não | URL da UiPath Platform. Realiza o fallback para UIPATH_URL. |
--project-id <id> | GUID | condicionalmente | ID do projeto do Studio Web. Obrigatório, mas pode vir de UIPATH_PROJECT_ID em vez do sinalizador. |
--org <org> | String | não | Nome da organização. Realiza o fallback para UIPATH_ORGANIZATION_NAME. |
--token <token> | String | não | Token de acesso. Realiza o fallback para UIPATH_ACCESS_TOKEN. |
Exemplo
uip function push --project-id 1f2a3b4c-0000-0000-0000-000000000001
uip function push --project-id 1f2a3b4c-0000-0000-0000-000000000001
Formato dos dados (--output json)
{ "Code": "PushComplete", "Data": { "Message": "Push complete." } }
{ "Code": "PushComplete", "Data": { "Message": "Push complete." } }
função uip publicar
Carregue o .nupkg mais recente para uma pasta do Orchestrator. Sem --feed-id, solicita interativamente um feed ( ESC para cancelar) — passe --feed-id para uso de CI para ignorar o seletor.
Opções
| Long | Valor | Description |
|---|---|---|
--url <url> | url | URL da UiPath Platform. Realiza o fallback para UIPATH_URL. |
--org <org> | String | Nome da organização. Realiza o fallback para UIPATH_ORGANIZATION_NAME. |
--token <token> | String | Token de acesso. Realiza o fallback para UIPATH_ACCESS_TOKEN. |
--feed-id <id> | GUID | Feed para publicar — ignora o seletor interativo. |
Exemplos
# 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
Formato dos dados (--output json)
{ "Code": "PublishComplete", "Data": { "Message": "Package published." } }
{ "Code": "PublishComplete", "Data": { "Message": "Package published." } }
runtime-instalação da função uip
Crie uma pasta executora com seu próprio package.json e instale dependências de runtime nela. Apenas JS/TS.
Opções
| Long | Valor | Description |
|---|---|---|
--path <folder> | Path | Pasta de destino na qual criar e instalar dependências de runtime. |
Exemplo
uip function runtime-install --path .uipath/runner
uip function runtime-install --path .uipath/runner
Formato dos dados (--output json)
{ "Code": "RuntimeInstallComplete", "Data": { "Message": "Runtime installed at .uipath/runner" } }
{ "Code": "RuntimeInstallComplete", "Data": { "Message": "Runtime installed at .uipath/runner" } }
Comportamento de erro
initem relação a um projeto JS/TS ou uma linguagem não detectada:,Failure(ou),Message: "'init' is not applicable to JS/TS projects.""'init' is Python-only."comInstructionsnomenclaturanew --empty--language/.newsem idioma detectável e--languagesem: padrão para o TypeScript com um warning registrado em vez de falhar.- Nenhum projeto de funções detectado para qualquer outro verbo:
Failure,Message: "No Functions project detected in this directory.", comInstructionspara ser executado a partir de um diretório contendouipath.json/package.json/pyproject.toml, ou passar--languageexplicitamente. - Node.js ausente ou abaixo da v20 (caminho JS/TS):
ConfigErrornomear a versão necessária e um link para instalá-la. Essa verificação é executada emsetupe automaticamente antes denewencaminhar para a CLI do JS/TS. - Python or the
uipathpackage not configured (Python path):ConfigErrorwithInstructionsto runuip function setup.
Veja também
- Ferramentas ( plugins )
uip codedapp— um ciclo de vida de compilação/empacotar/publicar/empurrar/puxar de formato semelhante para aplicativos codificados.- Opções globais
- Códigos de saída
- Conceitos
- Resumo
- uip function setup
- Opções
- Exemplo
- nova função uipath
- Argumentos
- Opções
- Exemplos
- Formato dos dados (--output json)
- Inicialização da função uiip
- Opções
- Exemplo
- Formato dos dados (--output json)
- serviço da função uiip
- Opções
- Exemplo
- Formato dos dados (--output json)
- Execução da função UIP
- Argumentos
- Opções
- Exemplos
- Formato dos dados (--output json)
- pacote de funções uiip
- Exemplo
- Formato dos dados (--output json)
- Push da função uiip
- Opções
- Exemplo
- Formato dos dados (--output json)
- função uip publicar
- Opções
- Exemplos
- Formato dos dados (--output json)
- runtime-instalação da função uip
- Opções
- Exemplo
- Formato dos dados (--output json)
- Comportamento de erro
- Veja também