A project-configurable command palette for common dev workflows
Project description
Sindri
A project-configurable command palette for common dev workflows. Sindri provides an interactive TUI (Text User Interface) and CLI for managing project-specific commands, making it easy to run setup, build, test, and deployment tasks.
Features
- ๐ฏ Interactive TUI: Beautiful terminal interface with search, filtering, and command details
- ๐ Project-Specific Config: Each repository defines its own commands via
sindri.toml - ๐ Async Execution: Run commands asynchronously with live output streaming
- ๐ Parallel Execution: Run multiple commands concurrently
- ๐ Multi-Stream Logs: View logs from multiple commands in split panes
- โ๏ธ Rich Configuration: Support for dependencies, timeouts, retries, watch mode, and more
- ๐ณ Docker Support: Built-in support for Docker and Docker Compose workflows
- ๐ฆ Global Installation: Install once via
pipx, use in any project
Quickstart
Installation
pipx install sindri
Or install from source:
git clone https://github.com/yourusername/sindri.git
cd sindri
pipx install -e .
Initialize a Project
Navigate to your project directory and run:
sindri init
This creates a sindri.toml file with example commands. Edit it to match your project's needs.
Use Sindri
Open the interactive menu:
sindri
Or run commands directly:
sindri run setup
sindri run start --parallel
Configuration
Sindri uses TOML configuration files. The config file is discovered by searching upwards from the current working directory for sindri.toml or .sindri.toml.
Basic Configuration
version = "1.0"
project_name = "my-project"
[[commands]]
id = "setup"
title = "Setup Project"
description = "Install dependencies"
shell = "pip install -r requirements.txt"
tags = ["setup", "install"]
[[commands]]
id = "start"
title = "Start Service"
description = "Start the application"
shell = "python -m myproject.main"
tags = ["run", "start"]
Advanced Features
Command Dependencies
[[commands]]
id = "restart"
title = "Restart Service"
shell = "pkill -f app && sleep 1 && python -m app"
dependencies = { before = ["stop"] }
Watch Mode
[[commands]]
id = "tail-logs"
title = "Tail Logs"
shell = "tail -f logs/app.log"
watch = true
Environment Variables
[[commands]]
id = "run-dev"
title = "Run in Development Mode"
shell = "python -m app"
env = { DEBUG = "1", ENV = "development" }
Timeouts and Retries
[[commands]]
id = "long-task"
title = "Long Running Task"
shell = "python long_task.py"
timeout = 300 # 5 minutes
retries = 3
Command Groups
[[groups]]
id = "setup"
title = "Setup"
description = "Setup commands"
order = 1
commands = ["setup", "install"]
Docker Compose Profiles
[[compose_profiles]]
id = "dev"
title = "Development Profile"
profiles = ["dev"]
command = "up"
flags = ["-d"]
See examples/example-project/sindri.toml for a complete example.
CLI Commands
sindri init
Initialize a new Sindri configuration file in the current directory.
sindri init
sindri init --config custom.toml
sindri run <command-id>
Run one or more commands non-interactively.
sindri run setup
sindri run start web api --parallel
sindri run test --timeout 60 --retries 2
Options:
--config, -c: Path to config file--dry-run: Show what would be executed without running--verbose, -v: Enable verbose logging--json-logs: Output logs in JSON format--timeout, -t: Timeout in seconds--retries, -r: Number of retries on failure--parallel, -p: Run multiple commands in parallel
sindri list
List all available commands.
sindri list
sindri (default)
Open the interactive TUI menu.
sindri
sindri --config custom.toml
Options:
--config, -c: Path to config file--verbose, -v: Enable verbose logging--json-logs: Output logs in JSON format
TUI Navigation
The interactive TUI provides the following keybindings:
Ctrl+For/: Focus search inputEnter: Run selected commandโ/โ: Navigate command listTab: Switch between panelsCtrl+CorQ: Quit
Recipes
Docker Workflow
[[commands]]
id = "docker-build"
title = "Build Docker Image"
shell = "docker build -t myapp:latest ."
tags = ["docker", "build"]
[[commands]]
id = "docker-run"
title = "Run Docker Container"
shell = "docker run -p 8000:8000 myapp:latest"
tags = ["docker", "run"]
Docker Compose Workflow
[[commands]]
id = "compose-up"
title = "Start Services"
shell = "docker compose up -d"
tags = ["docker", "compose"]
[[commands]]
id = "compose-logs"
title = "View Logs"
shell = "docker compose logs -f"
tags = ["docker", "compose", "logs"]
watch = true
Python Virtual Environment
[[commands]]
id = "setup"
title = "Setup Virtual Environment"
shell = "python -m venv venv && source venv/bin/activate && pip install -r requirements.txt"
tags = ["setup"]
[[commands]]
id = "activate"
title = "Activate Virtual Environment"
shell = "source venv/bin/activate"
tags = ["setup"]
Node.js Project
[[commands]]
id = "install"
title = "Install Dependencies"
shell = "npm install"
tags = ["setup", "install"]
[[commands]]
id = "dev"
title = "Start Dev Server"
shell = "npm run dev"
tags = ["run", "dev"]
[[commands]]
id = "build"
title = "Build for Production"
shell = "npm run build"
tags = ["build"]
Build Executable (PyInstaller)
[[commands]]
id = "build-exe"
title = "Build Executable"
shell = "pyinstaller --onefile --name myapp src/main.py"
tags = ["build", "executable"]
Test Suite with Coverage
[[commands]]
id = "test"
title = "Run Tests"
shell = "pytest tests/"
tags = ["test"]
[[commands]]
id = "test-cov"
title = "Run Tests with Coverage"
shell = "pytest --cov=myproject --cov-report=html tests/"
tags = ["test", "coverage"]
Screenshots
Note: Screenshots will be added here once the TUI is finalized.
Main Screen
Command Execution
Multi-Stream Logs
Architecture
Sindri is built with:
- Typer: CLI framework
- Textual: TUI framework
- Pydantic: Configuration validation
- asyncio: Async command execution
- structlog: Structured logging
Project Structure
sindri/
โโโ sindri/
โ โโโ cli.py # CLI interface
โ โโโ config.py # Config discovery and schema
โ โโโ runner.py # Async execution engine
โ โโโ logging.py # Structured logging
โ โโโ utils.py # Utility functions
โ โโโ tui/ # TUI components
โ โโโ app.py # Main TUI app
โ โโโ screens.py # TUI screens
โ โโโ widgets.py # TUI widgets
โโโ tests/ # Test suite
โโโ examples/ # Example configurations
โโโ pyproject.toml # Project configuration
Development
Setup
git clone https://github.com/yourusername/sindri.git
cd sindri
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -e ".[dev]"
Running Tests
pytest
pytest --cov=sindri
Building
python -m build
Platform Support
- โ Linux: Full support
- โ macOS: Full support
- โ ๏ธ Windows: Supported with some limitations:
- Shell command syntax may differ (use
cmd.exesyntax or PowerShell) - Some Unix commands may not be available
- Path separators are handled automatically
- Shell command syntax may differ (use
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - see LICENSE file for details.
Acknowledgments
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sindri_dev-0.1.1.tar.gz.
File metadata
- Download URL: sindri_dev-0.1.1.tar.gz
- Upload date:
- Size: 69.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98ba08d6f1340385eed2f5810eebab6ae8d23892237d89038ee967f416563c5f
|
|
| MD5 |
ae4f91dfc4329b4af4eaa67a3ef882b9
|
|
| BLAKE2b-256 |
bed5b2fa09861187434a86ecd004c9f6ac1101e2b42994d90be0ea6dc7bc7479
|
File details
Details for the file sindri_dev-0.1.1-py3-none-any.whl.
File metadata
- Download URL: sindri_dev-0.1.1-py3-none-any.whl
- Upload date:
- Size: 77.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d77498ce265ebcac347ff1d3d4e4f3ed0d2317a63f731518b588a07e9896ef6
|
|
| MD5 |
6085f88c3dc0087739eae0cdde0823f5
|
|
| BLAKE2b-256 |
6b237711e413cbc189975fd9a2a1581e674559774fa84d345f6ad845a88bdc2d
|