Crates.io | makesense |
lib.rs | makesense |
version | 0.1.0 |
source | src |
created_at | 2024-10-05 15:39:38.727186 |
updated_at | 2024-10-05 15:39:38.727186 |
description | A tool for interacting with Cosense API |
homepage | https://github.com/kawakamimoeki/makesense |
repository | https://github.com/kawakamimoeki/makesense |
max_upload_size | |
id | 1398043 |
size | 75,237 |
An unofficial CLI tool for seamless interaction with the Cosense API
Installation • Quick Start • Detailed Usage • Contributing • License
curl -L https://github.com/kawakamimoeki/makesense/releases/download/v0.1.0/makesense-$(uname -s)-$(uname -m) -o mks
chmod +x mks
sudo mv mks /usr/local/bin/
Invoke-WebRequest https://github.com/kawakamimoeki/makesense/releases/download/v0.1.0/makesense-windows-amd64.exe -OutFile mks.exe
Move-Item .\mks.exe C:\Windows\System32\
Login to your Cosense account:
mks login your-connect-sid
Fetch JSON data from a project:
mks json your-project --pretty
Search within a project:
mks search your-project "your search query" --link
All commands support the following global options:
--help
: Show help information for the command--version
: Show the version of MakesenseAuthenticate with Cosense using your connect.sid
cookie:
mks login <your-connect-sid>
Retrieve JSON data from a project or page:
mks json <resource> [options]
Options:
--pretty
or -p
: Format the JSON output for better readability--skip <value>
or -s <value>
: Skip a number of pages (for project JSON)--limit <value>
or -l <value>
: Limit the number of pages returned (for project JSON)--url
or -u
: Display the API URL instead of fetching data--query <value>
or -q <value>
: Specify a search query (for search JSON)Examples:
mks json my-project --pretty
mks json my-project/my-page --url
mks json my-project --query "search term" --limit 10
List page titles for a project:
mks pages <project> [options]
Options:
--skip <value>
or -s <value>
: Skip a number of pages--limit <value>
or -l <value>
: Limit the number of pages returned--url
or -u
: Display the API URL instead of fetching data--link
: Include page links in the outputExample:
mks pages my-project --limit 20 --link
Create a new page with content:
mks create <page> <body> [options]
Options:
--url
or -u
: Display the API URL instead of creating the pageExample:
mks create "My New Page" "This is the content of my new page."
View or open a page:
mks page <page> [options]
Options:
--web
or -w
: Open the page in a web browser--url
or -u
: Display the API URL instead of fetching the pageExamples:
mks page my-project/my-page
mks page my-project/my-page --web
Retrieve code snippets from a page:
mks code <page> <name> [options]
Options:
--url
or -u
: Display the API URL instead of fetching the codeExample:
mks code my-project/my-page my-code-snippet
Extract table data in CSV format from a page:
mks table <page> <name> [options]
Options:
--url
or -u
: Display the API URL instead of fetching the tableExample:
mks table my-project/my-page my-table-name
Fetch the icon of a page:
mks icon <page> [options]
Options:
--url
or -u
: Display the API URL instead of fetching the iconExample:
mks icon my-project/my-page
Search within a project:
mks search <project> <query> [options]
Options:
--url
or -u
: Display the API URL instead of performing the search--link
or -l
: Include links to the search resultsExample:
mks search my-project "important topic" --link
Distributed under the MIT License. See LICENSE for more information.
If you encounter any issues or have questions, please open an issue on our GitHub repository.
Made with ❤️ by kawakamimoeki