cli/CONTRIBUTING.md

34 lines
675 B
Markdown
Raw Normal View History

2020-10-01 18:57:23 +00:00
# Contribute to the Railway CLI
## Prerequisites
- [Rust](https://www.rust-lang.org/tools/install)
- [CMake](https://cmake.org/install/)
2020-10-01 18:57:23 +00:00
OR
2020-10-01 18:57:23 +00:00
- [Nix](https://nixos.org/download.html)
2020-10-01 18:57:23 +00:00
2024-08-29 00:08:46 +00:00
## Setting Up with Nix
2024-08-29 00:08:46 +00:00
Use `nix-shell` to enter an environment with all necessary dependencies.
2020-10-01 18:57:23 +00:00
2024-08-29 00:08:46 +00:00
## Running and Building
2024-08-29 00:08:46 +00:00
- Run the binary with: `cargo run -- <args>`
- Build the binary with: `cargo build --release`
## Generating the Schema
Install `graphql-client` with cargo:
```sh
cargo install graphql_client_cli
```
Then, run the following command to generate the schema:
```sh
graphql-client introspect-schema https://backboard.railway.com/graphql/v2 > src/gql/schema.json
```