Skip to main content

WorkspaceManager

Struct WorkspaceManager 

Source
pub struct WorkspaceManager { /* private fields */ }

Implementations§

Source§

impl WorkspaceManager

Source

pub async fn new(config_path: PathBuf) -> Result<Self>

Source

pub async fn new_with_root_override( config_path: PathBuf, root_override: Option<PathBuf>, ) -> Result<Self>

Source

pub async fn init_workspace(&mut self, name: &str, root: &Path) -> Result<()>

Source

pub async fn discover_repositories( &self, path: &Path, depth: usize, ) -> Result<Vec<PathBuf>>

Source

pub async fn add_discovered_repositories( &mut self, repo_paths: &[PathBuf], ) -> Result<()>

Source

pub async fn show_status( &self, dirty_only: bool, format: &str, group: Option<&str>, ) -> Result<()>

Source

pub async fn execute_command( &self, command: &str, repos: Option<&str>, group: Option<&str>, parallel: bool, ) -> Result<()>

Source

pub fn get_workspace_root(&self) -> &PathBuf

Source

pub fn get_config_path(&self) -> &PathBuf

Source

pub fn config(&self) -> &WorkspaceConfig

Source

pub fn config_mut(&mut self) -> &mut WorkspaceConfig

Source

pub async fn add_repository(&mut self, repo: Repository) -> Result<()>

Source

pub fn get_config(&self) -> &WorkspaceConfig

Source

pub fn get_template_manager(&self) -> &TemplateManager

Source

pub async fn scan_repositories( &mut self, scan_path: &Path, depth: usize, import: bool, restore: bool, clean: bool, ) -> Result<()>

Scan workspace for repositories with new hierarchical display and sync options

Source

pub async fn sync_repositories( &self, fetch_only: bool, prune: bool, save_dirty: bool, group: Option<&str>, ) -> Result<()>

Enhanced sync repositories with dirty handling

Source

pub async fn save_config(&self) -> Result<()>

Source

pub async fn init_config( &mut self, name: Option<&str>, root: Option<&Path>, auto_discover: bool, ) -> Result<()>

Source

pub async fn edit_config(&self, direct: bool) -> Result<()>

Source

pub async fn show_config( &self, format: &str, section: Option<&str>, ) -> Result<()>

Source

pub async fn validate_config( &self, check_paths: bool, check_remotes: bool, check_apps: bool, ) -> Result<()>

Source

pub async fn configure_app_for_repo( &mut self, repo_name: &str, app: &str, template: &str, ) -> Result<()>

Configure an app for a repository

Source

pub fn list_apps_for_repo( &self, repo_name: &str, ) -> Result<Vec<(String, String)>>

List configured apps for a repository

Source

pub async fn get_repos_with_apps_and_status( &self, ) -> Result<Vec<RepoWithStatus>>

Get repositories that have at least one app configured, with git status

Source

pub fn list_repos_with_app(&self, app: &str) -> Vec<(&Repository, String)>

List repositories configured with a specific app

Source

pub async fn init_templates(&self) -> Result<()>

Initialize default templates if they don’t exist

Source

pub async fn list_templates(&self, app: &str) -> Result<Vec<String>>

List available templates for an app

Source

pub async fn create_template( &self, app: &str, template_name: &str, from_template: &str, ) -> Result<()>

Create a new template from an existing one

Source

pub async fn delete_template( &self, app: &str, template_name: &str, ) -> Result<()>

Delete a template

Source

pub async fn show_app_configurations(&self) -> Result<()>

Show configured apps for all repositories

Source

pub async fn get_default_template(&self, app: &str) -> Result<String>

Get the default template content for an app

Source

pub async fn save_template( &self, app: &str, name: &str, content: &str, ) -> Result<()>

Save a template with content

Source

pub async fn update_default_templates(&self, apps: Vec<String>) -> Result<()>

Update default templates with current bundled versions

Source

pub async fn smart_open_repository(&self, repo_name: &str) -> Result<()>

Smart open repository - shows app choice menu with configured and available apps

Source

pub async fn open_repo_with_app(&self, repo_name: &str, app: &str) -> Result<()>

Open a repository with a configured app

Source

pub async fn open_repo_with_app_options( &self, repo_name: &str, app: &str, no_itermocil: bool, ) -> Result<()>

Open a repository with a configured app with options

Source

pub fn get_current_app_states(&self, repo_name: &str) -> Result<AppConfigState>

Get current app configuration states for a repository

Source

pub async fn remove_app_for_repo( &mut self, repo_name: &str, app: &str, ) -> Result<()>

Remove app configuration for a repository

Source

pub async fn cleanup_app_files(&self, repo_name: &str, app: &str) -> Result<()>

Clean up app-generated files for a repository

Source

pub async fn configure_multiple_apps( &mut self, repo_name: &str, app_selections: Vec<AppSelection>, ) -> Result<Vec<String>>

Configure multiple apps for a repository

Source

pub async fn create_backup( &self, output_dir: Option<PathBuf>, custom_name: Option<String>, ) -> Result<PathBuf>

Create a backup archive of all configuration files

Source

pub async fn factory_reset(&mut self, force: bool) -> Result<()>

Factory reset - clear all configuration and reinitialize

Source

pub async fn reset_repositories(&mut self, force: bool) -> Result<()>

Reset repository configuration only (clear all tracked repositories)

Source

pub async fn factory_reset_with_options( &mut self, force: bool, skip_final_confirmation: bool, ) -> Result<()>

Source

pub fn get_repository(&self, name: &str) -> Option<&Repository>

Get a repository by name

Source

pub fn get_repository_flexible(&self, name: &str) -> Option<&Repository>

Get a repository by flexible name lookup (supports owner/repo format)

Source

pub fn list_repositories(&self) -> &[Repository]

List all repositories

Source

pub async fn remove_repository(&mut self, name: &str) -> Result<()>

Remove a repository from the workspace

Source

pub async fn is_app_available(&self, app_name: &str) -> bool

Check if an app is available on the system

Source

pub async fn get_available_apps(&self) -> Vec<String>

Get all available apps on the system

Source

pub async fn get_repository_cache(&mut self) -> Result<&RepositoryCache>

Get repository cache (lazy initialization if needed)

Source

pub async fn get_git_status_cache(&mut self) -> Result<&GitStatusCache>

Get git status cache (lazy initialization if needed)

Source

pub async fn refresh_repository_cache(&mut self) -> Result<()>

Refresh repository cache from current configuration

Source

pub async fn update_git_status_cache( &mut self, repo_names: &[String], ) -> Result<()>

Update git status cache for repositories (background operation)

Source

pub async fn get_quick_launcher(&self) -> Result<QuickLauncher>

Get quick launcher for fast repository selection

Source

pub fn get_main_menu_page_size(&self) -> usize

Get page size for main menu

Source

pub fn get_repository_list_page_size(&self) -> usize

Get page size for repository list

Source

pub fn get_quick_launch_page_size(&self) -> usize

Get page size for quick launch

Source

pub fn get_app_selection_page_size(&self) -> usize

Get page size for app selection

Source

pub fn get_git_search_results_page_size(&self) -> usize

Get page size for git search results

Source

pub fn get_management_menus_page_size(&self) -> usize

Get page size for management menus

Source

pub fn get_app_installer_page_size(&self) -> usize

Get page size for app installer

Source

pub async fn list_available_backups(&self) -> Result<Vec<BackupInfo>>

List available backup files in the default backup directory

Source

pub async fn restore_from_backup( &mut self, backup_path: Option<PathBuf>, force: bool, ) -> Result<()>

Restore configuration from a backup file

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,