An unofficial CLI tool for seamless interaction with the Cosense API
Installation • Quick Start • Detailed Usage • Contributing • License
curl -L https://github.com/kawakamimoeki/cs/releases/download/v0.1.16/cs-linux-amd64 -o cs
chmod +x cs
sudo mv cs /usr/local/bin/curl -L https://github.com/kawakamimoeki/cs/releases/download/v0.1.16/cs-macos-amd64 -o cs
chmod +x cs
sudo mv cs /usr/local/bin/Invoke-WebRequest https://github.com/kawakamimoeki/cs/releases/download/v0.1.16/cs-windows-amd64.exe -OutFile cs.exe
Move-Item .\cs.exe C:\Windows\System32\-
Login to your Cosense account:
cs login your-connect-sid -
Set a project:
cs project your-project -
Find pages:
cs find "your search query" --link
All commands support the following global options:
--help: Show help information for the command
Authenticate with Cosense using your connect.sid cookie:
cs login <your-connect-sid>
Set a project:
cs switch <project>
Options:
--urlor-u: Display the API URL instead of fetching the page--webor-w: Open the project in a web browser
List page titles for a project:
cs ls [options]
Options:
--skip <value>or-s <value>: Skip a number of pages--limit <value>or-l <value>: Limit the number of pages returned--urlor-u: Display the API URL instead of fetching data--link: Include page links in the output--jsonor-j: Display the API URL instead of fetching the page
Example:
cs ls --limit 20 --link
View or open a page:
cs view <page> [options]
Options:
--bodyorb: Add body to page--webor-w: Open the page in a web browser--urlor-u: Display the API URL instead of fetching the page--jsonor-j: Display the API URL instead of fetching the page
Examples:
cs view my-page
cs view my-page --web
Get resource from a page:
cs get <name> [options]
Options:
--urlor-u: Display the API URL instead of fetching the resource--resourceor-t: Specify the type of resource to retrievecode: Retrieve code snippetstable: Retrieve tablesicon: Retrieve icons
Example:
cs get my-page/my-code-snippet --resource code
cs get my-page/my-table-name --resource table
cs get my-page --resource icon
Find pages:
cs find <query> [options]
Options:
--urlor-u: Display the API URL instead of performing the search--linkor-l: Include links to the search results--webor-w: Open the search results in a web browser--jsonor-j: Display the API URL instead of performing the search
Example:
cs search "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