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

Install Skill

Install the skill so your local AI assistant or agent can use it to interact with OpenCloud using skills.sh:

npx skills add JammingBen/opencloud-skill-cli

To install for a specific agent:

npx skills add JammingBen/opencloud-skill-cli -a claude-code

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

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.

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