ตรวจสอบการติดตั้ง
ตรวจสอบเวอร์ชันที่ติดตั้ง:
opencode --version
เพิ่มแล้ว opencode ไปยัง PATH ของคุณผ่านทาง: /root/.bashrc
การใช้งานพื้นฐาน
1. เข้าไปที่โปรเจ็กต์ของคุณ:
cd <project>
2. Start OpenCode:
opencode
เส้นทางสำคัญ
- ไดเร็กทอรีการติดตั้ง:
/root/.opencode/bin - ไบนารี:
/root/.opencode/bin/opencode
การเข้าถึงเว็บอินเทอร์เฟซ
1. Start the OpenCode web server on a specific port (e.g., 8080):
opencode web --port 8080
2. From your local machine, create an SSH tunnel to securely forward the port:
ssh -L 8080:localhost:8080 root@<SERVER_IP>
3. Then open your browser and go to: http://localhost:8080