replicas-cli 0.2.33 → 0.2.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +20 -24
  2. package/dist/index.js +7752 -475
  3. package/package.json +2 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Replicas CLI
2
2
 
3
- Official CLI for [Replicas](https://replicas.dev) - manage cloud development workspaces with automatic SSH tunneling and port forwarding.
3
+ Official CLI for [Replicas](https://replicas.dev) - manage cloud development workspaces with automatic SSH tunneling.
4
4
 
5
5
  ## Installation
6
6
 
@@ -16,9 +16,6 @@ replicas login
16
16
 
17
17
  # Connect to a workspace
18
18
  replicas connect my-workspace
19
-
20
- # Connect and copy files from replicas.json
21
- replicas connect my-workspace --copy
22
19
  ```
23
20
 
24
21
  ## Commands
@@ -38,51 +35,50 @@ Display current organization.
38
35
  ### `replicas org switch`
39
36
  Switch between organizations.
40
37
 
41
- ### `replicas connect <workspace-name> [--copy]`
42
- Connect to a workspace via SSH with automatic port forwarding.
43
-
44
- **Options:**
45
- - `-c, --copy` - Copy files listed in `replicas.json` to the workspace
38
+ ### `replicas connect <workspace-name>`
39
+ Connect to a workspace via SSH.
46
40
 
47
41
  ## Configuration
48
42
 
49
- Create a `replicas.json` file in your repository root to configure file copying and port forwarding:
43
+ Create a `replicas.json` or `replicas.yaml` file in your repository root:
50
44
 
51
45
  ```json
52
46
  {
53
- "copy": [
54
- "web/.env",
55
- "api/secrets.json"
56
- ],
57
- "ports": [3000, 8080, 5432]
47
+ "systemPrompt": "Custom instructions for coding agents.",
48
+ "startHook": {
49
+ "commands": ["npm install", "npm run build"]
50
+ }
58
51
  }
59
52
  ```
60
53
 
61
- When you run `replicas connect --copy`, it will:
62
- 1. Copy the specified files to the workspace
63
- 2. Set up port forwarding for the specified ports (automatically finding available local ports if needed)
54
+ Or use YAML for better readability (especially for multiline system prompts):
55
+
56
+ ```yaml
57
+ systemPrompt: |
58
+ Custom instructions for coding agents.
59
+ Supports multiline text.
60
+
61
+ startHook:
62
+ commands:
63
+ - npm install
64
+ - npm run build
65
+ ```
64
66
 
65
67
  ## Features
66
68
 
67
69
  - **Secure Authentication**: OAuth-based login with token refresh
68
70
  - **Quick SSH Access**: Connect to workspaces with a single command
69
- - **File Syncing**: Copy environment files and secrets to workspaces
70
- - **Smart Port Forwarding**: Automatic port conflict resolution
71
71
  - **SSH Key Caching**: Reuse SSH keys across sessions
72
72
  - **Multi-Organization**: Switch between different organizations
73
73
 
74
74
  ## How it Works
75
75
 
76
76
  1. **SSH Key Management**: The CLI securely caches SSH keys in `~/.replicas/keys/`
77
- 2. **Port Detection**: Automatically detects ports in use and finds alternatives
78
- 3. **File Copying**: Uses `scp` to copy files to `/home/ubuntu/workspaces/<repo-name>/`
79
- 4. **Port Forwarding**: Maps workspace ports to local ports (e.g., workspace:3000 → localhost:3001)
80
77
 
81
78
  ## Requirements
82
79
 
83
80
  - Node.js 18+
84
81
  - SSH client (openssh)
85
- - `lsof` (for port detection, pre-installed on macOS/Linux)
86
82
 
87
83
  ## Support
88
84