| Crates.io | use-memos-cli |
| lib.rs | use-memos-cli |
| version | 0.1.2 |
| created_at | 2024-10-16 14:34:27.27199+00 |
| updated_at | 2024-10-16 15:10:04.332126+00 |
| description | A CLI tool for interacting with the Memos API through a self hosted instance. |
| homepage | |
| repository | https://github.com/JonathanRiche/memos-cli |
| max_upload_size | |
| id | 1411868 |
| size | 52,285 |
#Use Memos CLI
Memos CLI is a command-line interface tool for managing memos through a self-hosted API. It allows users to retrieve, create, and update memos efficiently.
git clone https://github.com/yourusername/memos-cli.git
cd use-memos-cli
cargo build --release
target/release/use-memos-cliBefore using the CLI, make sure to set the following environment variables:
MEMOAPI: Your API authentication tokenMEMO_DOMAIN: The domain of your self-hosted memo instanceYou can set these in a .env file in the project root.
use-memos-cli [OPTIONS] --endpoint <ENDPOINT>
-m, --memo-domain <MEMO_DOMAIN>: Memo domain of self-hosted instance-e, --endpoint <ENDPOINT>: API endpoint to call (getMemos, createMemo, updateMemo)-o, --output-dir <OUTPUT_DIR>: Output directory for files [default: content]-v, --verbose: Verbose mode-n, --memo-name <MEMO_NAME>: Memo name or uid (for single memo operations)-c, --content <CONTENT>: Optional content for memo creation or update--bulk-update: Flag for bulk update of memosRetrieve all memos:
use-memos-cli --endpoint getMemos
Update a single memo:
use-memos-cli --endpoint updateMemo --memo-name <MEMO_UID> --content "Updated content"
Bulk update all memos:
use-memos-cli --endpoint updateMemo --bulk-update
src/
main.rs: Entry point of the applicationcli.rs: CLI argument parsingutils.rs: Utility functionsapi/
mod.rs: API module definitionsgetMemos.rs: Functions for retrieving memoscreateMemo.rs: Functions for creating memos (placeholder)updateMemo.rs: Functions for updating memosContributions are welcome! Please feel free to submit a Pull Request.