typr_cli/lib.rs
1//! # TypR CLI
2//!
3//! Command-line interface, REPL, and LSP server for TypR - a typed superset of R.
4//!
5//! This crate provides the CLI layer for TypR, depending on `typr-core` for
6//! the core logic. It includes:
7//!
8//! - Command-line interface with project management commands
9//! - Interactive REPL with syntax highlighting
10//! - Language Server Protocol (LSP) server for IDE integration
11//! - Filesystem-based source and output handlers
12//!
13//! ## Usage
14//!
15//! ```bash
16//! # Create a new project
17//! typr new myproject
18//!
19//! # Check types
20//! typr check
21//!
22//! # Build to R
23//! typr build
24//!
25//! # Run
26//! typr run
27//!
28//! # Start REPL
29//! typr repl
30//!
31//! # Start LSP server
32//! typr lsp
33//! ```
34
35// Re-export typr-core for users who want access to core types
36pub use typr_core;
37
38// CLI modules
39pub mod cli;
40pub mod engine;
41pub mod fs_provider;
42pub mod io;
43pub mod lsp;
44pub mod lsp_parser;
45pub mod metaprogramming;
46pub mod project;
47pub mod repl;
48pub mod standard_library;
49
50// Re-export commonly used items
51pub use cli::start;
52pub use fs_provider::{FileSystemOutputHandler, FileSystemSourceProvider, NativePackageChecker};
53
54// Re-export typr-core abstractions
55pub use typr_core::{
56 CompileError, CompileOutput, Compiler, InMemoryOutputHandler, InMemorySourceProvider,
57 OutputHandler, PackageChecker, SourceProvider, StubPackageChecker, TranspileResult,
58};