Cross-platform CLI for Microsoft Team Foundation Server and Visual Studio Team Services
Перейти к файлу
Engin Polat 9f0c37e159
fixing markdown linter issues (#469)
* fixing markdown linter issues
2024-09-27 14:15:06 -07:00
.azure-pipelines Migration to CFS (#461) 2024-09-10 12:08:21 +02:00
.devcontainer creating initial devcontainer configuration (#468) 2024-09-24 15:11:12 -07:00
.github Update github workflows to avoid issues with GITHUB_TOKEN (#448) 2024-01-29 10:04:27 +01:00
.vscode Upgrade task.json to the new version (#412) 2022-07-07 17:14:32 +04:00
app Migration to CFS (#461) 2024-09-10 12:08:21 +02:00
docs Enable use of --override and --overrides-file when --manifest-js is specified (#375) 2021-10-05 14:23:49 +03:00
tests Merge master. 2015-09-10 18:32:47 -04:00
typings Delete Q, update TypeScript to 2.6, update a couple libraries. 2017-12-20 10:28:04 -05:00
.editorconfig creating initial devcontainer configuration (#468) 2024-09-24 15:11:12 -07:00
.gitattributes Add .gitattributes to avoid CRLF issue in the future. 2016-12-07 09:28:19 -05:00
.gitignore Finish up localization support. 2016-09-23 17:04:16 -04:00
.npmignore Fix azure-pipeline.yml (#437) 2023-06-01 13:45:27 +03:00
.npmrc Migration to CFS (#461) 2024-09-10 12:08:21 +02:00
LICENSE Initial commit 2015-07-22 05:23:42 -04:00
README.md fixing markdown linter issues (#469) 2024-09-27 14:15:06 -07:00
SECURITY.md Microsoft mandatory file (#438) 2023-06-05 12:44:51 +04:00
gulp.cmd Finish up localization support. 2016-09-23 17:04:16 -04:00
package-lock.json Migration to CFS (#461) 2024-09-10 12:08:21 +02:00
package.json Migration to CFS (#461) 2024-09-10 12:08:21 +02:00
tsconfig.json Add a setting to redirect debug logs to stderr instead of stdout. 2018-03-20 15:14:00 -04:00
tsd.json Major refactor & adding VSO extension support. 2015-11-15 16:22:51 -05:00

README.md

Node CLI for Azure DevOps

NOTE: If you are looking for the new Azure DevOps CLI, see vsts-cli

NPM version

This is a command-line utility for interacting with Microsoft Team Foundation Server and Azure DevOps Services (formerly VSTS). It is cross platform and supported on Windows, MacOS, and Linux.

Setup

First, download and install Node.js 4.0.x or later and npm (included with the installer)

Linux/OSX

sudo npm install -g tfx-cli

Windows

npm install -g tfx-cli

Commands

To see the list of commands:

tfx

For help with an individual command:

tfx <command> --help

Help info is dynamically generated, so it should always be the most up-to-date authority.

Command sets

  • tfx build (builds): Queue, view, and get details for builds.
  • tfx build tasks (build tasks): Create, list, upload and delete build tasks.
  • tfx extension (extensions): Package, manage, publish Team Foundation Server / Azure DevOps extensions.
  • tfx workitem (work items): Create, query and view work items.

Login

To avoid providing credentials with every command, you can login once. Currently supported credential types: Personal Access Tokens and basic authentication credentials.

NTLM support is under consideration

Warning! Using this feature will store your login credentials on disk in plain text.

To skip certificate validation connecting to on-prem Azure DevOps Server use the --skip-cert-validation parameter.

Personal access token

Start by creating a Personal Access Token and paste it into the login command.

~$ tfx login
Copyright Microsoft Corporation

> Service URL: {url}
> Personal access token: xxxxxxxxxxxx
Logged in successfully

Examples of valid URLs are:

  • https://marketplace.visualstudio.com
  • https://youraccount.visualstudio.com/DefaultCollection

Basic auth

You can also use basic authentication by passing the --auth-type basic parameter (see Configuring Basic Auth for details).

Settings cache

To avoid providing options with every command, you can save them to a settings file by adding the --save flag.

~$ tfx build list --project MyProject --definition-name println --top 5 --save

...

id              : 1
definition name : TestDefinition
requested by    : Teddy Ward
status          : NotStarted
queue time      : Fri Aug 21 2015 15:07:49 GMT-0400 (Eastern Daylight Time)

~$ tfx build list
Copyright Microsoft Corporation

...

id              : 1
definition name : TestDefinition
requested by    : Teddy Ward
status          : NotStarted
queue time      : Fri Aug 21 2015 15:07:49 GMT-0400 (Eastern Daylight Time)

If you used --save to set a default value for an option, you may need to override it by explicitly providing a different value. You can clear any saved settings by running tfx reset.

Troubleshooting

To see detailed tracing output, set a value for the TFX_TRACE environment variable and then run commands. This may provide clues to the issue and can be helpful when logging an issue.

Troubleshooting on Linux/OSX

export TFX_TRACE=1

Troubleshooting on Windows

set TFX_TRACE=1

PowerShell

$env:TFX_TRACE=1

Contributing

We accept contributions and fixes via Pull Requests. Please read the Contributions guide for more details.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.