delete / move cli files
This commit is contained in:
parent
be45ab63ca
commit
bbdeb3b04f
10 changed files with 105 additions and 328 deletions
43
.vscode/launch.json
vendored
43
.vscode/launch.json
vendored
|
|
@ -131,6 +131,49 @@
|
|||
"env": {
|
||||
"NODE_OPTIONS": "--experimental-vm-modules"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Debug CLI",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/extensions/cli/src/index.ts",
|
||||
"args": [],
|
||||
"env": {
|
||||
"NODE_ENV": "development"
|
||||
// "CONTINUE_API_BASE": "http://localhost:3001/",
|
||||
// "WORKOS_CLIENT_ID": "client_01J0FW6XCPMJMQ3CG51RB4HBZQ",
|
||||
// "HUB_URL": "http://localhost:3000"
|
||||
},
|
||||
"console": "integratedTerminal",
|
||||
"internalConsoleOptions": "neverOpen",
|
||||
"skipFiles": ["<node_internals>/**"],
|
||||
"runtimeArgs": ["--loader", "ts-node/esm"],
|
||||
"sourceMaps": true,
|
||||
"resolveSourceMapLocations": [
|
||||
"${workspaceFolder}/**",
|
||||
"!**/node_modules/**"
|
||||
],
|
||||
"preLaunchTask": "watch-logs",
|
||||
"cwd": "${workspaceFolder}/extensions/cli"
|
||||
},
|
||||
{
|
||||
"name": "Debug CLI Tests",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/extensions/cli/node_modules/.bin/vitest",
|
||||
"args": ["--run", "--no-cache"],
|
||||
"env": {
|
||||
"NODE_ENV": "test"
|
||||
},
|
||||
"console": "integratedTerminal",
|
||||
"internalConsoleOptions": "neverOpen",
|
||||
"skipFiles": ["<node_internals>/**"],
|
||||
"sourceMaps": true,
|
||||
"resolveSourceMapLocations": [
|
||||
"${workspaceFolder}/**",
|
||||
"!**/node_modules/**"
|
||||
],
|
||||
"cwd": "${workspaceFolder}/extensions/cli"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
62
.vscode/tasks.json
vendored
62
.vscode/tasks.json
vendored
|
|
@ -311,6 +311,68 @@
|
|||
"close": true,
|
||||
"focus": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "cli:build",
|
||||
"type": "npm",
|
||||
"script": "build",
|
||||
"group": "build",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "silent",
|
||||
"focus": false,
|
||||
"panel": "shared",
|
||||
"showReuseMessage": true,
|
||||
"clear": false
|
||||
},
|
||||
"problemMatcher": ["$tsc"],
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/extensions/cli"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "cli:test",
|
||||
"type": "npm",
|
||||
"script": "test",
|
||||
"group": "test",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "shared",
|
||||
"showReuseMessage": true,
|
||||
"clear": false
|
||||
},
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/extensions/cli"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "watch-logs",
|
||||
"type": "shell",
|
||||
"command": "npm run watch:logs",
|
||||
"isBackground": true,
|
||||
"problemMatcher": {
|
||||
"pattern": {
|
||||
"regexp": "^$",
|
||||
"file": 1,
|
||||
"location": 2,
|
||||
"message": 3
|
||||
},
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": "^.*$",
|
||||
"endsPattern": "^.*$"
|
||||
}
|
||||
},
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "new",
|
||||
"focus": false
|
||||
},
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/extensions/cli"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
name: CLI Agent
|
||||
version: 0.0.1
|
||||
schema: v1
|
||||
|
||||
models:
|
||||
- uses: anthropic/claude-3-7-sonnet
|
||||
with:
|
||||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
|
||||
mcpServers:
|
||||
- uses: repomix/repomix-mcp
|
||||
- uses: anthropic/memory-mcp
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
name: Continue SDK CLI and Hub Context
|
||||
version: 0.0.1
|
||||
schema: v1
|
||||
rules:
|
||||
- name: Continue SDK CLI and Hub Context
|
||||
rule: >-
|
||||
This repository is a CLI for the Continue SDK, which provides programmatic
|
||||
access to Continue's APIs.
|
||||
|
||||
|
||||
Key components:
|
||||
|
||||
- Continue SDK: Experimental package in early development, subject to
|
||||
breaking changes
|
||||
|
||||
- Continue Hub: Registry for custom AI code agent
|
||||
|
||||
- Hub functionality: Manages agent building blocks (models, rules,
|
||||
context providers, prompts, docs, etc.)
|
||||
|
||||
- Governance: Allows central configuration for organizations
|
||||
|
||||
|
||||
Important libraries:
|
||||
|
||||
- WorkOS: Handles authentication flows
|
||||
|
||||
- Model Context Protocol (MCP): Manages MCP server interactions
|
||||
|
||||
- readline-sync: Provides synchronous CLI user interactions
|
||||
|
||||
- Vitest: Used for testing framework
|
||||
|
||||
|
||||
All code should follow established patterns for a Node.js CLI tool
|
||||
interfacing with this experimental SDK.
|
||||
|
|
@ -1 +0,0 @@
|
|||
v20.11.0
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
# Dependencies
|
||||
node_modules/
|
||||
|
||||
# Build output
|
||||
dist/
|
||||
|
||||
# Coverage
|
||||
coverage/
|
||||
|
||||
# Logs
|
||||
*.log
|
||||
logs/
|
||||
|
||||
# OS files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# IDE files
|
||||
.vscode/
|
||||
.idea/
|
||||
*.swp
|
||||
*.swo
|
||||
|
||||
# Lock files
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
pnpm-lock.yaml
|
||||
|
||||
# Test files
|
||||
*.test.ts
|
||||
*.test.tsx
|
||||
*.spec.ts
|
||||
*.spec.tsx
|
||||
|
||||
# Config files that don't need formatting
|
||||
.prettierrc
|
||||
.prettierignore
|
||||
|
||||
# Generated files
|
||||
*.generated.*
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"trailingComma": "all",
|
||||
"semi": true,
|
||||
"singleQuote": false,
|
||||
"bracketSpacing": true
|
||||
}
|
||||
46
extensions/cli/.vscode/launch.json
vendored
46
extensions/cli/.vscode/launch.json
vendored
|
|
@ -1,46 +0,0 @@
|
|||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Debug CLI",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/src/index.ts",
|
||||
"args": [],
|
||||
"env": {
|
||||
"NODE_ENV": "development"
|
||||
// "CONTINUE_API_BASE": "http://localhost:3001/",
|
||||
// "WORKOS_CLIENT_ID": "client_01J0FW6XCPMJMQ3CG51RB4HBZQ",
|
||||
// "HUB_URL": "http://localhost:3000"
|
||||
},
|
||||
"console": "integratedTerminal",
|
||||
"internalConsoleOptions": "neverOpen",
|
||||
"skipFiles": ["<node_internals>/**"],
|
||||
"runtimeArgs": ["--loader", "ts-node/esm"],
|
||||
"sourceMaps": true,
|
||||
"resolveSourceMapLocations": [
|
||||
"${workspaceFolder}/**",
|
||||
"!**/node_modules/**"
|
||||
],
|
||||
"preLaunchTask": "watch-logs"
|
||||
},
|
||||
{
|
||||
"name": "Debug Tests",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/node_modules/.bin/vitest",
|
||||
"args": ["--run", "--no-cache"],
|
||||
"env": {
|
||||
"NODE_ENV": "test"
|
||||
},
|
||||
"console": "integratedTerminal",
|
||||
"internalConsoleOptions": "neverOpen",
|
||||
"skipFiles": ["<node_internals>/**"],
|
||||
"sourceMaps": true,
|
||||
"resolveSourceMapLocations": [
|
||||
"${workspaceFolder}/**",
|
||||
"!**/node_modules/**"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
56
extensions/cli/.vscode/tasks.json
vendored
56
extensions/cli/.vscode/tasks.json
vendored
|
|
@ -1,56 +0,0 @@
|
|||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"type": "npm",
|
||||
"script": "build",
|
||||
"group": "build",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "silent",
|
||||
"focus": false,
|
||||
"panel": "shared",
|
||||
"showReuseMessage": true,
|
||||
"clear": false
|
||||
},
|
||||
"problemMatcher": ["$tsc"]
|
||||
},
|
||||
{
|
||||
"type": "npm",
|
||||
"script": "test",
|
||||
"group": "test",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "shared",
|
||||
"showReuseMessage": true,
|
||||
"clear": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "watch-logs",
|
||||
"type": "shell",
|
||||
"command": "npm run watch:logs",
|
||||
"isBackground": true,
|
||||
"problemMatcher": {
|
||||
"pattern": {
|
||||
"regexp": "^$",
|
||||
"file": 1,
|
||||
"location": 2,
|
||||
"message": 3
|
||||
},
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": "^.*$",
|
||||
"endsPattern": "^.*$"
|
||||
}
|
||||
},
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "new",
|
||||
"focus": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,129 +0,0 @@
|
|||
# Continue CLI Command Line Options
|
||||
|
||||
Quick reference for using `cn` command line options.
|
||||
|
||||
## Basic Usage
|
||||
|
||||
```bash
|
||||
cn # Start interactive chat
|
||||
cn "analyze my code" # Chat with prompt
|
||||
cn -p "review this file" # Print response and exit (headless)
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
- `--config <path>` - Use specific config file
|
||||
- `--verbose` - Show detailed logging
|
||||
|
||||
```bash
|
||||
cn --config ./my-config.yaml
|
||||
cn --verbose -p "debug this issue"
|
||||
```
|
||||
|
||||
## Permission Modes
|
||||
|
||||
- `--readonly` - Only allow read operations (safe mode)
|
||||
- `--auto` - Allow all tools without asking (careful!)
|
||||
|
||||
```bash
|
||||
cn --readonly -p "analyze the codebase" # Safe: can't modify files
|
||||
cn --auto -p "fix the failing tests" # Dangerous: will modify files
|
||||
```
|
||||
|
||||
## Fine-grained Permissions
|
||||
|
||||
- `--allow <tool>` - Allow specific tools
|
||||
- `--ask <tool>` - Ask before using tools
|
||||
- `--exclude <tool>` - Block specific tools
|
||||
|
||||
```bash
|
||||
cn --allow readFile --allow searchCode -p "find todos"
|
||||
cn --exclude Write -p "help me understand this code" # Can't modify files
|
||||
cn --ask writeFile -p "suggest fixes" # Will ask before writing
|
||||
```
|
||||
|
||||
## Headless Mode (for scripts)
|
||||
|
||||
Use `-p` for non-interactive output:
|
||||
|
||||
```bash
|
||||
cn -p "summarize the main function"
|
||||
echo "error log" | cn -p "what caused this error?"
|
||||
cn -p --format json "list main files" | jq '.response'
|
||||
cn -p --silent "get summary" | grep -v "^$" # Clean output
|
||||
```
|
||||
|
||||
## Server Mode
|
||||
|
||||
Run Continue as a server:
|
||||
|
||||
```bash
|
||||
cn serve # Start server on port 8000
|
||||
cn serve --port 3000 # Custom port
|
||||
cn serve --timeout 600 # 10 minute timeout
|
||||
```
|
||||
|
||||
## Remote Development
|
||||
|
||||
```bash
|
||||
cn remote "help debug this" # Create new remote environment
|
||||
cn remote --url https://my-server.com "work" # Connect to existing server
|
||||
cn remote --idempotency-key my-session "work" # Resume or create idempotent session
|
||||
```
|
||||
|
||||
### Idempotent Sessions
|
||||
|
||||
Use `--idempotency-key` to create resumable remote sessions:
|
||||
|
||||
```bash
|
||||
# First time - creates new session
|
||||
cn remote --idempotency-key "project-review" "start code review"
|
||||
|
||||
# Later - resumes same session if it exists
|
||||
cn remote --idempotency-key "project-review" "continue where we left off"
|
||||
|
||||
# Different key - creates separate session
|
||||
cn remote --idempotency-key "feature-dev" "work on new feature"
|
||||
```
|
||||
|
||||
The backend manages session lifecycle based on the idempotency key:
|
||||
|
||||
- New key = new remote environment
|
||||
- Existing key = connect to existing session
|
||||
- Sessions may expire based on backend configuration
|
||||
|
||||
### Repository Detection
|
||||
|
||||
The `cn remote` command automatically detects your repository URL:
|
||||
|
||||
- **GitHub Actions**: Uses `GITHUB_REPOSITORY` and `GITHUB_SERVER_URL` environment variables
|
||||
- **Git Repository**: Uses `git remote get-url origin`
|
||||
- **Fallback**: Uses current working directory path
|
||||
|
||||
This ensures the remote environment is created with the correct repository context.
|
||||
|
||||
## Common Examples
|
||||
|
||||
```bash
|
||||
# Safe code analysis
|
||||
cn --readonly -p "review my git diff"
|
||||
|
||||
# Let AI fix tests (with permission)
|
||||
cn --ask writeFile -p "fix failing tests"
|
||||
|
||||
# Scripted code review
|
||||
git diff | cn -p "review this change" --format json
|
||||
|
||||
# Remote pair programming
|
||||
cn remote "help me implement user auth"
|
||||
|
||||
# Run as code review server
|
||||
cn serve --readonly --port 8080
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
- Use `--readonly` when you want AI to analyze but not modify code
|
||||
- Use `--auto` only when you trust the AI to make changes
|
||||
- Pipe input works: `cat file.py | cn -p "explain this"`
|
||||
- `--format json` and `--silent` only work with `-p`
|
||||
Loading…
Add table
Reference in a new issue