# crates-readme-table





Update your README.md with your crates.io crates
**[Full documentation →](https://docs.rs/crates-readme-table/)**
## Quick start
```sh
cargo install crates-readme-table
```
## Usage
```rust
use crates_readme_table::{
CRATES_IO_USER_AGENT, build_crates_table, get_all_crates, update_readme_with_table,
};
use reqwest::Client;
const DEFAULT_USER_ID: u32 = 335369;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
let user_id = std::env::args()
.nth(1)
.and_then(|s| s.parse().ok())
.unwrap_or(DEFAULT_USER_ID);
let client = Client::builder().user_agent(CRATES_IO_USER_AGENT).build()?;
let crate_list = get_all_crates(&client, user_id).await?;
let table = build_crates_table(&crate_list);
update_readme_with_table(&table)?;
Ok(())
}
```
## API overview
## License
Published under the [Apache-2.0](./LICENSE) license.
Made by [@UnRUST](https://github.com/un-rust) 💛
<br><br>
<a href="https://github.com/un-rust/crates-readme-table/graphs/contributors">
<img src="https://contrib.rocks/image?repo=un-rust/crates-readme-table" />
</a>
---
_🛠️ auto updated with [automd-rs](https://github.com/betterhyq/automd-rs)_