Magic commands
This document contains the help content for the magic
command-line program.
magic
β
magic - A high level package management tool by Modular for developing with Mojo and MAX.
To get started, run magic init
in your project directory.
To see all available commands, run magic --help
or magic help
.
Usage: magic [OPTIONS] <COMMAND>
Subcommands:β
init
β Creates a new projectadd
β Adds dependencies to the projectremove
β Removes dependencies from the projectinstall
β Install all dependenciesupdate
β Update dependencies as recorded in the local lock filerun
β Runs task in projectshell
β Start a shell in the magic environment of the projectshell-hook
β Print the magic environment activation scriptproject
β Modify the project configuration file through the command linetask
β Interact with tasks in the projectlist
β List project's packagestree
β Show a tree of project dependenciesglobal
β Subcommand for global package management actionsconfig
β Configuration managementinfo
β Information about the system, project and environments for the current machinesearch
β Search a conda packageself-update
β Update magic to the latest or a specific versionclean
β Clean the parts of your system which are touched by magic. Defaults to cleaning the environments and task cache. Use thecache
subcommand to clean the cachecompletion
β Generates a completion script for a shelltelemetry
β Configure how telemetry data is emitted from magic and Modular packages
Options:β
-
-v
,--verbose
β Increase logging verbosity -
-q
,--quiet
β Decrease logging verbosity -
--color <COLOR>
β Whether the log needs to be coloredDefault value:
auto
Possible values:
always
,never
,auto
-
--no-progress
β Hide all progress barsDefault value:
false
magic init
β
Creates a new project
Usage: magic init [OPTIONS] [PATH]
Arguments:β
-
<PATH>
β Where to place the project (defaults to current path)Default value:
.
Options:β
-
-c
,--channel <channel>
β Channels to use in the project -
-p
,--platform <platform>
β Platforms that the project supports -
-i
,--import <ENV_FILE>
β Environment.yml file to bootstrap the project -
--format <FORMAT>
β The manifest format to createPossible values:
magic
,pyproject
,mojoproject
magic add
β
Adds dependencies to the project
The dependencies should be defined as MatchSpec for conda package, or a PyPI requirement for the --pypi dependencies. If no specific version is provided, the latest version compatible with your project will be chosen automatically or a * will be used.
Example usage:
magic add python=3.9
: This will select the latest minor version that complies with 3.9.*, i.e., python version 3.9.0, 3.9.1, 3.9.2, etc.magic add python
: In absence of a specified version, the latest version will be chosen. For instance, this could resolve to python version 3.11.3.* at the time of writing.
Adding multiple dependencies at once is also supported:
magic add python pytest
: This will add bothpython
andpytest
to the project's dependencies.
The --platform
and --build/--host
flags make the dependency target
specific.
magic add python --platform linux-64 --platform osx-arm64
: Will add the latest version of python for linux-64 and osx-arm64 platforms.magic add python --build
: Will add the latest version of python for as a build dependency.
Mixing --platform
and --build
/--host
flags is supported
The --pypi
option will add the package as a pypi dependency. This can not
be mixed with the conda dependencies
magic add --pypi boto3
- `magic add --pypi "boto3==version"
If the project manifest is a pyproject.toml
, adding a pypi dependency will
add it to the native pyproject project.dependencies
array or to the native
project.optional-dependencies
table if a feature is specified:
magic add --pypi boto3
will addboto3
to theproject.dependencies
arraymagic add --pypi boto3 --feature aws
will addboto3
to theproject.dependencies.aws
array
These dependencies will then be read by magic as if they had been added to
the magic pypi-dependencies
tables of the default or of a named feature.
Usage: magic add [OPTIONS] <SPECS>...
Arguments:β
<SPECS>
β The dependencies as names, conda MatchSpecs or PyPi requirements
Options:β
-
--manifest-path <MANIFEST_PATH>
β The path to 'pixi.toml' or 'pyproject.toml' -
--host
β The specified dependencies are host dependencies. Conflicts withbuild
andpypi
-
--build
β The specified dependencies are build dependencies. Conflicts withhost
andpypi
-
--pypi
β The specified dependencies are pypi dependencies. Conflicts withhost
andbuild
-
-p
,--platform <PLATFORM>
β The platform(s) for which the dependency should be modified -
-f
,--feature <FEATURE>
β The feature for which the dependency should be modified -
--no-lockfile-update
β Don't update lockfile, implies the no-install as well -
--no-install
β Don't modify the environment, only modify the lock-file -
--tls-no-verify
β Do not verify the TLS certificate of the server -
--auth-file <AUTH_FILE>
β Path to the file containing the authentication token -
--pypi-keyring-provider <PYPI_KEYRING_PROVIDER>
β Specifies if we want to use uv keyring providerPossible values:
disabled
,subprocess
-
--editable
β Whether the pypi requirement should be editable
magic remove
β
Removes dependencies from the project
If the project manifest is a pyproject.toml
, removing a pypi dependency with the --pypi
flag will remove it from either - the native pyproject project.dependencies
array or, if a feature is specified, the native project.optional-dependencies
table - magic pypi-dependencies
tables of the default feature or, if a feature is specified, a named feature
Usage: magic remove [OPTIONS] <SPECS>...
Arguments:β
<SPECS>
β The dependencies as names, conda MatchSpecs or PyPi requirements
Options:β
-
--manifest-path <MANIFEST_PATH>
β The path to 'pixi.toml' or 'pyproject.toml' -
--host
β The specified dependencies are host dependencies. Conflicts withbuild
andpypi
-
--build
β The specified dependencies are build dependencies. Conflicts withhost
andpypi
-
--pypi
β The specified dependencies are pypi dependencies. Conflicts withhost
andbuild
-
-p
,--platform <PLATFORM>
β The platform(s) for which the dependency should be modified -
-f
,--feature <FEATURE>
β The feature for which the dependency should be modified -
--no-lockfile-update
β Don't update lockfile, implies the no-install as well -
--no-install
β Don't modify the environment, only modify the lock-file -
--tls-no-verify
β Do not verify the TLS certificate of the server -
--auth-file <AUTH_FILE>
β Path to the file containing the authentication token -
--pypi-keyring-provider <PYPI_KEYRING_PROVIDER>
β Specifies if we want to use uv keyring providerPossible values:
disabled
,subprocess
magic install
β
Install all dependencies
Usage: magic install [OPTIONS]
Options:β
-
--manifest-path <MANIFEST_PATH>
β The path to 'pixi.toml' or 'pyproject.toml' -
--frozen
β Install the environment as defined in the lockfile, doesn't update lockfile if it isn't up-to-date with the manifest file -
--locked
β Check if lockfile is up-to-date before installing the environment, aborts when lockfile isn't up-to-date with the manifest file -
-e
,--environment <ENVIRONMENT>
β The environment to install -
--tls-no-verify
β Do not verify the TLS certificate of the server -
--auth-file <AUTH_FILE>
β Path to the file containing the authentication token -
--pypi-keyring-provider <PYPI_KEYRING_PROVIDER>
β Specifies if we want to use uv keyring providerPossible values:
disabled
,subprocess
-
-a
,--all
magic update
β
Update dependencies as recorded in the local lock file
Usage: magic update [OPTIONS] [PACKAGES]...
Arguments:β
<PACKAGES>
β The packages to update
Options:β
-
--tls-no-verify
β Do not verify the TLS certificate of the server -
--auth-file <AUTH_FILE>
β Path to the file containing the authentication token -
--pypi-keyring-provider <PYPI_KEYRING_PROVIDER>
β Specifies if we want to use uv keyring providerPossible values:
disabled
,subprocess
-
--manifest-path <MANIFEST_PATH>
β The path to 'pixi.toml' or 'pyproject.toml' -
--no-install
β Don't install the (solve) environments needed for pypi-dependencies solving -
-n
,--dry-run
β Don't actually write the lockfile or update any environment -
-e
,--environment <ENVIRONMENTS>
β The environments to update. If none is specified, all environments are updated -
-p
,--platform <PLATFORMS>
β The platforms to update. If none is specified, all platforms are updated -
--json
magic run
β
Runs task in project
Usage: magic run [OPTIONS] <TASK>...
Arguments:β
<TASK>
β The magic task or a task shell command you want to run in the project's environment, which can be an executable in the environment's PATH
Options:β
-
--manifest-path <MANIFEST_PATH>
β The path to 'pixi.toml' or 'pyproject.toml' -
--frozen
β Install the environment as defined in the lockfile, doesn't update lockfile if it isn't up-to-date with the manifest file -
--locked
β Check if lockfile is up-to-date before installing the environment, aborts when lockfile isn't up-to-date with the manifest file -
-e
,--environment <ENVIRONMENT>
β The environment to run the task in -
--tls-no-verify
β Do not verify the TLS certificate of the server -
--auth-file <AUTH_FILE>
β Path to the file containing the authentication token -
--pypi-keyring-provider <PYPI_KEYRING_PROVIDER>
β Specifies if we want to use uv keyring providerPossible values:
disabled
,subprocess
-
--clean-env
β Use a clean environment to run the taskUsing this flag will ignore your current shell environment and use bare minimum environment to activate the magic environment in.
magic shell
β
Start a shell in the magic environment of the project
Usage: magic shell [OPTIONS]
Options:β
-
--manifest-path <MANIFEST_PATH>
β The path to 'pixi.toml' or 'pyproject.toml' -
--frozen
β Install the environment as defined in the lockfile, doesn't update lockfile if it isn't up-to-date with the manifest file -
--locked
β Check if lockfile is up-to-date before installing the environment, aborts when lockfile isn't up-to-date with the manifest file -
-e
,--environment <ENVIRONMENT>
β The environment to activate in the shell -
--tls-no-verify
β Do not verify the TLS certificate of the server -
--auth-file <AUTH_FILE>
β Path to the file containing the authentication token -
--pypi-keyring-provider <PYPI_KEYRING_PROVIDER>
β Specifies if we want to use uv keyring providerPossible values:
disabled
,subprocess
-
--change-ps1 <CHANGE_PS1>
β Do not change the PS1 variable when starting a promptPossible values:
true
,false
magic shell-hook
β
Print the magic environment activation script.
You can source the script to activate the environment without needing magic itself.
Usage: magic shell-hook [OPTIONS]
Options:β
-
-s
,--shell <SHELL>
β Sets the shell, options: [bash
,zsh
,xonsh
,cmd
,powershell
,fish
,nushell
] -
--manifest-path <MANIFEST_PATH>
β The path to 'pixi.toml' or 'pyproject.toml' -
--frozen
β Install the environment as defined in the lockfile, doesn't update lockfile if it isn't up-to-date with the manifest file -
--locked
β Check if lockfile is up-to-date before installing the environment, aborts when lockfile isn't up-to-date with the manifest file -
-e
,--environment <ENVIRONMENT>
β The environment to activate in the script -
--json
β Emit the environment variables set by running the activation as JSONDefault value:
false
-
--tls-no-verify
β Do not verify the TLS certificate of the server -
--auth-file <AUTH_FILE>
β Path to the file containing the authentication token -
--pypi-keyring-provider <PYPI_KEYRING_PROVIDER>
β Specifies if we want to use uv keyring providerPossible values:
disabled
,subprocess
-
--change-ps1 <CHANGE_PS1>
β Do not change the PS1 variable when starting a promptPossible values:
true
,false
magic project
β
Modify the project configuration file through the command line
Usage: magic project [OPTIONS] <COMMAND>
Subcommands:β
channel
β Commands to manage project channelsdescription
β Commands to manage project descriptionplatform
β Commands to manage project platformsversion
β Commands to manage project versionenvironment
β Commands to manage project environments
Options:β
--manifest-path <MANIFEST_PATH>
β The path to 'pixi.toml' or 'pyproject.toml'
magic project channel
β
Commands to manage project channels
Usage: magic project channel [OPTIONS] <COMMAND>
Subcommands:β
add
β Adds a channel to the project file and updates the lockfilelist
β List the channels in the project fileremove
β Remove channel(s) from the project file and updates the lockfile
Options:β
--manifest-path <MANIFEST_PATH>
β The path to 'pixi.toml' or 'pyproject.toml'
magic project channel add
β
Adds a channel to the project file and updates the lockfile
Usage: magic project channel add [OPTIONS] <CHANNEL>...
Arguments:β
<CHANNEL>
β The channel name or URL
Options:β
--no-install
β Don't update the environment, only modify the manifest and the lock-file-f
,--feature <FEATURE>
β The name of the feature to modify
magic project channel list
β
List the channels in the project file
Usage: magic project channel list [OPTIONS]
Options:β
--urls
β Whether to display the channel's names or urls
magic project channel remove
β
Remove channel(s) from the project file and updates the lockfile
Usage: magic project channel remove [OPTIONS] <CHANNEL>...
Arguments:β
<CHANNEL>
β The channel name or URL
Options:β
--no-install
β Don't update the environment, only modify the manifest and the lock-file-f
,--feature <FEATURE>
β The name of the feature to modify
magic project description
β
Commands to manage project description
Usage: magic project description [OPTIONS] <COMMAND>
Subcommands:β
get
β Get the project descriptionset
β Set the project description
Options:β
--manifest-path <MANIFEST_PATH>
β The path to 'pixi.toml' or 'pyproject.toml'
magic project description get
β
Get the project description
Usage: magic project description get
magic project description set
β
Set the project description
Usage: magic project description set <DESCRIPTION>
Arguments:β
<DESCRIPTION>
β The project description
magic project platform
β
Commands to manage project platforms
Usage: magic project platform [OPTIONS] <COMMAND>
Subcommands:β
add
β Adds a platform(s) to the project file and updates the lockfilelist
β List the platforms in the project fileremove
β Remove platform(s) from the project file and updates the lockfile
Options:β
--manifest-path <MANIFEST_PATH>
β The path to 'pixi.toml' or 'pyproject.toml'
magic project platform add
β
Adds a platform(s) to the project file and updates the lockfile
Usage: magic project platform add [OPTIONS] <PLATFORM>...
Arguments:β
<PLATFORM>
β The platform name(s) to add
Options:β
--no-install
β Don't update the environment, only add changed packages to the lock-file-f
,--feature <FEATURE>
β The name of the feature to add the platform to
magic project platform list
β
List the platforms in the project file
Usage: magic project platform list
magic project platform remove
β
Remove platform(s) from the project file and updates the lockfile
Usage: magic project platform remove [OPTIONS] <PLATFORM>...
Arguments:β
<PLATFORM>
β The platform name(s) to remove
Options:β
--no-install
β Don't update the environment, only remove the platform(s) from the lock-file-f
,--feature <FEATURE>
β The name of the feature to remove the platform from
magic project version
β
Commands to manage project version
Usage: magic project version [OPTIONS] <COMMAND>
Subcommands:β
get
β Get the project versionset
β Set the project versionmajor
β Bump the project version to MAJORminor
β Bump the project version to MINORpatch
β Bump the project version to PATCH
Options:β
--manifest-path <MANIFEST_PATH>
β The path to 'pixi.toml' or 'pyproject.toml'
magic project version get
β
Get the project version
Usage: magic project version get
magic project version set
β
Set the project version
Usage: magic project version set <VERSION>
Arguments:β
<VERSION>
β The new project version
magic project version major
β
Bump the project version to MAJOR
Usage: magic project version major
magic project version minor
β
Bump the project version to MINOR
Usage: magic project version minor
magic project version patch
β
Bump the project version to PATCH
Usage: magic project version patch
magic project environment
β
Commands to manage project environments
Usage: magic project environment [OPTIONS] <COMMAND>
Subcommands:β
add
β Adds an environment to the manifest filelist
β List the environments in the manifest fileremove
β Remove an environment from the manifest file
Options:β
--manifest-path <MANIFEST_PATH>
β The path to 'pixi.toml' or 'pyproject.toml'
magic project environment add
β
Adds an environment to the manifest file
Usage: magic project environment add [OPTIONS] <NAME>
Arguments:β
<NAME>
β The name of the environment to add
Options:β
-
-f
,--feature <FEATURES>
β Features to add to the environment -
--solve-group <SOLVE_GROUP>
β The solve-group to add the environment to -
--no-default-feature
β Don't include the default feature in the environmentDefault value:
false
-
--force
β Update the manifest even if the environment already existsDefault value:
false
magic project environment list
β
List the environments in the manifest file
Usage: magic project environment list
magic project environment remove
β
Remove an environment from the manifest file
Usage: magic project environment remove <NAME>
Arguments:β
<NAME>
β The name of the environment to remove
magic task
β
Interact with tasks in the project
Usage: magic task [OPTIONS] <COMMAND>
Subcommands:β
add
β Add a command to the projectremove
β Remove a command from the projectalias
β Alias another specific commandlist
β List all tasks in the project
Options:β
--manifest-path <MANIFEST_PATH>
β The path to 'pixi.toml' or 'pyproject.toml'
magic task add
β
Add a command to the project
Usage: magic task add [OPTIONS] <NAME> <COMMANDS>...
Arguments:β
<NAME>
β Task name<COMMANDS>
β One or more commands to actually execute
Options:β
--depends-on <DEPENDS_ON>
β Depends on these other commands-p
,--platform <PLATFORM>
β The platform for which the task should be added-f
,--feature <FEATURE>
β The feature for which the task should be added--cwd <CWD>
β The working directory relative to the root of the project--env <ENV>
β The environment variable to set, use --env key=value multiple times for more than one variable--description <DESCRIPTION>
β A description of the task to be added--clean-env
β Isolate the task from the shell environment, and only use the magic environment to run the task
magic task remove
β
Remove a command from the project
Usage: magic task remove [OPTIONS] [NAMES]...
Arguments:β
<NAMES>
β Task names to remove
Options:β
-p
,--platform <PLATFORM>
β The platform for which the task should be removed-f
,--feature <FEATURE>
β The feature for which the task should be removed
magic task alias
β
Alias another specific command
Usage: magic task alias [OPTIONS] <ALIAS> <DEPENDS_ON>...
Arguments:β
<ALIAS>
β Alias name<DEPENDS_ON>
β Depends on these tasks to execute
Options:β
-p
,--platform <PLATFORM>
β The platform for which the alias should be added--description <DESCRIPTION>
β The description of the alias task
magic task list
β
List all tasks in the project
Usage: magic task list [OPTIONS]
Options:β
-s
,--summary
β Tasks available for this machine per environment-e
,--environment <ENVIRONMENT>
β The environment the list should be generated for. If not specified, the default environment is used
magic list
β
List project's packages.
Highlighted packages are explicit dependencies.
Usage: magic list [OPTIONS] [REGEX]
Arguments:β
<REGEX>
β List only packages matching a regular expression
Options:β
-
--platform <PLATFORM>
β The platform to list packages for. Defaults to the current platform -
--json
β Whether to output in json format -
--json-pretty
β Whether to output in pretty json format -
--sort-by <SORT_BY>
β Sorting strategyDefault value:
name
Possible values:
size
,name
,kind
-
--manifest-path <MANIFEST_PATH>
β The path to 'pixi.toml' or 'pyproject.toml' -
--frozen
β Install the environment as defined in the lockfile, doesn't update lockfile if it isn't up-to-date with the manifest file -
--locked
β Check if lockfile is up-to-date before installing the environment, aborts when lockfile isn't up-to-date with the manifest file -
-e
,--environment <ENVIRONMENT>
β The environment to list packages for. Defaults to the default environment -
--no-lockfile-update
β Don't update lockfile, implies the no-install as well -
--no-install
β Don't modify the environment, only modify the lock-file -
--tls-no-verify
β Do not verify the TLS certificate of the server -
--auth-file <AUTH_FILE>
β Path to the file containing the authentication token -
--pypi-keyring-provider <PYPI_KEYRING_PROVIDER>
β Specifies if we want to use uv keyring providerPossible values:
disabled
,subprocess
-
-x
,--explicit
β Only list packages that are explicitly defined in the project
magic tree
β
Show a tree of project dependencies
Dependency names highlighted in green are directly specified in the manifest. Yellow version numbers are conda packages, PyPI version numbers are blue.
Usage: magic tree [OPTIONS] [REGEX]
Arguments:β
<REGEX>
β List only packages matching a regular expression
Options:β
-
-p
,--platform <PLATFORM>
β The platform to list packages for. Defaults to the current platform -
--manifest-path <MANIFEST_PATH>
β The path to 'pixi.toml' or 'pyproject.toml' -
-e
,--environment <ENVIRONMENT>
β The environment to list packages for. Defaults to the default environment -
--no-lockfile-update
β Don't update lockfile, implies the no-install as well -
--no-install
β Don't modify the environment, only modify the lock-file -
--tls-no-verify
β Do not verify the TLS certificate of the server -
--auth-file <AUTH_FILE>
β Path to the file containing the authentication token -
--pypi-keyring-provider <PYPI_KEYRING_PROVIDER>
β Specifies if we want to use uv keyring providerPossible values:
disabled
,subprocess
-
-i
,--invert
β Invert tree and show what depends on given package in the regex argument
magic global
β
Subcommand for global package management actions
Install packages on the user level. Example: magic global install my_package magic global remove my_package
Usage: magic global <COMMAND>
Subcommands:β
install
β Installs the defined package in a global accessible locationremove
β Removes a package previously installed into a globally accessible location viamagic global install
list
β Lists all packages previously installed into a globally accessible location viamagic global install
upgrade
β Upgrade specific package which is installed globallyupgrade-all
β Upgrade all globally installed packages
magic global install
β
Installs the defined package in a global accessible location
Usage: magic global install [OPTIONS] [PACKAGES]...
Arguments:β
<PACKAGES>
β Specifies the packages that are to be installed
Options:β
-
-c
,--channel <CHANNEL>
β The channels to consider as a name or a url. Multiple channels can be specified by using this field multiple times.When specifying a channel, it is common that the selected channel also depends on the
conda-forge
channel.By default, if no channel is provided,
conda-forge
is used. -
-p
,--platform <PLATFORM>
Default value:
osx-arm64
-
--tls-no-verify
β Do not verify the TLS certificate of the server -
--auth-file <AUTH_FILE>
β Path to the file containing the authentication token -
--pypi-keyring-provider <PYPI_KEYRING_PROVIDER>
β Specifies if we want to use uv keyring providerPossible values:
disabled
,subprocess
magic global remove
β
Removes a package previously installed into a globally accessible location via magic global install
Usage: magic global remove [OPTIONS] [PACKAGES]...
Arguments:β
<PACKAGES>
β Specifies the packages that are to be removed
Options:β
-v
,--verbose
β Increase logging verbosity-q
,--quiet
β Decrease logging verbosity
magic global list
β
Lists all packages previously installed into a globally accessible location via magic global install
Usage: magic global list
magic global upgrade
β
Upgrade specific package which is installed globally
Usage: magic global upgrade [OPTIONS] <SPECS>...
Arguments:β
<SPECS>
β Specifies the packages to upgrade
Options:β
-
-c
,--channel <CHANNEL>
β The channels to consider as a name or a url. Multiple channels can be specified by using this field multiple times.When specifying a channel, it is common that the selected channel also depends on the
conda-forge
channel.By default, if no channel is provided,
conda-forge
is used. -
--platform <PLATFORM>
β The platform to install the package forDefault value:
osx-arm64
magic global upgrade-all
β
Upgrade all globally installed packages
Usage: magic global upgrade-all [OPTIONS]
Options:β
-
-c
,--channel <CHANNEL>
β The channels to consider as a name or a url. Multiple channels can be specified by using this field multiple times.When specifying a channel, it is common that the selected channel also depends on the
conda-forge
channel.By default, if no channel is provided,
conda-forge
is used. -
--tls-no-verify
β Do not verify the TLS certificate of the server -
--auth-file <AUTH_FILE>
β Path to the file containing the authentication token -
--pypi-keyring-provider <PYPI_KEYRING_PROVIDER>
β Specifies if we want to use uv keyring providerPossible values:
disabled
,subprocess
-
--platform <PLATFORM>
β The platform to install the package forDefault value:
osx-arm64
magic config
β
Configuration management
Usage: magic config <COMMAND>
Subcommands:β
edit
β Edit the configuration filelist
β List configuration valuesprepend
β Prepend a value to a list configuration keyappend
β Append a value to a list configuration keyset
β Set a configuration valueunset
β Unset a configuration value
magic config edit
β
Edit the configuration file
Usage: magic config edit [OPTIONS]
Options:β
-l
,--local
β Operation on project-local configuration-g
,--global
β Operation on global configuration-s
,--system
β Operation on system configuration
magic config list
β
List configuration values
Example: magic config list default-channels
Usage: magic config list [OPTIONS] [KEY]
Arguments:β
<KEY>
β Configuration key to show (all if not provided)
Options:β
--json
β Output in JSON format-l
,--local
β Operation on project-local configuration-g
,--global
β Operation on global configuration-s
,--system
β Operation on system configuration
magic config prepend
β
Prepend a value to a list configuration key
Example: magic config prepend default-channels bioconda
Usage: magic config prepend [OPTIONS] <KEY> <VALUE>
Arguments:β
<KEY>
β Configuration key to set<VALUE>
β Configuration value to (pre|ap)pend
Options:β
-l
,--local
β Operation on project-local configuration-g
,--global
β Operation on global configuration-s
,--system
β Operation on system configuration
magic config append
β
Append a value to a list configuration key
Example: magic config append default-channels bioconda
Usage: magic config append [OPTIONS] <KEY> <VALUE>
Arguments:β
<KEY>
β Configuration key to set<VALUE>
β Configuration value to (pre|ap)pend
Options:β
-l
,--local
β Operation on project-local configuration-g
,--global
β Operation on global configuration-s
,--system
β Operation on system configuration
magic config set
β
Set a configuration value
Example: magic config set default-channels '["conda-forge", "bioconda"]'
Usage: magic config set [OPTIONS] <KEY> [VALUE]
Arguments:β
<KEY>
β Configuration key to set<VALUE>
β Configuration value to set (key will be unset if value not provided)
Options:β
-l
,--local
β Operation on project-local configuration-g
,--global
β Operation on global configuration-s
,--system
β Operation on system configuration
magic config unset
β
Unset a configuration value
Example: magic config unset default-channels
Usage: magic config unset [OPTIONS] <KEY>
Arguments:β
<KEY>
β Configuration key to unset
Options:β
-l
,--local
β Operation on project-local configuration-g
,--global
β Operation on global configuration-s
,--system
β Operation on system configuration
magic info
β
Information about the system, project and environments for the current machine
Usage: magic info [OPTIONS]
Options:β
--extended
β Show cache and environment size--json
β Whether to show the output as JSON or not--manifest-path <MANIFEST_PATH>
β The path to 'pixi.toml' or 'pyproject.toml'
magic search
β
Search a conda package
Its output will list the latest version of package.
Usage: magic search [OPTIONS] <PACKAGE>
Arguments:β
<PACKAGE>
β Name of package to search
Options:β
-
-c
,--channel <CHANNEL>
β The channels to consider as a name or a url. Multiple channels can be specified by using this field multiple times.When specifying a channel, it is common that the selected channel also depends on the
conda-forge
channel.By default, if no channel is provided,
conda-forge
is used. -
--manifest-path <MANIFEST_PATH>
β The path to 'pixi.toml' or 'pyproject.toml' -
-p
,--platform <PLATFORM>
β The platform to search for, defaults to current platformDefault value:
osx-arm64
-
-l
,--limit <LIMIT>
β Limit the number of search results
magic self-update
β
Update magic to the latest or a specific version.
Note: If the magic binary is not found in the default location (e.g. ~/.modular/bin/magic
), magic won't update to prevent breaking the current installation.
Usage: magic self-update [OPTIONS]
Options:β
--version <VERSION>
β The version to downgrade or upgrade to. The latest version is used if not specified--force
β Force the update even if the magic binary is not found in the default location
magic clean
β
Clean the parts of your system which are touched by magic. Defaults to cleaning the environments and task cache. Use the cache
subcommand to clean the cache
Usage: magic clean [OPTIONS] [COMMAND]
Subcommands:β
cache
β Clean the cache of your system which are touched by magic
Options:β
--manifest-path <MANIFEST_PATH>
β The path to 'pixi.toml' or 'pyproject.toml'-e
,--environment <ENVIRONMENT>
β The environment directory to remove
magic clean cache
β
Clean the cache of your system which are touched by magic
Usage: magic clean cache [OPTIONS]
Options:β
--pypi
β Clean only the pypi related cache--conda
β Clean only the conda related cache--mapping
β Clean only the mapping cache--exec
β Clean onlyexec
cache--repodata
β Clean only the repodata cache--yes
β Answer yes to all questions
magic completion
β
Generates a completion script for a shell
Usage: magic completion --shell <SHELL>
Options:β
-
-s
,--shell <SHELL>
β The shell to generate a completion script forPossible values:
bash
: Bourne Again SHell (bash)elvish
: Elvish shellfish
: Friendly Interactive SHell (fish)nushell
: Nushellpowershell
: PowerShellzsh
: Z SHell (zsh)
magic telemetry
β
Configure how telemetry data is emitted from magic and Modular packages
Usage: magic telemetry [OPTIONS]
Options:β
--manifest-path <MANIFEST_PATH>
β The path to 'pixi.toml' or 'pyproject.toml'-e
,--environment <ENVIRONMENT>
β The environment to control telemetry for Modular packages (default environment, if unspecified)--enable
β Enable telemetry--disable
β Disable telemetry
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!
π What went wrong?