70 lines
2.2 KiB
Groff
70 lines
2.2 KiB
Groff
CELL-GET(1) Cell Manual CELL-GET(1)
|
|
|
|
NAME
|
|
cell get - Fetch a module and add it as a dependency
|
|
|
|
SYNOPSIS
|
|
cell get <locator> [alias]
|
|
|
|
DESCRIPTION
|
|
The get command fetches a module from a repository and adds it to
|
|
your project's dependencies in cell.toml. The module is downloaded
|
|
to .cell/modules/ and can be imported using the specified alias.
|
|
|
|
If no version is specified in the locator, the command defaults to
|
|
using the head/master branch of the repository.
|
|
|
|
ARGUMENTS
|
|
locator
|
|
The module identifier in the format:
|
|
host/owner/name[@version]
|
|
|
|
Examples:
|
|
- git.world/jj/chess@v1.0.0
|
|
- git.world/jj/chess@head
|
|
- git.world/jj/chess (defaults to @head)
|
|
|
|
alias
|
|
Optional custom name for importing the module.
|
|
If not specified, uses the module name from the locator.
|
|
|
|
OPERATION
|
|
1. Parses the module locator
|
|
2. Initializes .cell/ if it doesn't exist
|
|
3. Adds the dependency to cell.toml
|
|
4. Creates the module directory in .cell/modules/
|
|
5. Downloads the module files (TODO: implementation pending)
|
|
6. Updates lock.toml with checksums (TODO: implementation pending)
|
|
|
|
EXAMPLES
|
|
Add a specific version:
|
|
cell get git.world/jj/chess@v1.0.0
|
|
|
|
Add latest version:
|
|
cell get git.world/jj/chess
|
|
|
|
Add with custom alias:
|
|
cell get git.world/jj/chess-engine@v2.0.0 chess
|
|
|
|
After adding, import in your code:
|
|
var chess = use('chess')
|
|
|
|
NOTES
|
|
- If a dependency with the same alias already exists, use the
|
|
update command instead
|
|
- The actual fetching from remote repositories is not yet
|
|
implemented; currently creates the directory structure only
|
|
- Module directories are named as: alias@version
|
|
|
|
FILES
|
|
.cell/cell.toml
|
|
Updated with the new dependency
|
|
|
|
.cell/modules/
|
|
Module files are stored here
|
|
|
|
.cell/lock.toml
|
|
Will contain checksums once implemented
|
|
|
|
SEE ALSO
|
|
cell(1), cell-update(1), cell-vendor(1) |