fastsandpm.cli API
Command-line interface for FastSandPM.
This module provides the main entry point for the fspm command-line tool.
It handles dependency resolution and installation for HDL/RTL projects.
Usage:
fspm [OPTIONS]
Options:
-m, --manifest PATH: Path to manifest file (default: search up directory tree)-o, --output PATH: Output directory for installed libraries (default: ./lib)-c, --clean: Clean conflicting directories during installation--no-clean: Don’t clean conflicting directories (default)--optional GROUPS: Comma-separated list of optional dependency groups to install
Example:
# Install dependencies from proj.toml in current or parent directory
fspm
# Install from a specific manifest file
fspm --manifest /path/to/proj.toml
# Install to a custom output directory
fspm --output ./vendor
# Install with optional dependencies
fspm --optional dev,test
# Clean conflicting directories
fspm --clean
Functions
- fastsandpm.cli.create_parser() ArgumentParser[source]
Create the argument parser for the fspm CLI.
- Returns:
Configured ArgumentParser instance.
- fastsandpm.cli.find_manifest(start_path: Path | None = None) Path[source]
Search up the directory tree to find a manifest file.
Starting from the given path (or current working directory if not provided), searches up through parent directories until a proj.toml file is found.
- Parameters:
start_path – The directory to start searching from. Defaults to cwd.
- Returns:
The path to the directory containing the manifest file.
- Raises:
ManifestNotFoundError – If no manifest file is found in any parent directory.
- fastsandpm.cli.main(args: list[str] | None = None) int[source]
Main entry point for the fspm CLI.
- Parameters:
args – Command-line arguments. Defaults to sys.argv[1:].
- Returns:
Exit code (0 for success, non-zero for errors).