### Start CCC Server with Authentication Source: https://getc3.app/docs/getting-started/quick-setup-local Starts the CCC server from the terminal, requiring a username and password for security. Displays a QR code for mobile app connection. ```bash ccc -u your_username -p your_password ``` -------------------------------- ### Start CCC with Static ngrok Domain Source: https://getc3.app/docs/getting-started/quick-setup-remote This command starts the CCC server using a pre-configured static ngrok domain. This is useful for maintaining a consistent public URL, simplifying reconnections and sharing. It requires your ngrok token, custom domain, username, and password. ```bash ccc --ngrok-token YOUR_TOKEN \ --ngrok-domain your-custom-domain.ngrok-free.app \ --username your_username \ --password your_password ``` -------------------------------- ### Install CCC Backend via npm Source: https://getc3.app/docs/getting-started/installation Installs the CCC backend server globally using npm. This makes the 'ccc' command available system-wide. ```bash npm install -g @naarang/ccc ``` -------------------------------- ### Start CCC with ngrok Token and Credentials Source: https://getc3.app/docs/getting-started/quick-setup-remote This command starts the CCC server and establishes a secure ngrok tunnel for remote access. It requires your ngrok token, username, and password. The output will provide a public URL for connecting to the CCC app. ```bash ccc --ngrok-token YOUR_NGROK_TOKEN \ --username your_username \ --password your_secure_password ``` -------------------------------- ### Start CCC with ngrok Token Source: https://getc3.app/docs/configuration/ngrok-setup This command starts the CCC server and configures it to use ngrok for remote access. It requires your ngrok authentication token and CCC username/password. Ensure authentication is set to prevent unauthorized access. ```bash ccc --ngrok-token YOUR_TOKEN -u admin -p password ``` -------------------------------- ### Verify CCC Installation Source: https://getc3.app/docs/getting-started/installation Commands to verify the CCC installation and check its version or view available options. ```bash ccc --version ``` ```bash ccc --help ``` -------------------------------- ### Install CCC Beta Version via npm Source: https://getc3.app/docs/getting-started/installation Installs the beta version of the CCC backend server globally using npm. This allows users to test the latest features before official release. ```bash npm install -g @naarang/ccc@beta ``` -------------------------------- ### QR Code Connection Configuration Source: https://getc3.app/docs/getting-started/quick-setup-local Example JSON structure representing the connection details embedded within the QR code, including server URL, credentials, and SSL configuration. ```json { "serverUrl": "192.168.1.100:8883", "username": "your_username", "password": "your_password", "useSSL": false, "profileName": "My Dev Machine" } ``` -------------------------------- ### Update CCC to Latest Version Source: https://getc3.app/docs/getting-started/installation Commands to update the CCC installation to the latest stable version, using the same methods as the initial installation. ```bash # npm installation npm install -g @naarang/ccc@latest ``` ```bash # Standalone binary (macOS / Linux) curl -fsSL https://getc3.app/install.sh | bash ``` ```powershell # Standalone binary (Windows) irm https://getc3.app/install.ps1 | iex ``` -------------------------------- ### Configure CCC with ngrok using Environment Variables Source: https://getc3.app/docs/configuration/ngrok-setup This configuration demonstrates setting up ngrok for CCC using environment variables for the token, username, and password. This method is useful for automating or securing credentials. The CCC server is then started without explicit arguments. ```bash # Basic ngrok setup ccc --ngrok-token YOUR_TOKEN \ --username admin \ --password your_secure_password # Or use environment variables export CCC_NGROK_TOKEN=your_token export CCC_USERNAME=admin export CCC_PASSWORD=your_password ccc ``` -------------------------------- ### Authenticate CCC with Username and Password Source: https://getc3.app/docs/reference/cli-options Provides an example of how to provide authentication credentials (username and password) when starting the CCC application. Authentication is a mandatory requirement for CCC to run. ```bash # With authentication ccc -u myuser -p mysecretpassword ``` -------------------------------- ### Use Static ngrok Domain with CCC Source: https://getc3.app/docs/configuration/ngrok-setup This command starts the CCC server using a pre-configured static ngrok domain. This ensures a consistent URL for remote access, eliminating the need to reconfigure mobile apps after server restarts. It requires your ngrok token, the static domain, and CCC credentials. ```bash ccc --ngrok-token YOUR_TOKEN \ --ngrok-domain abc123xyz.ngrok-free.dev \ -u admin -p password ``` -------------------------------- ### Set up CCC with ngrok for External Access Source: https://getc3.app/docs/reference/cli-options Illustrates a full ngrok setup for CCC, including providing an ngrok authentication token and a static domain, along with user authentication. This enables secure external access to your CCC instance. ```bash # Full ngrok setup ccc --ngrok-token abc123xyz \ --ngrok-domain myapp.ngrok-free.app \ -u admin -p secretpass ``` -------------------------------- ### Install and Run Cloudflare Tunnel for CCC Source: https://getc3.app/docs/configuration/ngrok-setup This snippet shows how to install `cloudflared` using Homebrew on macOS, authenticate it, create a tunnel named 'ccc-tunnel', and then run the tunnel to expose CCC's router port (defaulting to 8883) to the internet. This provides secure tunneling with Cloudflare's network. ```bash # Install cloudflared # macOS brew install cloudflared # Then authenticate and create a tunnel cloudflared tunnel login cloudflared tunnel create ccc-tunnel # Run the tunnel pointing to CCC's router port cloudflared tunnel run --url http://localhost:8883 ccc-tunnel ``` -------------------------------- ### Find Local IP Address (macOS, Linux, Windows) Source: https://getc3.app/docs/getting-started/quick-setup-local Command-line snippets to retrieve the local IP address of your computer on macOS, Linux, or Windows systems. ```bash # macOS ipconfig getifaddr en0 ``` ```bash # Linux / WSL hostname -I | awk '{print $1}' ``` ```powershell # Windows (PowerShell) (Get-NetIPAddress -AddressFamily IPv4 | Where-Object { $_.InterfaceAlias -notlike "*Loopback*" }).IPAddress ``` -------------------------------- ### Basic CCC CLI Usage Examples Source: https://getc3.app/docs/reference/cli-options Demonstrates fundamental ways to invoke the CCC command-line tool. This includes running with default settings, displaying the help message, and showing the current version. ```bash ccc ccc --help ccc --version ``` -------------------------------- ### Example Project Paths Source: https://getc3.app/docs/core-concepts/sessions-projects Illustrates common absolute path formats for projects on macOS/Linux and Windows operating systems. These paths are used when configuring projects in Claude Code. ```text # Example project paths /Users/you/projects/my-app # macOS/Linux C:\Users\you\projects\my-app # Windows ``` -------------------------------- ### Check CCC Backend Version (Terminal) Source: https://getc3.app/docs/configuration/auto-updates This command displays the currently installed version of the CCC backend. It is useful for verifying the installation and checking if an update is needed. ```bash ccc --version ``` -------------------------------- ### Edit File Input Example (JSON) Source: https://getc3.app/docs/features/tool-visualization This JSON snippet demonstrates the parameters used for editing a file. It specifies the file path, the string to be replaced, and the new string to be inserted. ```json { "file_path": "/src/components/Button.tsx", "old_string": "const Button = () => {", "new_string": "const Button: React.FC = () => {" } ``` -------------------------------- ### Manually Update CCC Backend via Standalone Binary (macOS/Linux) Source: https://getc3.app/docs/configuration/auto-updates This command updates the CCC backend by re-running the installation script for users who installed via a standalone binary on macOS or Linux. It fetches the latest version from the provided URL. ```bash curl -fsSL https://getc3.app/install.sh | bash ``` -------------------------------- ### Manually Update CCC Backend via Standalone Binary (Windows PowerShell) Source: https://getc3.app/docs/configuration/auto-updates This command updates the CCC backend by re-running the installation script for users who installed via a standalone binary on Windows using PowerShell. It fetches the latest version from the provided URL. ```powershell irm https://getc3.app/install.ps1 | iex ``` -------------------------------- ### Configure CCC Backend with Environment Variables Source: https://getc3.app/docs/configuration/authentication Configure the CCC backend using environment variables for username and password. This method is recommended for keeping credentials out of shell history. Set the `CCC_USERNAME` and `CCC_PASSWORD` variables before starting the `ccc` command. ```bash export CCC_USERNAME=myusername export CCC_PASSWORD=mypassword ccc ``` -------------------------------- ### Set Environment Variables for CCC Configuration Source: https://getc3.app/docs/getting-started/quick-setup-remote This section demonstrates how to use environment variables to configure the CCC application, specifically for ngrok integration. Setting these variables allows for cleaner command-line execution of the CCC server, as credentials and tokens are not passed directly. ```bash export CCC_NGROK_TOKEN=your_token export CCC_NGROK_DOMAIN=your-domain.ngrok-free.app export CCC_USERNAME=your_username export CCC_PASSWORD=your_password ccc ``` -------------------------------- ### Manually Update CCC Backend via npm (Terminal) Source: https://getc3.app/docs/configuration/auto-updates This command updates the CCC backend to the latest version when installed using npm. It ensures that the globally installed package is updated. ```bash npm install -g @naarang/ccc@latest ``` -------------------------------- ### Configure CCC Backend with CLI Flags Source: https://getc3.app/docs/configuration/authentication Configure the CCC backend using command-line interface (CLI) flags for username and password. This is a straightforward method for setting credentials directly when starting the server. Ensure you replace 'myusername' and 'mypassword' with your actual credentials. ```bash ccc --username myusername --password mypassword # Short form ccc -u myusername -p mypassword ```