Thank you for your interest in contributing to the Buttondown CLI!
-
Clone the repository:
git clone https://github.com/your-username/buttondown-cli.git cd buttondown-cli -
Install dependencies:
bun install
-
Run in development mode:
bun dev
-
Build the project:
bun build
-
Link for local testing:
bun link
src/- Source codeapi.ts- Buttondown API clientsync.ts- Sync manager for filescli.tsx- Main CLI entry pointcommands/- CLI commandscomponents/- React components for Ink UI
- Create a new file in
src/commands/(see existing commands for reference) - Implement your command as a React component using Ink
- Add the command to
src/cli.tsx - Update the help text and README.md to document the command
- Keep API requests simple and use proper error handling
- Follow REST best practices
- Support API pagination for large data sets
Currently, the project uses manual testing. Automated tests will be added in the future.
- Fork the repo
- Create a feature branch
- Add your changes
- Run
npm run buildto make sure everything builds correctly - Submit a PR
- Use TypeScript for all new code
- Follow existing code style (indent with 2 spaces)
- Use async/await for asynchronous code
- Document public functions and interfaces
By contributing, you agree that your contributions will be licensed under the project's MIT License.
(This only applies to members of the @buttondown organization. If you're not one of them and need or want a new version, please open an issue!)
Be sure to bump the version in package.json and package-lock.json to the "right version", and then:
$ bun publishNPM will ask for authentication; use the credentials for the engineering@ account, which exists in the 1Password vault.