____ _ ___ _ ___
/ ___| |__ |_ _| | |_ _|
| | | '_ \ | || | | |
| |___| | | || || |___ | |
\____|_| |_|___|_____|___|
ChILI handles Intelligent Line Interactions
chili is both a powerful CLI application and a reusable library for interacting with the ChRIS ecosystem. It serves as the "Controller" layer in the ChRIS interface stack, bridging the gap between raw business logic (salsa) and user presentation.
This tool is designed for developers and power-users who want to script and control a ChRIS instance from the comfort of their terminal. It maintains a persistent local context, remembering your connection details and current location within the ChRIS filesystem.
chili implements the controller layer of the stack:
chili(Library & CLI):- Commands (
src/commands): Headless controllers that execute logic (viasalsa) and return typed Models. These are consumable by other apps likechell. - Models (
src/models): Explicit interfaces (e.g.,Plugin,Feed,ListingItem) defining data structures. - Views (
src/views): Pure functions that render Models into formatted strings/tables. - CLI (
src/chefs,src/index.ts): The command-line entry point that orchestrates Commands and Views.
- Commands (
salsa(Logic): The Shared Application Logic and Service Assets layer. It defines high-level "intents".cumin(Infrastructure): The state and operations layer. It manages authentication, persistent context, and low-level API interactions.
ChILI uses a "Cooking" metaphor for its development workflow. The Makefile in the chili/ directory orchestrates the entire ecosystem (cumin, salsa, chili).
To set up the entire environment from scratch (Clone -> Install -> Build -> Test -> Link), simply run:
Note: It is highly recommended to use NVM (Node Version Manager) to manage your Node.js installation. This allows
make mealto link packages globally without requiringsudo.
cd chili
make mealYou can also run individual steps:
make shop: Clones thecuminandsalsarepositories if they are missing.make prep: Installs NPM dependencies for all projects (npm install).make cook: Builds (compiles) all projects (npm run build).make taste: Runs the tests (npm test).make serve: Links the packages globally so you can runchilianywhere.make scrub: Cleans up build artifacts andnode_modules.
- Context-Aware: Remembers your active server, user, and working directory.
- Chefs Shell: Familiar Unix-like commands (
chili chefs ls,cd,pwd,mkdir,touch,upload) for browsing and managing the ChRIS filesystem. - Library Mode: Exports strict-typed commands and views for consumption by
chell. - Recursive Upload: Robust directory uploading via
chili chefs upload.
-
Connect to ChRIS:
chili connect <URL> --user <USERNAME> --password <PASSWORD>
-
Explore with Chefs:
# List root directory chili chefs ls / # Create a folder chili chefs mkdir /home/user/new_project
-
Upload Data:
# Upload local directory recursively chili chefs upload ./local_data /home/user/study/ -
Plugins & Feeds:
chili plugins list chili feeds list
-30-