Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a50aaaa
[Add] Top-level `Getting Started`
Aug 24, 2025
48a52fe
[Add] Full `Getting Started` tutorial
Aug 24, 2025
23adbac
[Add] Tutorial to help learning how to manage environments
Aug 24, 2025
16efb9f
[Add] General statements security and installation
Aug 24, 2025
679e6da
[Add] CLI commands information
Aug 24, 2025
729371b
[Add] A set of instructions to report problems
Aug 24, 2025
28c5dbe
[Add] Appendices
Aug 24, 2025
bfce59d
[Add] Authoring a Hatch package (i.e. MCP server)
Aug 24, 2025
a206cae
[Add] Hatch's architecture diagram
Aug 24, 2025
e53d239
[Add] Developer documentation V1
Aug 24, 2025
c3fc724
[Add] Documentation top-level index
Aug 24, 2025
73e9db9
[Add] Hatch! Logos
Aug 24, 2025
bc037e2
[Update] Base README
Aug 24, 2025
3f2adb1
[Add] Basic Jekyll config
Aug 24, 2025
4b631d3
Update VERSION files in `dev` to v0.5.0.dev0
actions-user Aug 24, 2025
0f6ca30
Merge pull request #26 from LittleCoinCoin/docs/for-v0.4.x
LittleCoinCoin Aug 24, 2025
75b9b06
Update VERSION files in `dev` to v0.5.0.dev1
actions-user Aug 24, 2025
e277e29
[Fix] User documentation links
Aug 24, 2025
7670240
[Fix] Inexistant links
Aug 24, 2025
42debf7
[Remove] Duplicated image link
Aug 24, 2025
8ee893a
[Add - Minor] Advise for big image
Aug 24, 2025
e8c4f1b
[Add] Link to Hatch's github page
Aug 24, 2025
5067a72
Update VERSION files in `fix/docs-broken-links` to v0.5.1.dev1+build0
actions-user Aug 24, 2025
79f8add
Merge pull request #27 from LittleCoinCoin/fix/docs-broken-links
LittleCoinCoin Aug 24, 2025
82df55b
Update VERSION files in `dev` to v0.5.1.dev2
actions-user Aug 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 17 additions & 122 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,146 +1,41 @@
# Hatch

