choco README

The project's README from github.com/chocolatey/choco. As one markdown file: README.md.

Chocolatey - like yum or apt-get, but for Windows

You can just call me choco.

Chocolatey Logo

Docker Image Version (latest semver) Project Stats Coverage Status

Build Status

GitHub Action
GitHub Workflow Status (branch)

Chat Room

Come join in the conversation about Chocolatey in our Community Chat Room.

Discord

Please make sure you've read over and agree with the etiquette regarding communication.

Support Chocolatey!

See Chocolatey In Action

Chocolatey FOSS install showing tab completion and refreshenv (a way to update environment variables without restarting your shell):

install

Chocolatey Pro showing private CDN download cache and virus scan protection:

install w/pro

Etiquette Regarding Communication

If you are an open source user requesting support, please remember that most folks in the Chocolatey community are volunteers that have lives outside of open source and are not paid to ensure things work for you, so please be considerate of others' time when you are asking for things. Many of us have families that also need time as well and only have so much time to give on a daily basis. A little consideration and patience can go a long way. After all, you are using a pretty good tool without cost. It may not be perfect (yet), and we know that.

If you are using a commercial edition of Chocolatey, you have different terms! Please see support.

Information

Documentation

Please see the docs

Give choco.exe --help a shot (or choco.exe -h). For specific commands, add the command and then the help switch e.g. choco.exe install --help.

Requirements

License / Credits

Apache 2.0 - see LICENSE and NOTICE files.

Submitting Issues

submitting issues

  1. Start with Troubleshooting and the FAQ to see if your question or issue already has an answer.
  2. If not found or resolved, please follow one of the following avenues:
    • If you are a licensed customer, please see support. You can also log an issue to Licensed Issues and we will submit issues to all other places on your behalf. Another avenue is to use email support to have us submit tickets and other avenues on your behalf (allowing you to maintain privacy).
    • If it is an enhancement request or issue with the website (the community package repository aka https://community.chocolatey.org), please submit the issue to the Chocolatey.org repo.
    • If you have found an issue with the GUI (Chocolatey GUI) or you want to submit an enhancement, please see the ChocolateyGUI repository.
    • If you have found an issue with the client (choco.exe), you are in the right place. Keep reading below.

Observe the following help for submitting an issue:

Prerequisites:

Submitting a ticket:

Contributing

If you would like to contribute code or help squash a bug or two, that's awesome. Please familiarize yourself with CONTRIBUTING.

This project uses an .editorconfig file in order to help maintain consistency of code. Errors and warnings produced by not following these defined conventions will in future be enforced at build time, so ensure your contributions adhere to the rules defined in it and produce no warnings or errors in Visual Studio.

Committers

Committers, you should be very familiar with COMMITTERS.

Compiling / Building Source

There is a build.bat/build.sh file that creates a necessary generated file named SolutionVersion.cs. It must be run at least once before Visual Studio will build.

Windows

Prerequisites:

The following are a minimum set of requirements to successfully complete the build process:

There is a setup.ps1 file at the root of this repository, which can be used to install all of the above.

Build Process:

[!IMPORTANT] It is assumed that Chocolatey CLI is installed on the machine where you are running the build, as this is required to generate the final Chocolatey package. If required, you can skip the creation of the Chocolatey packages using the --shouldRunChocolatey option, i.e. .\build.bat --shouldRunChocolatey=false

Running the build on Windows should produce an artifact that is tested and ready to be used.

Other Platforms

Prerequisites:
Before building:
# Mono
# http://www.michaelruck.de/2010/03/solving-pkg-config-and-mono-35-profile.html
# https://cloudgen.wordpress.com/2013/03/06/configure-nant-to-run-under-mono-3-06-beta-for-mac-osx/
export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig:/Library/Frameworks/Mono.framework/Versions/Current/lib/pkgconfig:$PKG_CONFIG_PATH
chmod +x *.sh
Build Process:

Running the build on Mono produces an artifact similar to Windows but may have more rough edges. You may get a failure or two in the build script that can be safely ignored.

Testing

The Chocolatey CLI codebase contains a number of different tests, including unit, integration, and end-to-end tests. These are all documented in the TESTING.md file.

The unit and integration tests are NUnit tests, which can be executed directly within Visual Studio, or as part of the build process.

The end-to-end tests use Pester as the test framework. Since these tests have the potential to actually make changes to your system, we recommend using the provided Vagrant file to run these tests in a dedicated virtual machine.

Installing on Other Platforms:

  1. Get a copy of the source code and build.
  2. Copy (or link) the contents of ./code_drop/temp/_PublishedApps/choco to your preferred install directory. On Linux, the preferred directory is /opt/chocolatey
  3. Export the ChocolateyInstall environment variable, pointing to the install directory the build output was copied too.
  4. Copy ./docker/choco_wrapper to a directory on the $PATH, rename to choco, and if the install directory is something else than /opt/chocolatey, then edit it to point to the correct path.

Credits

Chocolatey is brought to you by quite a few people and frameworks. See CREDITS (just LEGAL/Credits.md in the zip folder).

choco (chocolatey/choco)

Searching Database…

11.5K ·GitHub
这是什么?Chocolatey(choco)是一款适用于 Windows 的命令行软件包管理器,类似于 apt-get 或 yum,但用于管理 Windows 软件。
这是图形界面应用还是命令行工具?它是一个命令行工具(choco.exe),基于 .NET/PowerShell 构建;如果你想要图形界面,可以使用另一个名为 Chocolatey GUI 的项目。
我该如何安装和使用 choco?请按照官方文档下载并运行安装程序,然后使用诸如 'choco.exe install ' 的命令,或运行 'choco.exe --help' 查看可用命令。
要在我的电脑上运行 choco,需要什么环境?你需要 .NET Framework 4.8 及以上版本、PowerShell 2.0 及以上版本,以及 Windows Server 2008 R2 及以上版本或 Windows 10 及以上版本。
我能在 Linux 或 Mac 上构建和运行 choco 吗?可以,但需要 Mono 6.6 及以上版本和 .NET 6.0 SDK;而且在 Mono 上构建“可能还有较多粗糙之处”,可能会出现构建脚本失败的情况,这些失败可以放心忽略。
Chocolatey 有付费版本吗?有。Chocolatey Pro 和 Chocolatey for Business 是商业版,除了免费的开源命令行工具外,还提供私有 CDN 下载缓存和病毒扫描防护等额外功能。
choco 的软件包来自哪里?软件包发布在 Chocolatey 社区软件包仓库中,README 中附有软件包请求流程的链接,可用于申请添加新软件。
该项目使用哪些测试?项目包含使用 NUnit 编写的单元测试和集成测试,以及使用 Pester 框架编写的端到端测试;对于会改动系统的端到端测试,建议使用 Vagrant 来安全地运行。
What are similar projects?Scoop, brew, UniGetUI, helm, winsw, KillerPDF, PowerShell, pip
Creator
chocolatey
Size
49.8 MB
Stars
11.5K
Age
11y
Commits · 90 Days