Interactive Shell User Guide
The dartfx-workspace package includes a powerful, interactive bash-like shell designed for managing FAIR data workspaces. It combines standard filesystem operations with deep integration into the RDF Knowledge Base.
Starting the Shell
To enter the interactive shell, run the following command from your terminal:
uv run dartfx-workspace [path]
If no path is provided, it defaults to the current directory.
Core Workspace Commands
init
Initializes a new workspace by creating the .dartfx metadata directory.
Flags:
--dirs: Automatically creates a standard recommended directory structure (data/,docs/,code/,meta/,work/).
scan
Synchronizes the workspace with the Knowledge Base.
Context-Aware: If no path is provided, it scans the current directory and below.
Targeted: You can specify a target path (e.g.,
scan data/raw) to re-index only that folder.Clean / Refresh: Use
scan --clean(orscan --refresh) to wipe existing metadata and start a fresh full-workspace scan.
about
Displays detailed technical and FAIR metadata for a specific resource.
Interactive: Includes a subtle 📂 icon next to the resource UUID. Cmd+Click (or Ctrl+Click) on this icon to immediately open the resource’s mirrored metadata storage directory in your system file manager.
Content: Shows Blake3 hashes, record counts (for data files), SQL/Shell types (for code), and linked FAIR IDs.
stats
Displays a comprehensive breakdown of the workspace, including:
A File Type Breakdown table showing counts and total disk space per type (data, code, metadata, etc.).
A Registration Summary comparing “Registered” vs. “Unregistered” files.
Standard Filesystem Operations
The shell provides standard utilities that operate relative to the workspace root (/):
cd <dir>: Change the current working directory.pwd: Print the current working directory relative to the workspace root.mkdir <dir>: Create new directories.mv <src> <dst>: Move or rename files/directories. Automatically updates stable UUID mappings in the Knowledge Base.cp <src> <dst>: Copy files or directories.rm <path>: Remove files or directories. Recursively cleans up Knowledge Base records and mirrored storage for the target path.
Utility Commands
clear: Clears the terminal screen.helpor?: Displays a summary of all available commands.exitorquit: Terminate the shell session. (Includes a safety confirmation prompt).
Visual Legend
✔ (Green): File is indexed and registered in the RDF Knowledge Base.
✘ (Red): File exists on disk but is not yet registered (run
scanto index).[dim](type): The detected classification of the file (e.g.,data,code).Bold Blue: Indicates a directory.