Deimos CLI is a command-line tool designed to manage and version different configurations for .NET projects. It allows developers to easily save, restore, and switch between various configuration setups, making it ideal for handling multiple development environments or scenarios.
- Project Mapping: Automatically discover and map .NET projects in a directory
- Configuration Management: Save and restore project configurations
- Template Support: Organize configurations into named templates
- Cross-Platform: Works on Windows, macOS, and Linux
- Simple CLI: Intuitive command-line interface
- .NET 10.0 SDK or later
-
Clone the repository:
git clone https://github.com/yourusername/deimos.git cd deimos -
Build the project:
dotnet build Deimos.Cli/Deimos.Cli.csproj
-
(Optional) Publish for easier distribution:
dotnet publish Deimos.Cli/Deimos.Cli.csproj -c Release -r <runtime-identifier> --self-contained
Replace
<runtime-identifier>with your target platform (e.g.,win-x64,linux-x64,osx-x64).
After building, you can run the CLI from the output directory or add it to your PATH.
Maps all available .NET projects in the specified directory.
Arguments:
sln-dir: The directory containing the project files (searches recursively for.csprojfiles)
Example:
deimos map /path/to/your/solutionLoads and saves the current configuration of a mapped project.
Arguments:
project-name: The name of the project (without.csprojextension)
Options:
--template-name: Name of the template (default:default)
Supported Configuration Files:
appsettings*.json(including environment-specific variants)launchSettings.jsonApp.config
Example:
deimos load-current-configuration MyApi --template-name developmentRestores a previously saved configuration to a project.
Arguments:
project-name: The name of the project
Options:
--template-name: Name of the template to restore (default:default)
Example:
deimos restore-project-configuration MyApi --template-name productionDeletes a saved configuration template.
Arguments:
project-name: The name of the project
Options:
--template-name: Name of the template to delete (default:default)
Example:
deimos delete-configuration MyApi --template-name old-config-
Map your projects:
deimos map . -
Save current configuration:
deimos load-current-configuration Deimos.Example.Api --template-name local-dev
-
Modify configuration files (e.g., change database connection strings, API keys, etc.)
-
Save another configuration:
deimos load-current-configuration Deimos.Example.Api --template-name staging
-
Switch between configurations:
deimos restore-project-configuration Deimos.Example.Api --template-name local-dev # or deimos restore-project-configuration Deimos.Example.Api --template-name staging
Configurations are stored in the user's application data directory:
- Windows:
%APPDATA%\deimos\ - macOS:
~/Library/Application Support/deimos/ - Linux:
~/.config/deimos/
The data is stored in JSON format in projects-map.json.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.