Crate chasm_cli

Crate chasm_cli 

Source
Expand description

Chat System Manager (CSM) - Library

A library for managing and merging chat sessions across workspaces and LLM providers.

§Supported Providers

  • VS Code Copilot Chat - Default, file-based sessions
  • Cursor - Cursor IDE chat sessions
  • Ollama - Local LLM inference
  • vLLM - High-performance LLM serving
  • Azure AI Foundry - Microsoft’s AI platform (Foundry Local)
  • LM Studio - Local model runner
  • LocalAI - Drop-in OpenAI replacement
  • Text Generation WebUI - oobabooga’s web interface
  • Jan.ai - Open source ChatGPT alternative
  • GPT4All - Local privacy-focused AI
  • Llamafile - Portable executable LLMs

§Agent Development Kit (Agency)

The Agency module provides a Rust-native framework for building AI agents:

use csm::Agency::{Agent, AgentBuilder, Runtime, Tool};

let agent = AgentBuilder::new("assistant")
    .instruction("You are a helpful assistant.")
    .model("gemini-2.5-flash")
    .tool(Tool::web_search())
    .build();

let runtime = Runtime::new()?;
runtime.register_agent(agent);
let result = runtime.run("assistant", "Hello!").await?;

Re-exports§

pub use cli::Cli;
pub use cli::Commands;
pub use cli::ExportCommands;
pub use cli::FetchCommands;
pub use cli::FindCommands;
pub use cli::GitCommands;
pub use cli::ImportCommands;
pub use cli::ListCommands;
pub use cli::MergeCommands;
pub use cli::MigrationCommands;
pub use cli::MoveCommands;
pub use cli::ProviderCommands;
pub use cli::RunCommands;
pub use cli::ShowCommands;
pub use database::ChatDatabase;
pub use database::ShareLinkInfo;
pub use database::ShareLinkParser;
pub use database::ShareLinkProvider;
pub use error::CsmError;
pub use models::ChatMessage;
pub use models::ChatRequest;
pub use models::ChatSession;
pub use models::ChatSessionIndex;
pub use models::ChatSessionIndexEntry;
pub use models::SessionWithPath;
pub use models::Workspace;
pub use models::WorkspaceJson;
pub use providers::CsmConfig;
pub use providers::GenericMessage;
pub use providers::GenericSession;
pub use providers::ProviderConfig;
pub use providers::ProviderRegistry;
pub use providers::ProviderType;
pub use storage::add_session_to_index;
pub use storage::backup_workspace_sessions;
pub use storage::is_vscode_running;
pub use storage::read_chat_session_index;
pub use storage::register_all_sessions_from_directory;
pub use storage::write_chat_session_index;
pub use workspace::decode_workspace_folder;
pub use workspace::discover_workspaces;
pub use workspace::find_workspace_by_path;
pub use workspace::get_chat_sessions_from_workspace;
pub use workspace::get_workspace_by_hash;
pub use workspace::get_workspace_by_path;
pub use workspace::get_workspace_storage_path;
pub use workspace::normalize_path;

Modules§

agency
Agent Development Kit (Agency) - Rust Implementation
browser
Browser authentication detection for web-based LLM providers
cli
CLI argument definitions using clap derive macros
commands
Command implementations
database
Universal Chat Session Database
error
Error types for csm
integrations
Life Integrations Module
mcp
MCP (Model Context Protocol) Server for Chat System Manager
models
Data models for VS Code chat sessions
providers
LLM Provider integrations for Chat System Manager
storage
VS Code storage (SQLite database) operations
tui
TUI (Text User Interface) module for interactive browsing of chat sessions
workspace
Workspace discovery and management