172 lines
2.8 KiB
Markdown
172 lines
2.8 KiB
Markdown
# Command Line Interface
|
|
|
|
Cell provides a command-line interface for managing packages, running scripts, and building applications.
|
|
|
|
## Basic Usage
|
|
|
|
```bash
|
|
cell <command> [arguments]
|
|
```
|
|
|
|
## Commands
|
|
|
|
### cell version
|
|
|
|
Display the Cell version.
|
|
|
|
```bash
|
|
cell version
|
|
# 0.1.0
|
|
```
|
|
|
|
### cell install
|
|
|
|
Install a package to the shop.
|
|
|
|
```bash
|
|
cell install gitea.pockle.world/john/prosperon
|
|
cell install /Users/john/local/mypackage # local path
|
|
```
|
|
|
|
### cell update
|
|
|
|
Update packages from remote sources.
|
|
|
|
```bash
|
|
cell update # update all packages
|
|
cell update <package> # update specific package
|
|
```
|
|
|
|
### cell remove
|
|
|
|
Remove a package from the shop.
|
|
|
|
```bash
|
|
cell remove gitea.pockle.world/john/oldpackage
|
|
```
|
|
|
|
### cell list
|
|
|
|
List installed packages.
|
|
|
|
```bash
|
|
cell list # list all installed packages
|
|
cell list <package> # list dependencies of a package
|
|
```
|
|
|
|
### cell ls
|
|
|
|
List modules and actors in a package.
|
|
|
|
```bash
|
|
cell ls # list files in current project
|
|
cell ls <package> # list files in specified package
|
|
```
|
|
|
|
### cell build
|
|
|
|
Build the current package.
|
|
|
|
```bash
|
|
cell build
|
|
```
|
|
|
|
### cell test
|
|
|
|
Run tests.
|
|
|
|
```bash
|
|
cell test # run tests in current package
|
|
cell test all # run all tests
|
|
cell test <package> # run tests in specific package
|
|
```
|
|
|
|
### cell link
|
|
|
|
Manage local package links for development.
|
|
|
|
```bash
|
|
cell link add <canonical> <local_path> # link a package
|
|
cell link list # show all links
|
|
cell link delete <canonical> # remove a link
|
|
cell link clear # remove all links
|
|
```
|
|
|
|
### cell fetch
|
|
|
|
Fetch package sources without extracting.
|
|
|
|
```bash
|
|
cell fetch <package>
|
|
```
|
|
|
|
### cell upgrade
|
|
|
|
Upgrade the Cell installation itself.
|
|
|
|
```bash
|
|
cell upgrade
|
|
```
|
|
|
|
### cell clean
|
|
|
|
Clean build artifacts.
|
|
|
|
```bash
|
|
cell clean
|
|
```
|
|
|
|
### cell help
|
|
|
|
Display help information.
|
|
|
|
```bash
|
|
cell help
|
|
cell help <command>
|
|
```
|
|
|
|
## Running Scripts
|
|
|
|
Any `.ce` file in the Cell core can be run as a command:
|
|
|
|
```bash
|
|
cell version # runs version.ce
|
|
cell build # runs build.ce
|
|
cell test # runs test.ce
|
|
```
|
|
|
|
## Package Locators
|
|
|
|
Packages are identified by locators:
|
|
|
|
- **Remote**: `gitea.pockle.world/user/repo`
|
|
- **Local**: `/absolute/path/to/package`
|
|
|
|
```bash
|
|
cell install gitea.pockle.world/john/prosperon
|
|
cell install /Users/john/work/mylib
|
|
```
|
|
|
|
## Configuration
|
|
|
|
Cell stores its data in `~/.cell/`:
|
|
|
|
```
|
|
~/.cell/
|
|
├── packages/ # installed packages
|
|
├── lib/ # compiled dynamic libraries
|
|
├── build/ # build cache
|
|
├── cache/ # downloaded archives
|
|
├── lock.toml # installed package versions
|
|
└── link.toml # local development links
|
|
```
|
|
|
|
## Environment
|
|
|
|
Cell reads the `HOME` environment variable to locate the shop directory.
|
|
|
|
## Exit Codes
|
|
|
|
- `0` — Success
|
|
- Non-zero — Error (check output for details)
|