Skip to content

Commit fb0500b

Browse files
committed
Initial commit: n8n community node for Cloud CLI
0 parents  commit fb0500b

15 files changed

Lines changed: 6184 additions & 0 deletions

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Use Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '22'
20+
21+
- name: Install dependencies
22+
run: 'npm ci'
23+
24+
- name: Run lint
25+
run: 'npm run lint'
26+
27+
- name: Run build
28+
run: 'npm run build'

.gitignore

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Dependencies
2+
node_modules/
3+
npm-debug.log*
4+
yarn-debug.log*
5+
yarn-error.log*
6+
pnpm-debug.log*
7+
8+
# Build output
9+
dist/
10+
11+
# Environment
12+
.env
13+
.env.local
14+
.env.*.local
15+
16+
# IDE
17+
.vscode/
18+
.idea/
19+
*.swp
20+
*.swo
21+
*~
22+
23+
# OS
24+
.DS_Store
25+
.DS_Store?
26+
._*
27+
Thumbs.db
28+
29+
# Logs
30+
*.log
31+
logs/
32+
33+
# Temporary files
34+
tmp/
35+
temp/
36+
.tmp/
37+
38+
# Testing
39+
coverage/
40+
.nyc_output
41+
42+
# Optional npm cache
43+
.npm
44+
45+
# Lock files (optional - uncomment if you want to commit them)
46+
# package-lock.json

.prettierrc.js

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
module.exports = {
2+
/**
3+
* https://prettier.io/docs/en/options.html#semicolons
4+
*/
5+
semi: true,
6+
7+
/**
8+
* https://prettier.io/docs/en/options.html#trailing-commas
9+
*/
10+
trailingComma: 'all',
11+
12+
/**
13+
* https://prettier.io/docs/en/options.html#bracket-spacing
14+
*/
15+
bracketSpacing: true,
16+
17+
/**
18+
* https://prettier.io/docs/en/options.html#tabs
19+
*/
20+
useTabs: true,
21+
22+
/**
23+
* https://prettier.io/docs/en/options.html#tab-width
24+
*/
25+
tabWidth: 2,
26+
27+
/**
28+
* https://prettier.io/docs/en/options.html#arrow-function-parentheses
29+
*/
30+
arrowParens: 'always',
31+
32+
/**
33+
* https://prettier.io/docs/en/options.html#quotes
34+
*/
35+
singleQuote: true,
36+
37+
/**
38+
* https://prettier.io/docs/en/options.html#quote-props
39+
*/
40+
quoteProps: 'as-needed',
41+
42+
/**
43+
* https://prettier.io/docs/en/options.html#end-of-line
44+
*/
45+
endOfLine: 'lf',
46+
47+
/**
48+
* https://prettier.io/docs/en/options.html#print-width
49+
*/
50+
printWidth: 100,
51+
};

LICENSE.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright 2022 n8n
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of
4+
this software and associated documentation files (the "Software"), to deal in
5+
the Software without restriction, including without limitation the rights to
6+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7+
of the Software, and to permit persons to whom the Software is furnished to do
8+
so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# n8n-nodes-cloud-cli
2+
3+
This is an n8n community node for [Cloud CLI](https://cloudcli.ai). It lets you manage cloud development environments and run AI coding agents (Claude Code, Cursor, Codex) directly from your n8n workflows.
4+
5+
[n8n](https://n8n.io/) is a fair-code licensed workflow automation platform.
6+
7+
## Installation
8+
9+
Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
10+
11+
## Operations
12+
13+
### Environment
14+
15+
- **Create** - Create a new development environment
16+
- **Delete** - Delete an environment
17+
- **Get** - Get details of a specific environment
18+
- **Get Many** - Retrieve a list of environments
19+
- **Start** - Start a stopped environment
20+
- **Stop** - Stop a running environment
21+
22+
### Agent
23+
24+
- **Execute** - Run Claude Code or Cursor agent or Codex on a running environment
25+
26+
## Credentials
27+
28+
You need a Cloud CLI API key to use this node. Get your API key from [cloudcli.ai/api-keys](https://cloudcli.ai/api-keys).
29+
30+
## Resources
31+
32+
- [Cloud CLI Documentation](https://cloudcli.ai/docs)
33+
- [n8n Community Nodes Documentation](https://docs.n8n.io/integrations/community-nodes/)
34+
35+
## License
36+
37+
[MIT](LICENSE.md)
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import type {
2+
IAuthenticateGeneric,
3+
Icon,
4+
ICredentialTestRequest,
5+
ICredentialType,
6+
INodeProperties,
7+
} from 'n8n-workflow';
8+
9+
export class CloudCliApi implements ICredentialType {
10+
name = 'cloudCliApi';
11+
displayName = 'Cloud CLI API';
12+
documentationUrl = 'https://cloudcli.ai/api-keys';
13+
icon: Icon = 'file:logo.svg';
14+
properties: INodeProperties[] = [
15+
{
16+
displayName: 'Host',
17+
name: 'host',
18+
type: 'string',
19+
default: 'https://cloudcli.ai/api/v1',
20+
required: true,
21+
description: 'CloudCLI API base URL',
22+
},
23+
{
24+
displayName: 'API Key',
25+
name: 'apiKey',
26+
type: 'string',
27+
typeOptions: {
28+
password: true,
29+
},
30+
default: '',
31+
required: true,
32+
description: 'API key from https://cloudcli.ai/api-keys',
33+
},
34+
];
35+
36+
authenticate: IAuthenticateGeneric = {
37+
type: 'generic',
38+
properties: {
39+
headers: {
40+
'X-API-KEY': '={{$credentials.apiKey}}',
41+
},
42+
},
43+
};
44+
45+
test: ICredentialTestRequest = {
46+
request: {
47+
baseURL: '={{$credentials?.host}}',
48+
url: '/environments',
49+
method: 'GET',
50+
},
51+
};
52+
}

credentials/logo.svg

Lines changed: 17 additions & 0 deletions
Loading

eslint.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { config } from '@n8n/node-cli/eslint';
2+
3+
export default config;

icons/logo.svg

Lines changed: 17 additions & 0 deletions
Loading

nodes/CloudCli/CloudCli.node.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"node": "n8n-nodes-cloud-cli",
3+
"nodeVersion": "1.0",
4+
"codexVersion": "1.0",
5+
"categories": ["Development", "Productivity"],
6+
"resources": {
7+
"credentialDocumentation": [
8+
{
9+
"url": "https://cloudcli.ai/api-keys"
10+
}
11+
],
12+
"primaryDocumentation": [
13+
{
14+
"url": "https://cloudcli.ai"
15+
}
16+
]
17+
}
18+
}

0 commit comments

Comments
 (0)