From 0dae751545a28afa54eb55d3b7bba785d95d4c21 Mon Sep 17 00:00:00 2001 From: RoomWithOutRoof Date: Wed, 15 Apr 2026 20:23:19 +0800 Subject: [PATCH] Add quickstart guide and CONTRIBUTING.md --- CONTRIBUTING.md | 62 +++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 60 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 122 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..bba7b7a --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,62 @@ +# Contributing to Tinker + +Good day! Thank you for your interest in contributing to Tinker. + +We welcome contributions! Please follow these guidelines to help us maintain the project quality. + +## Development Setup + +```bash +# Clone the repository +git clone https://github.com/thinking-machines-lab/tinker.git +cd tinker + +# Install dependencies +uv sync + +# Activate virtual environment +source .venv/bin/activate + +# Run tests +pytest +``` + +## Code Style + +- We use [ruff](https://docs.astral.sh/ruff/) for linting and formatting +- Run `ruff check .` to lint +- Run `ruff format .` to format +- Type hints are required via mypy + +## Submitting Changes + +1. Fork the repository +2. Create a feature branch (`git checkout -b feature/your-feature`) +3. Make your changes and add tests +4. Run the test suite +5. Commit with clear messages +6. Push to your fork +7. Open a Pull Request + +## Pull Request Guidelines + +- PRs should pass all tests +- Include a clear description of changes +- Link any related issues + +## Testing + +```bash +# Run all tests +pytest + +# Run specific test file +pytest tests/test_models.py + +# Run with coverage +pytest --cov=tinker +``` + +## License + +By contributing, you agree that your contributions will be licensed under the Apache-2.0 license. \ No newline at end of file diff --git a/README.md b/README.md index 6076e51..1e78327 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,63 @@ Documentation: tinker-docs.thinkingmachines.ai + +## Installation + +```bash +# PyPI +pip install tinker + +# uv (recommended) +uv add tinker +``` + +## Quickstart + +### CLI + +```bash +# Train a model +tinker train --name my-model --training-file training_data.jsonl + +# List your models +tinker models list + +# Get model details +tinker models get +``` + +### Python SDK + +```python +from tinker import Tinker + +# Initialize client +client = Tinker(api_key="your-api-key") + +# Create a training run +run = client.training.create( + name="my-model", + training_file="training_data.jsonl", +) +print(f"Training started: {run.id}") +``` + +### Using the API + +```bash +# Set API key +export TINKER_API_KEY="your-api-key" + +# Or use with Python +from tinker import Tinker +client = Tinker() # Automatically reads TINKER_API_KEY +``` + +## Documentation + +Full documentation available at [tinker-docs.thinkingmachines.ai](http://tinker-docs.thinkingmachines.ai/) + +## License + +[Apache-2.0](LICENSE) \ No newline at end of file