Thank you for considering contributing to the Analog project! We appreciate your interest in helping to improve the project. Before making any contributions, please take a moment to review the guidelines outlined below.
To contribute to Analog, follow these steps:
-
Fork the Repository: Fork the Analog repository to your own GitHub account by clicking the "Fork" button at the top right corner of the repository page.
-
Clone the Repository: Clone your forked repository to your local machine using Git:
git clone https://github.com/vish9812/analog.git- Install Dependencies: Navigate to the project directory and install the required dependencies:
cd analog
task install-
Make Changes: Make your desired changes to the codebase. Ensure that your changes follow the project's coding conventions and guidelines.
-
Test Your Changes: Test your changes thoroughly to ensure they work as expected. Run existing tests, and add new tests.
-
Submit a Pull Request: Go to the GitHub page of your forked repository, switch to the branch containing your changes, and click the "New Pull Request" button. Fill out the pull request template with details about your changes, and submit the pull request.
When contributing to Analog, please adhere to the following guidelines:
- Follow the coding style and conventions used throughout the project.
- Provide clear and descriptive commit messages.
- Include tests for new functionality or changes whenever possible.
- Ensure that your code is well-documented and includes comments where necessary.
- Respect the opinions and decisions of project maintainers and other contributors.
- Bun: Bun is used for both running the app and managing the npm packages.
- Solid.js: Solid.js is used as the frontend library for UI development.
- pnpm: Version >= 8 is required for managing npm packages.
- Node.js: Version >= 20.9.0 is required. Consider using a node package manager like nvm to manage node versions.
- Typescript: Typescript is used for both UI and CLI.
- Taskfile: Taskfile is used to automate tasks like installing the npm packages and building the app.
To run and test the application, you can use the commands provided in the package.json file or Taskfile.yml.
From the root directory:
task runOr from the ui directory:
pnpm startThis will start the UI in development mode, typically on port 3000.
bun run ./cmd/src/main.ts --helpFor specific CLI commands:
# Summary command
bun run ./cmd/src/main.ts --help --summary- Install Dependencies:
task install- Installs all npm packages for both UI and CLI - Run Tests:
task test- Runs all tests - Run UI:
task run- Runs the UI in development mode - Build:
task build- Builds the UI and CLI components- This builds the UI and creates a symlink to the UI's dist folder for the CLI's web command
- It also updates the web import references automatically
To generate binaries for different platforms:
task artifactsThis command:
- Builds the application (if not already built)
- Creates platform-specific binaries for Linux, Windows, and macOS
- Packages them with the README.md file
- Creates archives (.tar.gz for Linux/macOS, .zip for Windows)
Once you've built the application and generated binaries, you can run them directly:
./analog --webWith custom port:
./analog --web --port 8080./analog --help --summaryIf you need any assistance or have questions about contributing to Analog, feel free to reach out to us via GitHub issues or other communication channels. We welcome your feedback and suggestions for improving the project.
Thank you for your contributions and support in making Analog better for everyone!