Hatch is the official package manager for the Hatch! ecosystem. It provides powerful tools for managing MCP server packages, environments, and interacting with the Hatch registry. Its primary objective is to service **[Hatchling](https://github.com/CrackingShells/Hatchling)** (interactive CLI-based chat application integrating local Large Language Models with MCP for tool calling), but can of course be included in other projects.
![Hatch Logo](./docs/resources/images/Logo/hatch_wide_dark_bg_transparent.png)

## Project Update Summary
Hatch is the package manager for the Hatch! ecosystem. The documentation in `docs/index.md` is the canonical, up-to-date entry point for users and contributors — this README is a short pointer to those resources.

**May 27, 2025**: Version 0.2.1 release of the Hatch package manager ecosystem! 🎉
## Quick links

- **Integration with Hatchling** for MCP servers package management while chatting with LLMs
- **Environment isolation system** for managing different sets of MCP server packages
- **Registry integration** for discovering and installing packages
- **Package template generation** for creating new Hatch MCP server packages
The major documentation entry points are:

## Features
- Documentation (canonical): `docs/index.md`
- Getting started (users): `docs/articles/users/GettingStarted.md`
- CLI reference: `docs/articles/users/CLIReference.md`
- Developer docs and architecture: `docs/articles/devs/index.md`

- **Environment Management**: Create isolated environments for different sets of MCP servers
- **Package Installation**: Install packages from the registry or local directories
- **Dependency Resolution**: Automatically resolve and manage package dependencies
- **Template Generation**: Create new Hatch MCP server package templates with a single command
- **Package Validation**: Ensure packages conform to the Hatch schema standards
But, really, just look at the site: <https://crackingshells.github.io/Hatch/>

## Installation
## Quick start

### Install from source

```bash
# From source
git clone https://github.com/CrackingShells/Hatch.git
cd Hatch
pip install -e .
```

## Usage

Hatch provides both a command-line interface and a Python API for integration into other tools like Hatchling.

### Command Line Interface

The table below summarizes the available commands with their arguments:

| Command | Description | Arguments | Example |
|---------|-------------|----------|---------|
| `create` | Create a new package template | `name` - Package name<br>`--dir, -d` - Target directory<br>`--description, -D` - Package description | `hatch create my-package --description "My awesome MCP server package"` |
| `validate` | Validate a package against schema | `package_dir` - Path to package directory | `hatch validate ./my-package` |
| `env list` | List all available environments | None | `hatch env list` |
| `env create` | Create a new environment | `name` - Environment name<br>`--description, -D` - Environment description | `hatch env create my-env --description "Environment for biology tools"` |
| `env use` | Set the current active environment | `name` - Environment name | `hatch env use my-env` |
| `env remove` | Remove an environment | `name` - Environment name | `hatch env remove my-env` |
| `env current` | Show the current environment | None | `hatch env current` |
| `package add` | Add a package to an environment | `package_path_or_name` - Path or name of package<br>`--env, -e` - Environment name<br>`--version, -v` - Package version | `hatch package add ./my-package --env my-env` <br> `hatch package add awesome-package --env my-env` |
| `package list` | List packages in an environment | `--env, -e` - Environment name | `hatch package list --env my-env` |
| `package remove` | Remove a package from an environment | `package_name` - Name of package to remove<br>`--env, -e` - Environment name | `hatch package remove awesome-package --env my-env` |

### Python API

```python
from hatch import HatchEnvironmentManager, create_package_template

# Create a new package template
create_package_template("my-package", target_dir="./packages", description="My awesome package")

# Manage environments
env_manager = HatchEnvironmentManager()
env_manager.create_environment("my-env", description="My testing environment")
env_manager.add_package("my-package", env_name="my-env")
packages = env_manager.list_packages("my-env")
```

## Creating Packages

Hatch makes it easy to create new MCP server packages:
### Create a package template

```bash
hatch create my-package --description "My MCP server package"
```

This creates a template with the following structure:

```
my-package/
├── __init__.py
├── server.py
├── hatch_metadata.json
└── README.md
```

Edit the `server.py` file to define your MCP tools:

```python
import logging
from hatchling import HatchMCP

# Initialize MCP server with metadata
hatch_mcp = HatchMCP("my-package",
origin_citation="Your Name, 'Original Software', Year",
mcp_citation="Your Name, 'MCP Implementation', Year")

@hatch_mcp.tool()
def my_tool(param1: str, param2: int) -> str:
"""Description of what your tool does.

Args:
param1 (str): First parameter description.
param2 (int): Second parameter description.

Returns:
str: Description of the return value.
"""
hatch_mcp.logger.info(f"Tool called with {param1} and {param2}")
return f"Processed {param1} with value {param2}"

if __name__ == "__main__":
hatch_mcp.run()
```

## Dependencies

Hatch depends on the following Python packages:

- jsonschema 4.0.0 or higher
- requests 2.25.0 or higher
- packaging 20.0 or higher
- [Hatch-Validator](https://github.com/CrackingShells/Hatch-Validator)

## Development

### Project Structure

- `hatch/`: Core package source code
- `cli_hatch.py`: CLI implementation
- `environment_manager.py`: Environment management functionality
- `package_loader.py`: Package loading and installation
- `registry_retriever.py`: Registry interaction
- `registry_explorer.py`: Package search and discovery
- `template_generator.py`: Package template generation

## Related Repositories

Hatch is part of the larger Hatch! ecosystem which includes:
## Contributing and help

- **[Hatchling](https://github.com/CrackingShells/Hatchling)**: Interactive CLI-based chat application integrating local Large Language Models with MCP for tool calling
- **[Hatch-Schemas](https://github.com/CrackingShells/Hatch-Schemas)**: JSON schemas for package metadata and validation
- **[Hatch-Validator](https://github.com/CrackingShells/Hatch-Validator)**: Validation tools for Hatch packages
- **[Hatch-Registry](https://github.com/CrackingShells/Hatch-Registry)**: Package registry for Hatch packages
- Read developer onboarding and contribution guides in `docs/articles/devs/`
- Report issues or feature requests on the GitHub repository: <https://github.com/CrackingShells/Hatch/issues>

## License

This project is licensed under the [GNU Affero General Public License v3](./LICENSE)
This project is licensed under the GNU Affero General Public License v3 — see `LICENSE` for details.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.4
0.5.1.dev2
8 changes: 4 additions & 4 deletions VERSION.meta
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# The companion VERSION file contains the simple format for setuptools

MAJOR=0
MINOR=4
PATCH=4
DEV_NUMBER=
MINOR=5
PATCH=1
DEV_NUMBER=2
BUILD_NUMBER=
BRANCH=main
BRANCH=dev
2 changes: 2 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
theme: minima
repository: CrackingShells/Hatch
Loading