Skip to content

Commit c81c362

Browse files
committed
feat(skill): add installable agent skill for AI assistants
1 parent 15df43b commit c81c362

File tree

4 files changed

+233
-2
lines changed

4 files changed

+233
-2
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,16 @@ clever <command> --help # Get specific help
154154
clever --format json <command> # JSON output for scripting
155155
```
156156

157+
## AI Agent Integration
158+
159+
Clever Tools can be used with AI coding assistants (Claude Code, Cursor, Codex, GitHub Copilot, etc.):
160+
161+
```bash
162+
npx add-skill CleverCloud/clever-tools
163+
```
164+
165+
This installs the Clever Tools skill, giving your AI assistant knowledge of all commands and Clever Cloud concepts.
166+
157167
## Support & Contributing
158168

159169
- **Issues & Questions**: [GitHub Issues](https://github.com/CleverCloud/clever-tools/issues)

scripts/generate-docs.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,10 @@ async function generateCommandDocs(commands, checkMode) {
104104
* @return {Promise<FileResult>}
105105
*/
106106
async function generateLlmsDocs(commands, checkMode) {
107-
const llmsDocumentationPath = path.resolve(import.meta.dirname, '../docs/llms-documentation.md');
107+
const llmsDocumentationPath = path.resolve(
108+
import.meta.dirname,
109+
'../skills/clever-tools/references/full-documentation.md',
110+
);
108111
const setupDocsPath = path.resolve(import.meta.dirname, '../docs/setup-systems.md');
109112

110113
const existingLlmsDocumentation = await fs.readFile(llmsDocumentationPath, 'utf-8').catch(() => null);

skills/clever-tools/SKILL.md

Lines changed: 218 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,218 @@
1+
---
2+
name: clever-tools
3+
description: CLI to deploy and manage applications, add-ons, and configurations on Clever Cloud PaaS. Use when the user needs to deploy apps, view logs, manage environment variables, configure domains, or interact with Clever Cloud services.
4+
license: Apache-2.0
5+
metadata:
6+
author: CleverCloud
7+
allowed-tools: Bash(clever:*)
8+
---
9+
10+
# Clever Tools
11+
12+
Clever Tools is the official CLI for Clever Cloud, a Platform-as-a-Service (PaaS) provider. It allows you to deploy applications, manage add-ons (databases, storage, etc.), configure environment variables, domains, and monitor your services.
13+
14+
Use this skill when the user wants to deploy code to Clever Cloud, manage their hosted applications, or interact with Clever Cloud services.
15+
16+
## Quick Start
17+
18+
```bash
19+
# Login to Clever Cloud (opens browser for OAuth)
20+
clever login
21+
22+
# For CI/CD, use token-based authentication
23+
export CLEVER_TOKEN="your-token"
24+
export CLEVER_SECRET="your-secret"
25+
26+
# Link an existing application to current directory
27+
clever link <app-id>
28+
29+
# Or create a new application
30+
clever create --type node myapp
31+
32+
# Deploy current directory
33+
clever deploy
34+
```
35+
36+
## Essential Commands
37+
38+
### Deployment
39+
40+
```bash
41+
# Deploy current directory (git push to Clever Cloud)
42+
clever deploy
43+
44+
# Deploy with specific commit or branch
45+
clever deploy --branch main
46+
clever deploy --commit HEAD~2
47+
48+
# Restart application
49+
clever restart
50+
51+
# Stop application (scales to 0)
52+
clever stop
53+
54+
# Check deployment status
55+
clever status
56+
57+
# View deployment history
58+
clever activity
59+
clever activity --follow # Live updates
60+
```
61+
62+
### Logs
63+
64+
```bash
65+
# Stream live logs
66+
clever logs
67+
68+
# View logs from last hour
69+
clever logs --since 1h
70+
71+
# View logs before a specific time
72+
clever logs --before 2024-01-15T10:00:00
73+
74+
# Filter by deployment
75+
clever logs --deployment-id <id>
76+
77+
# Access logs (HTTP requests)
78+
clever accesslogs
79+
clever accesslogs --since 1h
80+
```
81+
82+
### Environment Variables
83+
84+
```bash
85+
# List all environment variables
86+
clever env
87+
88+
# Set a variable
89+
clever env set MY_VAR "my value"
90+
91+
# Set multiple variables
92+
clever env set VAR1=value1 VAR2=value2
93+
94+
# Remove a variable
95+
clever env rm MY_VAR
96+
97+
# Import from .env file
98+
clever env import .env
99+
100+
# Export for shell
101+
clever env --format shell > .env
102+
```
103+
104+
### Domains
105+
106+
```bash
107+
# List domains
108+
clever domain
109+
110+
# Add a custom domain
111+
clever domain add myapp.example.com
112+
113+
# Remove a domain
114+
clever domain rm myapp.example.com
115+
116+
# Favorite domain (used in logs, URLs)
117+
clever domain favorite set myapp.example.com
118+
```
119+
120+
### Add-ons (Databases, Storage, etc.)
121+
122+
```bash
123+
# List your add-ons
124+
clever addon
125+
126+
# List available add-on providers
127+
clever addon providers
128+
129+
# Create a PostgreSQL database
130+
clever addon create postgresql-addon mydb --plan dev
131+
132+
# Create Redis
133+
clever addon create redis-addon myredis --plan s_mono
134+
135+
# Create S3-compatible storage (Cellar)
136+
clever addon create cellar-addon mybucket
137+
138+
# Delete an add-on
139+
clever addon delete <addon-id>
140+
141+
# Get add-on environment variables
142+
clever addon env <addon-id>
143+
```
144+
145+
### Services (Managed services like Keycloak, Matomo)
146+
147+
```bash
148+
# Link add-on to application
149+
clever service link-addon <addon-id>
150+
151+
# Unlink add-on
152+
clever service unlink-addon <addon-id>
153+
```
154+
155+
### Scaling
156+
157+
```bash
158+
# View current scaling
159+
clever scale
160+
161+
# Set instance size (flavor)
162+
clever scale --flavor M
163+
164+
# Set number of instances
165+
clever scale --instances 2
166+
167+
# Autoscaling
168+
clever scale --min-instances 1 --max-instances 4
169+
```
170+
171+
### SSH Access
172+
173+
```bash
174+
# SSH into running instance
175+
clever ssh
176+
177+
# Run a command
178+
clever ssh --command "ls -la"
179+
```
180+
181+
### Applications Management
182+
183+
```bash
184+
# List all applications in organization
185+
clever applications list
186+
187+
# List linked applications in current directory
188+
clever applications
189+
190+
# Create new application
191+
clever create --type <type> <name>
192+
# Types: node, python, ruby, php, java, go, rust, docker, static...
193+
194+
# Delete application
195+
clever delete
196+
```
197+
198+
## Common Global Options
199+
200+
These options work with most commands:
201+
202+
```bash
203+
--app <app-id|name> # Target specific app (when multiple linked)
204+
--alias <alias> # Use app alias (from clever link --alias)
205+
--org <org-id|name> # Target specific organization
206+
-F, --format <format> # Output format: human, json, json-stream, shell
207+
-y, --yes # Skip confirmation prompts
208+
```
209+
210+
JSON output is useful for scripting:
211+
```bash
212+
clever env --format json | jq '.MY_VAR'
213+
clever applications list --format json
214+
```
215+
216+
## Full Reference
217+
218+
For complete documentation of all commands, options, available runtimes, add-on providers, and deployment zones, see [references/full-documentation.md](references/full-documentation.md).

docs/llms-documentation.md renamed to skills/clever-tools/references/full-documentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This document is automatically generated from Clever Tools `4.5.1` and Clever Cloud API. It covers all Clever Tools commands and options. Use it to better understand this CLI and its capabilities or to train/use LLMs, AI-assisted IDEs.
1+
This document is automatically generated from Clever Tools `4.5.3` and Clever Cloud API. It covers all Clever Tools commands and options. Use it to better understand this CLI and its capabilities or to train/use LLMs, AI-assisted IDEs.
22

33
To use Clever Tools, you need:
44
- A Clever Cloud account, create one at https://console.clever-cloud.com/

0 commit comments

Comments
 (0)