← 返回命令列表

Linux command

cs 命令

趣味

复制后可按需替换文件名、目录或参数。

常用示例

Install a Scala application

cs install [scala]

Launch an application

cs launch [org.scalameta::metals:latest.stable]

Resolve dependencies

cs resolve [org.typelevel::cats-core:2.9.0]

Fetch JARs

cs fetch [com.lihaoyi::ammonite:2.5.9]

Update installed applications

cs update

List installed applications

cs list

Setup Coursier

cs setup

说明

Coursier (cs) is a Scala artifact fetcher and application launcher. It resolves Maven and Ivy dependencies, downloads artifacts, and can launch JVM applications directly from their coordinates without manual installation. The tool provides fast, parallel downloads with caching. It can install and manage Scala ecosystem tools like sbt, scala, ammonite, and scalafmt. The setup command configures a complete Scala development environment. Coursier handles complex dependency resolution, including version conflict resolution and exclusions. It integrates with the Scala ecosystem as the recommended way to install Scala tooling and is used by sbt for dependency management.

参数

install _APP_
Install an application from the default channels.
launch _COORDS_
Launch an application by Maven coordinates.
resolve _COORDS_
Resolve and display dependency tree.
fetch _COORDS_
Download artifacts for dependencies.
update
Update all installed applications.
list
List installed applications.
setup
Initial setup, installing common Scala tools.
uninstall _APP_
Remove an installed application.
java
Manage Java installations.
--channel _URL_
Add a custom application channel.
-r _REPO_
Add a custom Maven repository.

FAQ

What is the cs command used for?

Coursier (cs) is a Scala artifact fetcher and application launcher. It resolves Maven and Ivy dependencies, downloads artifacts, and can launch JVM applications directly from their coordinates without manual installation. The tool provides fast, parallel downloads with caching. It can install and manage Scala ecosystem tools like sbt, scala, ammonite, and scalafmt. The setup command configures a complete Scala development environment. Coursier handles complex dependency resolution, including version conflict resolution and exclusions. It integrates with the Scala ecosystem as the recommended way to install Scala tooling and is used by sbt for dependency management.

How do I run a basic cs example?

Run `cs install [scala]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does install _APP_ do in cs?

Install an application from the default channels.