cogenticlink
v1.0.3
Published
CLI for CogenticLab Tool Library API
Downloads
45
Maintainers
Readme
cogenticlink
CLI for interacting with the CogenticLab Tool Library API.
Progressive disclosure is achieved through the hierarchy of Tool Library → Tool Category → Tool.
Manage named Tool libraries, browse available tools, and execute tool calls – all from the command line.
Features
- 🔐 Library management – store multiple API tokens with optional descriptions.
- 📁 Browse categories – list all tool categories for a library.
- 🔧 List tools – see available tools and their tags in a category.
- 📖 Describe tool – view description and input schema (JSON) for any tool.
- ⚡ Call tool – execute tools with JSON parameters.
- 🧩 No default library – always specify which library to use, no ambiguity.
Installation
Global install (recommended for frequent use)
npm install -g cogenticlinkRun with npx (no installation)
npx cogenticlink <command>Configuration
Libraries are stored in ~/.cogenticlab/link/config.json:
{
"libraries": {
"myhub": {
"token": "your-api-token",
"description": "My Cogentic Hub"
}
}
}You manage libraries with the cogenticlink libraries subcommands – no manual file editing needed.
Commands
Library Management
| Command | Description | |-----------------------------------------------------------|--------------------------------------------| | cogenticlink libraries | List all libraries (markdown format) | | cogenticlink libraries set <name> [description] | Add or update a library | | cogenticlink libraries get <name> | Show token and description for a library | | cogenticlink libraries remove <name> | Delete a library | | cogenticlink libraries list | Plain‑text list of libraries (alternative) |
Tool Operations (all require <library> as first argument)
| Command | Description | |-----------------------------------------------------|--------------------------------------------------------------------| | csogenticlink categories <library> | Fetch all tool categories (JSON) | | cogenticlink tools <library> <category> | List tools in a category (default: All Tools). Output is Markdown. | | cogenticlink describe <library> | Show tool description and input schema (Markdown) | | cogenticlink call <library> <tool> [parameters] | Execute tool with optional JSON parameters (default {}) |
Examples
- Add a library
cogenticlink libraries set prod eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 "Production hub"- List libraries
cogenticlink librariesOutput:
# Tool Libraries
- prod: Production hub
- staging- See tool categories
cogenticlink categories prod- List tools in a category
cogenticlink tools prod "Database Tools"- Describe a tool
cogenticlink describe prod sql_query- Call a tool (with parameters)
cogenticlink call prod sql_query '{"query":"SELECT * FROM users"}'Help
Display general help:
cogenticlink --helpHelp for a specific command:
cogenticlink help libraries set
cogenticlink help callRequirements
- Node.js 18 or higher
- An API token from Cogentic Hub
Troubleshooting
| Problem | Solution |
|----------------------------|-------------------------------------------------------------------------|
| Library not found | Run cogenticlink libraries to see existing names. |
| Invalid token | Re‑set the library with the correct token. |
| Tool not found | Use cogenticlink tools \<library\> to verify the tool name. |
| Invalid JSON in parameters | Ensure parameters are valid JSON (use single quotes around the string). |
License
MIT
