Thank you for considering contributing to Twitter CLI! This document outlines the guidelines and processes for contributing to this project.
- Code of Conduct
- Getting Started
- Development Process
- Commit Guidelines
- Pull Request Process
- Rust Coding Standards
- Testing
- Documentation
This project follows our Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/your-username/twitter.git cd twitter -
Set up the development environment:
# Install Rust (if you haven't already) curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # Install required dependencies cargo build
If you are developing on Windows, install
vcpkgand native dependencies first:# If vcpkg is already installed, skip clone/bootstrap and set VCPKG_ROOT accordingly git clone https://github.com/microsoft/vcpkg cd vcpkg .\bootstrap-vcpkg.bat $env:VCPKG_ROOT = (Get-Location).Path [Environment]::SetEnvironmentVariable("VCPKG_ROOT", $env:VCPKG_ROOT, "User") $oldPath = [Environment]::GetEnvironmentVariable("Path", "User") if ($oldPath -notlike "*$env:VCPKG_ROOT*") { [Environment]::SetEnvironmentVariable("Path", "$oldPath;$env:VCPKG_ROOT", "User") } $env:PATH = "$env:VCPKG_ROOT;$env:PATH" vcpkg install sqlite3 curl cd ..
Then build as usual:
cargo build
If you still hit Windows linker errors after installing dependencies, run:
cargo clean cargo build -
Create a branch for your work:
git checkout -b feature/your-feature-name
- Make your changes in your feature branch
- Write or update tests as necessary
- Run tests locally to ensure they pass:
cargo test - Format your code using Rust's formatter:
cargo fmt
- Ensure your code passes the linter:
cargo clippy
This project follows Conventional Commits for all commit messages. This helps maintain a clear and structured commit history and enables automatic versioning and changelog generation.
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
- feat: A new feature
- fix: A bug fix
- docs: Documentation only changes
- style: Changes that do not affect the meaning of the code (formatting, etc)
- refactor: A code change that neither fixes a bug nor adds a feature
- perf: A code change that improves performance
- test: Adding missing tests or correcting existing tests
- chore: Changes to the build process or auxiliary tools
feat: add thread support via stdin piping
fix(auth): correctly handle expired tokens
Resolves issue #42
docs: update README with server mode instructions
- Update the README.md or documentation with details of changes if appropriate
- The PR should work on the main development branch
- Include tests that cover your changes if applicable
- Follow the commit message conventions
- Your PR will be reviewed by at least one maintainer
- Once approved, your PR will be merged
- Follow Rust's official style guide and idiomatic practices
- Use meaningful variable and function names
- Add comments for complex logic
- Keep functions small and focused on a single task
- Use proper error handling with Result types
- Write unit tests for new functionality
- Ensure all tests pass before submitting a PR
- Consider edge cases and error scenarios in your tests
- Update documentation for any new features or changes
- Use clear and concise language
- Include examples where appropriate
Thank you for contributing to Twitter CLI! Your efforts help make this tool better for everyone who wants to tweet without the distractions of twitter.com.