$ brew tap josefdolezal/formulae
$ brew install xcman
Compiling from source
$ git clone https://github.com/josefdolezal/xcman.git
$ cd xcman
$ swift build
Usage
xcman supports managing of both file templates and code snippets. These functions are namespaced using templates and snippets subcommands. Run the tool with --help option to see documentation.
Templates
Templates are managed using caching git repositories inside your home directory. For each installed group of templates, new folder is created inside Xcode templates directory. This new folder contains links to your fetched git folder.
Installs templates from given repository to Xcode. By default, given repository is interpreted as GitHub handle. If you would like to install from other source, use --use-url flag. Templates group name visible in Xcode may configured using --name option.
Examples:
# Install templates from GitHub repository with custom group name
$ xcman templates install --name "My Templates" me/my-templates
# Install templates from arbitrary url
$ xcman templates install --use-url https://gitlab.com/company/repo.git
list
$ xcman templates list
Lists all installed templates groups.
remove
$ xcman templates remove <group>
Removes given templates group from Xcode.
Snippets
Snippets are managed similary as file templates using repository cache inside your home directory. Xcode currently does not support structured format for snippets, so the file system structure is flat.
install
$ xcman snippets install [--use-url] <repo>
Installs templates from given GitHub repository. By default, the repository argument is interpreted as GitHub handle. Use --use-url to install templates from arbitrary git repository.
xcmanis an command line tool written in Swift for managing Xcode file templates and code snippets.Move from this:
To this:
Install
Brew
Compiling from source
Usage
xcmansupports managing of both file templates and code snippets. These functions are namespaced usingtemplatesandsnippetssubcommands. Run the tool with--helpoption to see documentation.Templates
Templates are managed using caching git repositories inside your home directory. For each installed group of templates, new folder is created inside Xcode templates directory. This new folder contains links to your fetched git folder.
Supported commands:
installInstalls templates from given repository to Xcode. By default, given repository is interpreted as GitHub handle. If you would like to install from other source, use
--use-urlflag. Templates group name visible in Xcode may configured using--nameoption.Examples:
listLists all installed templates groups.
removeRemoves given templates group from Xcode.
Snippets
Snippets are managed similary as file templates using repository cache inside your home directory. Xcode currently does not support structured format for snippets, so the file system structure is flat.
installInstalls templates from given GitHub repository. By default, the repository argument is interpreted as GitHub handle. Use
--use-urlto install templates from arbitrary git repository.Dependencies
This tool is build on top following dependencies:
License
This repository is licensed under MIT.