Skip to content

JammingBen/opencloud-skill-cli

Repository files navigation

opencloud-skill-cli

An OpenCloud CLI application that can be used by local AI assistants and agents via skills. It allows AI to interact with OpenCloud resources using the LibreGraph API.

Features

  • Seamless integration with local AI assistants and agents via skills.
  • Efficient agent token usage thanks to TOON and skill reference data.
  • Fetching and managing OpenCloud resources.
  • Authentication with OpenCloud using OIDC.
  • Single binary application for easy installation and usage.

Getting started

Install CLI

curl -sSL https://raw.githubusercontent.com/JammingBen/opencloud-skill-cli/main/install.sh | bash

Or build from source:

git clone git@github.com:JammingBen/opencloud-skill-cli.git
make install

Login

You need to login to your OpenCloud server to use the CLI or the skill. You can do this using the login command:

oc-cli login -s https://your-opencloud-server.com

This will store the token in a config file in your user directory. If you don't want the token to be stored, you can use the OC_ACCESS_TOKEN env variable to provide the token directly.

oc-cli login -s https://your-opencloud-server.com --clipboard
export OC_ACCESS_TOKEN=paste-your-token
# run your agent or assistant that uses the skill

When working with a local server that uses self-signed certificates, you can use the --insecure flag to skip TLS verification:

oc-cli login -s https://host.docker.internal:9200 --insecure

Install Skill

Install the skill so your local AI assistant or agent can use it to interact with OpenCloud. You can use the provided install-skill command, or download and install the skill manually from this repository.

oc-cli install-skill --agent=claude-code
oc-cli install-skill --agent=github-copilot
oc-cli install-skill --agent=codex
oc-cli install-skill --agent=open-code
oc-cli install-skill --agent=gemini-cli

Example prompts

  • List all my project spaces.
  • List all members of project space "foo".
  • Add Dennis Ritchie as manager to project space "foo".
  • List all files in the root of my personal space.

Why not use an MCP server?

The OpenCloud CLI is designed to offer a simple and efficient way for local AI assistants and agents to interact with OpenCloud resources. It does not require the overhead of running an MCP server, and can be easily installed and used on any machine.

Additionally, skills are usually more efficient than MCP servers in terms of token usage because they don't need to retrieve tool definitions initially. The CLI's skill reference structure as well as the TOON format used for responses allow for efficient retrieval of necessary information.

Development

# install Go dependencies
make tidy

# login to OpenCloud server
make login # defaults to https://host.docker.internal:9200

# OR:
make login SERVER_URL=https://cloud.opencloud.eu # specify own URL

# run cli
go run cmd/oc-cli/*.go --help

Generating skill reference data

Skill reference data can be generated using openapi-to-skills. This will generate markdown files for all resources, operations and schemas defined in the OpenCloud OpenAPI spec. The generated files will be moved to skills/opencloud-cli/references.

Make sure you have npx installed.

make generate-skill-references

About

A CLI for OpenCloud that can be used by agents. It allows AI to manage your OpenCloud.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors